Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. IVideoWindow.SetWindowPosition not working

IVideoWindow.SetWindowPosition not working

Scheduled Pinned Locked Moved C#
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Le rner
    wrote on last edited by
    #1

    hi all i am using directshow lib to capture web cam in my application all is gud capture image is ok but the webcam video screen not display properly i pass icture control handle of form to diaply webcam on my form

    Rectangle rc = hControl.ClientRectangle;

    ivw.SetWindowPosition(rc.X, rc.Y, rc.Width , rc.Height);

    please help me for this. thank

    OriginalGriffO 1 Reply Last reply
    0
    • L Le rner

      hi all i am using directshow lib to capture web cam in my application all is gud capture image is ok but the webcam video screen not display properly i pass icture control handle of form to diaply webcam on my form

      Rectangle rc = hControl.ClientRectangle;

      ivw.SetWindowPosition(rc.X, rc.Y, rc.Width , rc.Height);

      please help me for this. thank

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      We can't tell - we have no access to the rest of your code, or any idea what is actually happening because we just can't see your screen! But at a guess, it's because you are expecting the coordinates of the ClientRectangle to be directly usable in a different control, and that may not be the case - it'll depend on a huge number of factors including whatever the IVideoWindows interface is doing with the data when you call it's SetWindowPosition method. Chances are that's in absolute terms (so desktop coordinate based) while the ClientRectange returns a position based on the control container. Use the debugger to see exactly what you are getting, and compare that with the actual position your video is being shown at. Sorry, but we can't do any of that for you!

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups