Results 1 to 5 of 5

Thread: Control / Form

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    116

    Exclamation

    How to position a control in the lower right corner

    of a MAXOMIZED form!
    0101011001000010
    01101111011011100110110001101001011011100110010101110010

  2. #2
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    Dont use the form maximize thing, instead use the code I provided below
    Code:
    Private Sub Form_Load()
    Form1.Height = Screen.Height
    Form1.Width = Screen.Width
    Form1.Left = 0
    Form1.Top = 0
    
    'lets say that the control is a label
    Label1.Left = Form1.Width - Label1.Width
    Label1.Top = Form1.Height - Label1.Height * 2
    
    End Sub
    NXSupport - Your one-stop source for computer help

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Posts
    116

    Wink

    Thanks. Pretty Good!!!
    0101011001000010
    01101111011011100110110001101001011011100110010101110010

  4. #4
    Guest
    This code (MAXIMIZE):
    Code:
    Private Sub Form_Load()
    Form1.Windowstate = vbMaximized
    
    Label1.Left = Form1.Width - Label1.Width
    Label1.Top = Form1.Height - Label1.Height * 2
    
    End Sub
    and yours is the same thing, dimava, you can maximize the form and still get the screen width.

    Some forms cannot be sized beyond a point, and the user may maximize a form, in which case your code might generate an error.

    Also, if you size the form that way, it would allow the user to resize it, and it's handlebars would be sticking out.

  5. #5
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    what happens when you set the form's property to MAXIMIZE is that you are saying:

    I'm only gonna put stuff on what I have in the dsign view, and just put the back ground color on the remaining part

    the code that I did is saying:

    I'm gonna use the whole screen, and put stuff on the whole screen, not just the box that I put stuff in at design time
    NXSupport - Your one-stop source for computer help

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