Writing a vb.net program that will be used on machines with different screens and resolution settings. In Java I could get the screen size and use it to set the pane size. How do I get the screen size in vb.net?
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Scott LyslePosted Oct 26, 2006, 10:22 PM
Dim
intHeight As Integer Dim intWidth As IntegerintHeight = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Height
intWidth = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea.Width
MessageBox.Show(intWidth.ToString() &
" by " & intHeight.ToString())