Results 1 to 5 of 5

Thread: form fitting the screen

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2003
    Posts
    140

    form fitting the screen

    i have a form, and i want it to stretch all the way across the top of the screen, and then the command buttons (5 of them) to centre themselves on the form?

    any ideas?

    i need the code or etc for this!

    thanks

  2. #2
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871
    With some code inside the Form_Resize event. I've put all controls inside a Frame. You can also use a PictureBox, or no control at all (but in that case you'd have to position every control by itself).
    VB Code:
    1. Private Sub Form_Resize()
    2. Frame1.Left = Me.Width / 2 - (Frame1.Width / 2)
    3. End Sub
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  3. #3
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: form fitting the screen

    Originally posted by hshah
    i have a form, and i want it to stretch all the way across the top of the screen
    Could you explain this a little more?


    Has someone helped you? Then you can Rate their helpful post.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Dec 2003
    Posts
    140
    if u go to www.studentforums.hostultra.com/Computing.zip

    and u run my program, u will see the main form come up after the login with password "password"!

    that main form, i want stretched all the way across the top!

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by hshah
    if u go to www.studentforums.hostultra.com/Computing.zip

    and u run my program, u will see the main form come up after the login with password "password"!

    that main form, i want stretched all the way across the top!
    Stretched or stretchable?

    There were way too many errors while loading your project, and I'm too (as they say) "arsed" to fix them. Please load a correct ZIP.

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