School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!
Welcome to Dream.In.Code
Become an Expert!

Join 340,144 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 3,820 people online right now. Registration is fast and FREE... Join Now!



Center Buttons

Page 1 of 1

Center Buttons Rate Topic: -----

#1 sraptor  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: Members
  • Posts: 25
  • Joined: 22-April 09


Dream Kudos: 0

Posted 30 April 2009 - 09:39 AM

I have a form with 6 buttons, when form get maximize the buttons is not in the center anymore, how can I do the buttons get in the center always?

Thanks
Was This Post Helpful? 0
  • +
  • -


#2 egof  Icon User is offline

  • D.I.C Head
  • Icon
  • Group: Members w/DIC++
  • Posts: 98
  • Joined: 27-March 09


Dream Kudos: 100

Posted 30 April 2009 - 10:41 AM

I usually put those kinds buttons in a group box then center the box. On the form resize event you want to know where to place the left side of the group box. This can be done be getting the width of the form and subtracting the width of the group box and dividing by 2

This post has been edited by egof: 30 April 2009 - 10:42 AM

Was This Post Helpful? 0
  • +
  • -

#3 sraptor  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: Members
  • Posts: 25
  • Joined: 22-April 09


Dream Kudos: 0

Posted 30 April 2009 - 10:51 AM

Do you know wich code I use for the resize, I ready add the buttons to the group box. But if it get maximize still the same problem, that screen always run maximaze
Was This Post Helpful? 0
  • +
  • -

#4 Asscotte  Icon User is offline

  • D.I.C Regular
  • Icon
  • View blog
  • Group: Authors
  • Posts: 489
  • Joined: 08-February 09


Dream Kudos: 325

Posted 30 April 2009 - 11:01 AM

View Postsraptor, on 30 Apr, 2009 - 10:51 AM, said:

Do you know wich code I use for the resize, I ready add the buttons to the group box. But if it get maximize still the same problem, that screen always run maximaze


why dont you just anchor it in the center, then unckeck rezize?
Was This Post Helpful? 0
  • +
  • -

#5 sraptor  Icon User is offline

  • New D.I.C Head
  • Pip
  • Group: Members
  • Posts: 25
  • Joined: 22-April 09


Dream Kudos: 0

Posted 30 April 2009 - 11:14 AM

Because it is the main screen and look better maximize
Was This Post Helpful? 0
  • +
  • -

#6 egof  Icon User is offline

  • D.I.C Head
  • Icon
  • Group: Members w/DIC++
  • Posts: 98
  • Joined: 27-March 09


Dream Kudos: 100

Posted 30 April 2009 - 12:58 PM

	Private Sub Form1_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize



	End Sub


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1


Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month