|
-
Nov 20th, 2004, 05:55 PM
#1
Thread Starter
Junior Member
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
-
Nov 20th, 2004, 06:12 PM
#2
Frenzied Member
You mean like Form.Height and Form.Width?
-
Nov 20th, 2004, 06:20 PM
#3
Thread Starter
Junior Member
Yes, that's right (sorry forgot to include that)
I can't seem to get the syntax to change the values
Chris
-
Nov 20th, 2004, 06:25 PM
#4
Frenzied Member
What have you tried? Given what you have above, maybe something like
-
Nov 20th, 2004, 06:31 PM
#5
Thread Starter
Junior Member
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
-
Nov 20th, 2004, 06:52 PM
#6
Frenzied Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|