Link to home
Start Free TrialLog in
Avatar of RIAS
RIASFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How to set the column sizes of datagridview+windows programming vb.net 2005

Hi,
I have set my dgrid column sizes to
  Case "DG1" 'Windows
                         .Columns(1).Width = 300
                        .Columns(2).Width = 250

But I need to fit them perfectly depending on the monitor size so that I do not have a scroll bar  showing when I open the project.In general need to resize columns depending on the monitor screen size.

Regards                    
Avatar of rgn2121
rgn2121
Flag of United States of America image

I'm not sure that I fully understand what you need, but you can get your monitor size from me.screen.bounds
SOLUTION
Avatar of rgn2121
rgn2121
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

Cheers..thats a clue Screen.Bounds but how to set the column width depending on the screen size.Any suggestions?
 
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RIAS

ASKER

Cheers!!!