Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Positioning panel

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2007
    Posts
    59

    Resolved [RESOLVED] [2005] Positioning panel

    Panel1.Top = Me.Top : Panel1.Left = Me.Left
    But the panel doesnt seem to be positioned at the top left corner of the form. Can it be positioned that way? I have multiple panels and i want certain panel to be appeared at one time and be positioned at top left corner.

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,422

    Re: [2005] Positioning panel

    try
    vb Code:
    1. Panel1.Top = 0 : Panel1.Left = 0

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [RESOLVED] [2005] Positioning panel

    Better would be:
    vb.net Code:
    1. Me.Panel1.Location = Point.Empty
    assuming you want it in the top left corner of the form. If you want it elsewhere then you should create your own Point:
    vb.net Code:
    1. Me.Panel1.Location = New Point(x, y)
    You should only set the Top and Left properties individually if you only want to set one of them. Similarly, you should not set the Size and Location properties separately when you can set the Bounds property or call the SetBounds method.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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