|
-
Jan 7th, 2006, 11:37 AM
#1
Thread Starter
New Member
Moving a form to another monitor
I am working on a VB application that requires two monitors. The main monitor shows a windows media video clip and the other monitor contains another VBform that contains buttons. Clicking on a specific button, will direct the user to a specific chapter on the video clip. I can do the latter but I don't know how to move the form containing the buttons to the second monitor. Is there an API that will allow me to do this?
TIA
Mike
-
Jan 7th, 2006, 11:46 AM
#2
Re: Moving a form to another monitor
What about just setting the forms location to a coordinate that will place it on the second monitor?
VB Code:
'This will more it to the start of the second monitor if your runing 1024 x 768 resolution
Form1.Move 1024 * Screen.TwipsPerPixelX + 1
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 
-
Jan 7th, 2006, 12:22 PM
#3
Thread Starter
New Member
Re: Moving a form to another monitor(RESOLVED)
Great that worked. The second monitor is to the left of the primary, so I just used
VB Code:
frmButtons.Move -1024 * Screen.TwipsPerPixelX + 1
The second monitor is smaller so I just have to play with the settings to match it up.
Thanks,
Mike
-
Jan 7th, 2006, 12:23 PM
#4
Re: Moving a form to another monitor
No problem 
If your second monitor is on the left of the primary then you could use the Display Settings to arrange the monitor configuration if that helps.
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 
-
Jan 7th, 2006, 01:16 PM
#5
Re: Moving a form to another monitor(RESOLVED)
 Originally Posted by mevasquez
The second monitor is to the left of the primary, so I just...
I'm curious...
Doesn't that cause the desktop icons to migrate to the secondary monitor? That's what happens to me if I select "LEFT" side for the secondary (that's with a laptop)...
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
|