|
-
May 1st, 2005, 01:30 PM
#1
Thread Starter
Lively Member
Form positioning
Hi, im trying to position a form (on load) to the bottom right of another form. How can this be done...?
Thanks in advance.
-
May 1st, 2005, 01:54 PM
#2
Frenzied Member
Re: Form positioning
 Originally Posted by BefunMunkToloGen
Hi, im trying to position a form (on load) to the bottom right of another form. How can this be done...?
Thanks in advance.
that another form belongs to your application?
-
May 1st, 2005, 01:56 PM
#3
Re: Form positioning
If the other form is in your app then you can set the startupposition to manual. Then reference the
other forms top/left and height/width properties to position your form.
If the other form is in another app then you need to use FindWindow & GetRect APIs to caluclate the positioning.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
May 1st, 2005, 02:32 PM
#4
Thread Starter
Lively Member
Re: Form positioning
Thanks for the replies. It's a form in my app. Im not sure how to position it thought. I'm basically trying to do:
on form load
thisform.position = otherform.position
if you get what i mean...?
-
May 1st, 2005, 02:41 PM
#5
Re: Form positioning
Use this: or something like it
VB Code:
thisform.top = form1.top - form1.height + thisform.height
thisform.left = fom1.width - thisform.width
where form1 is the other form
overlaps bottom right corner of form1
Last edited by dglienna; May 2nd, 2005 at 12:26 AM.
-
May 1st, 2005, 02:50 PM
#6
Re: Form positioning
To position to the right side of form1:
VB Code:
thisform.top = form1.top
thisform.left = form1.left + form1.width
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
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
|