1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

center object

Discussion in 'Visual Basic .NET' started by astradamasta, Mar 13, 2009.

  1. astradamasta

    astradamasta Registered Member

    Joined:
    Nov 24, 2008
    Messages:
    56
    Likes Received:
    8
    I made a simple program for some of my downline to use. I have a button for them to click and webbrowser control navigates to my webpage where i have a video tutorial on how to use the program. I am wanting to have that video centered when the webbrowser navigates there. I am assuming it is what people use to center captcha code on some of their projects. Thanks in advance
     
  2. Arthas

    Arthas BANNED BANNED

    Joined:
    Jan 5, 2009
    Messages:
    637
    Likes Received:
    322
    have you tried the center tag? lol...

    Code:
    <center>your video here</center>
     
  3. astradamasta

    astradamasta Registered Member

    Joined:
    Nov 24, 2008
    Messages:
    56
    Likes Received:
    8
    i know how to center something using html...what im saying its when they user clicks the button and it navigates to my webpage which has other things on there besides the video...i just want the webbrowser to display the video and let in be centered
     
  4. Arthas

    Arthas BANNED BANNED

    Joined:
    Jan 5, 2009
    Messages:
    637
    Likes Received:
    322
    oh. you need to use an anchor... so where your video is add:

    Code:
    <a name="video">
    and when you navigate to the page.. do it like this: http://yoursite.com/page.html#video
     
  5. astradamasta

    astradamasta Registered Member

    Joined:
    Nov 24, 2008
    Messages:
    56
    Likes Received:
    8
    so i just put that in the html code?
     
  6. Arthas

    Arthas BANNED BANNED

    Joined:
    Jan 5, 2009
    Messages:
    637
    Likes Received:
    322
    yep. in the place where you want the anchor to be.
     
  7. astradamasta

    astradamasta Registered Member

    Joined:
    Nov 24, 2008
    Messages:
    56
    Likes Received:
    8
    ok let me try that real quick
     
  8. razohad

    razohad Jr. VIP Jr. VIP Premium Member

    Joined:
    Jan 11, 2008
    Messages:
    701
    Likes Received:
    1,005
    Occupation:
    Software engginer
    Location:
    online most of the time
    webbrowser.document.window class has a ScrollTo property

    so just tell it the X and Y pixels of your video top

    like this

    webbrowser.document.window.ScrollTo(X,Y)