|
-
Apr 28th, 2007, 05:37 AM
#1
Thread Starter
Member
[Vb.net 2005] Auto Sizing Windows
Hey, got a quick question if someone could help me.
I have a form that when i run i want to auto size to the users screen width.
I was able to get the auto size (length and width) but when i run the form it doesn't start in the center, it starts off a bit.
I have tried changing the start position to center, but that didn't help.
Basically when i run the form, 1/4 of the window is off the screen, and i have to move it so its in the center.
Any help would be appreciated.
Thanks
(edit) have another question.
I have a button and when i click it, i would like it to prompt the user to import and image from their hard drive.
Thanks
Last edited by Wulfgur; Apr 28th, 2007 at 08:34 AM.
-
Apr 28th, 2007, 05:55 AM
#2
Re: [Vb.net 2005] Auto Sizing Windows
 Originally Posted by Wulfgur
Hey, got a quick question if someone could help me.
I have a form that when i run i want to auto size to the users screen width.
I was able to get the auto size (length and width) but when i run the form it doesn't start in the center, it starts off a bit.
I have tried changing the start position to center, but that didn't help.
Basically when i run the form, 1/4 of the window is off the screen, and i have to move it so its in the center.
Any help would be appreciated.
Thanks
(edit) have another question.
I have a button and when i click it, i would like it to prompt the user to import and image from their hard drive.
Thanks
Hi,
You can try in the Form load to change form size like this:
Code:
Me.WindowState = FormWindowState.Maximized
Wkr,
sparrow1
-
Apr 28th, 2007, 06:10 AM
#3
Thread Starter
Member
Re: [Vb.net 2005] Auto Sizing Windows
Ok thanks, that worked for the window.
Still the question on, a button when clicked prompts the user to select an image from their hard drive.
Thanks for the help.
-
Apr 28th, 2007, 07:40 AM
#4
Addicted Member
Re: [Vb.net 2005] Auto Sizing Windows
Add a "FileOpenDialog" to your form, and use :
FileOpenDialog.Show
to show it to the user.
and about your first Q, you can change the size and position of your forms according to screen size by using for example
Me.Width=Screen.Width
Me.Height=Screen.Height
etc.
-
Apr 28th, 2007, 08:33 AM
#5
Thread Starter
Member
Re: [Vb.net 2005] Auto Sizing Windows
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
|