2 Replies - 641 Views - Last Post: 16 February 2013 - 07:35 AM Rate Topic: -----

#1 nilesh7136  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 120
  • Joined: 03-January 13

Centered GroupBox in Form When Change Size of Form

Posted 16 February 2013 - 06:50 AM

Hello,

i'm Nilesh,
i have created one application,
Posted Image
there is a one group-box, if user resize the form then the group-box will automatically resize in centered on the from?
im sure, code written in SizeChanged Event,,
can you tell me how to do in???

Thank You In Adv,
@Nilesh
Is This A Good Question/Topic? 0
  • +

Replies To: Centered GroupBox in Form When Change Size of Form

#2 nilesh7136  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 120
  • Joined: 03-January 13

Re: Centered GroupBox in Form When Change Size of Form

Posted 16 February 2013 - 07:34 AM

Thanks to all,,
i have solved this( GroupBox1.Location = New Point((Me.Width \ 2) - (GroupBox1.Width \ 2), (Me.Height \ 2) - (GroupBox1.Height \ 2))
)...

Thanks Again...
@Nilesh...
Was This Post Helpful? 0
  • +
  • -

#3 IronRazer  Icon User is online

  • D.I.C Addict

Reputation: 196
  • View blog
  • Posts: 690
  • Joined: 01-February 13

Re: Centered GroupBox in Form When Change Size of Form

Posted 16 February 2013 - 07:35 AM

Hello nilesh7136,
Have you tried setting the groupbox property (Anchor) to anchor it to Top,Bottom,Left, and Right. That should keep it centered when resizing the form.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1