Results 1 to 3 of 3

Thread: [RESOLVED] Can this be possibly done?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2010
    Posts
    131

    Resolved [RESOLVED] Can this be possibly done?

    What I was thinking of is load a webbrowser window somewhere in the form, but within the webbrowser size, by default, load only say the Half left (or right) part of the webbrowser window. In pseudocode it would be smth like
    webbrowser1.show(1*webbrowserWindow.Height, 0.5*webbrowserWindow.Width, webbrowserWindow.With.StartFromLeft/Right).
    Now I know it sounds pretty crazy, but it would be smth very handful for me.

    Look at the SS below if you didn't get what I'm trying to say because that's quite possibly as clear as I can be.
    Attached Images Attached Images  

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: Can this be possibly done?

    It can't be done quite the way you describe. The pages would load into the full web browser control, whatever that happens to be, and you can't have half a control. However, you can certainly have half of a control visible, and there are a couple ways to do it.

    One option would be to put the webbrowser either on a form, or even better on a panel. Then, in code or in the designer, set the size of the web browser such that it is twice as wide as the container that it is on. The page will load into the control, but only have will be visible.

    The other option would be to put a panel over the top of half of the control. The browser would be on the form, and a panel, set to the color of the form, or white, or black, depending on what you are trying to achieve, and position the panel such that it is over part of the webbrowser control.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2010
    Posts
    131

    Re: Can this be possibly done?

    Thanks, I will try both ideas out and see how it comes, good thing I thought of the second one of putting the panel over it as well, and it's close to resolving the problem.

    EDIT: Yes, the idea of setting the webbrowser's width twice of that of the panel works perfectly, thank you very much dude!
    Last edited by Legjendat; Feb 25th, 2012 at 06:37 PM.

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