Hi All,
I would like my 'quit' button to appear in the bottom right hand corner of my menu screen, but it seems that every computer in the office has a different sized screen, different size ration (some are widescreen), and different resolution. When I deploy my program, the quit button may appear off-screen (the user has to scroll down to find it) or it may appear half way across the screen on a widescreen laptop for example. If I set my form to 'maximised', is there a way to position a button relative to the bottom right hand corner of the form?

Also, on one maximised form I have two datagridview's side by side. Is there are way to automatically set each one to take up half of the available form width, so they fill the form nicely?

Many thanks,

Recommended Answers

All 2 Replies

try something like this

set the y axis of the datagridview as u want....

u can also write the below code in load as well as form resize event so that if the form is resized even the controls will be resized...

          DataGridView1.Size = New System.Drawing.Size(Me.Width / 2 - 100, 300)
          DataGridView1.Left = Me.Left + 50

          DataGridView2.Size = DataGridView1.Size
          DataGridView2.Left = Me.Width / 2 + 50

          Button1.Top = Me.Height - Button1.Height - 20
          Button1.Left = Me.Width - Button1.Width - 20

perfect - just what I was looking for.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.