Results 1 to 10 of 10

Thread: WebBrowser control - problems with window size

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    9

    WebBrowser control - problems with window size

    In a project to remotely control a digital video recorder (DVR), I'd like to use the webbrowser control to display the web page contained in the DVR. This page is used to navigate through different DVR menus and displays.

    After calling WebBrowser1.Navigate "192.168.0.227", the DVR page always covers the entire form, despite having specified the exact size of the webbrowser display. Is there a way to assure that the web page opens within the design-time boundaries of the control (with horizontal and vertical sliders, if required)?

    I checked random pages off the internet and they all open within the design-time width and height. Obviously, there is something different about the DVR page I’m trying to display.

  2. #2
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Re: WebBrowser control - problems with window size

    After calling the data to the browser, re-set the width and hight of the browser using the .width and .hight? Or does that not work

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    9

    Re: WebBrowser control - problems with window size

    I tried that and it didn't work. Maybe, there is a timing issue, since I set the width and height right after Navigate.

  4. #4
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Re: WebBrowser control - problems with window size

    Does it appear to be resizing quickly and moving back? Maybe the DVR is somehow changing the value.. try putting the resize command in a timer set to execute, say, every 50 or 100 MS and see if it appears to be flickering back and forth

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    9

    Re: WebBrowser control - problems with window size

    I just created a button that sets the size of the webbrowser. The button stays on top of the DVR page so I can always click it. When I click it nothing happens; no flicker, the webbrowser still fills the entire form.

  6. #6
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Re: WebBrowser control - problems with window size

    Hmm... Must be an unrelated issue (I.E. the browser is not controlling the form size).

    If the browser taking up just the size of the form, or the entire screen? Also, did you set Fullscreen = false in the properties?

  7. #7

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    9

    Re: WebBrowser control - problems with window size

    It is taking up the entire form but not the screen. I did set Fullscreen to False

  8. #8
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Re: WebBrowser control - problems with window size

    WebBrowser.Resizable = False ?

    Sorry, I'm a noob so I'm clutching at straws here. If that idea doesn't work i'll shut up and let someone knowledgable take over. "It is better to keep your mouth closed and appear an idiot, than to open it and remove all doubt", and all

  9. #9

    Thread Starter
    New Member
    Join Date
    Dec 2005
    Posts
    9

    Re: WebBrowser control - problems with window size

    Webbrowser.Resizable= False doesn't work.

    Additional information: the first page of the DVR web contains the following code:

    window.resizeTo(screen.availWidth,screen.availHeight);window.moveTo(0,0);

    This is embedded in the DVR so I have no way to remove this command.

  10. #10
    Addicted Member
    Join Date
    Apr 2005
    Posts
    248

    Re: WebBrowser control - problems with window size

    Do you need to perform operations with buttons on that window too? Maybe you could have a form dedicated to the DVR's output and another form with controls?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width