-
Resizing Forms manually
Call me stupid, but how do you change the size of a form with code, (not using the visual interface)
Code:
'this is part of the print preview section
'don't want to maximize or have centered
' I am using dual monitors in horizontal mode
' center spans both screens, maximize fills both screens
' want to be able to size the form to fill only one monitor
dlgPreview.WindowState = FormWindowState.Normal
dlgPreview.StartPosition = FormStartPosition.Manual
'I want to size the form myself here
Thanks, Chris
-
You mean like Form.Height and Form.Width?
-
Yes, that's right (sorry forgot to include that)
I can't seem to get the syntax to change the values
Chris
-
What have you tried? Given what you have above, maybe something like
-
See, call me stupid
Here's what I had tried
dlgPreview.Size.Width = 780
take out the .size. and voila, it works, thanks a bunch
Chris
-
Glad you figured it out. This is where I love Intellisense. Type in dlgPreview, than a dot, and Intellisense show up where you can check out all the methods, properties etc. It's a great learning tool, at least for me.