|
-
Dec 21st, 2006, 11:05 PM
#1
Thread Starter
Lively Member
[RESOLVED] SetParent
How would I got about setting the length and width of my form to the window that I am setting to it and making sure that window is centered and fit just right? Thanks for any help
-
Dec 21st, 2006, 11:53 PM
#2
Re: SetParent
Simplest is maximizing the form.
Next option is Me.Move 0, 0, Screen.Width, Screen.Height but that doesnt take into account the taskbar.
Another alternative is to use the Sysinfo control to get the workarea (desktop area less taskbar)
VB Code:
With SysInfo1
Me.Move .WorkAreaLeft, .WorkAreaTop, .WorkAreaWidth, .WorkAreaHeight
End With
-
Dec 22nd, 2006, 03:08 PM
#3
Thread Starter
Lively Member
Re: SetParent
Thanks leinad31, but I didn't mean the whole screen I meant making the window that I am setting to my form. Also, thanks ZenDisaster, that centered it perfectly . I've tried messing around but I think I lack the required knowledge of API to know how to do this. Is there anway to get the form to fit to the window? Heres a ss of what I mean:
http://img134.imageshack.us/img134/245/frmfitis1.jpg
Of course, I did that manually by hand, but is there anyway I could achieve that automatically with coding? Thanks for any help, i'm learning a lot.
-
Dec 22nd, 2006, 04:02 PM
#4
Thread Starter
Lively Member
Re: SetParent
Thank you! That is a very useful function, just what I need. Thanks for all your help.
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
|