|
-
Nov 13th, 2010, 02:29 AM
#1
Thread Starter
Lively Member
[RESOLVED] Managing VB6 IDE using multiple monitors
Hi.
I'm trying to work out how to use the VB6 IDE with multiple (2) monitors.
I have them set up as one extended desktop.
Essentially, I want the IDE to be in the main window, and when I run the program I'm developing, have that program form to appear in the other window.
It would make it a bit easier to develop programs.
I'd also like all subforms that get displayed from the main program to be in the same window as the parent form.
Is there any way of doing this?
I tried to set the main form's LEFT property to 1920, (as my primary monitor is 1920x1080). And I tried setting it in the form load, using "main.Left = 1920"
This seems to be ignored though, despite setting the STARTUPPOSITION property to 0 - Manual.
Infact, it seems to ignore it even when set to dimensions within the primary monitor.
Once I get the main form located, I'm pretty sure I should be able to work out where to place the other sub-forms from the location of the "main" form.
Thanks for any ideas.
-
Nov 13th, 2010, 03:53 AM
#2
Re: Managing VB6 IDE using multiple monitors
> And I tried setting it in the form load, using "main.Left = 1920"
The Left Property expects Twips, you are giving it pixels
Try main.Left = 1920 * Screen.TwipPerPixelX
-
Nov 13th, 2010, 04:34 AM
#3
Thread Starter
Lively Member
Re: Managing VB6 IDE using multiple monitors
Ahhh, that makes sense.
when I tried that I get the "method or data member not found".
Do I have to create a reference to something?
If I just set it to 1920 * 15, its seems to work though.
Is Screen.TwipPerPixelX usually 15?
Seems to work perfectly, ie the form loads on the extreme left of the 2nd monitor, but I gather it may not if the twips differ from monitors, resolutions,etc.
I guess I have no idea what a twip is...
Thanks though Magic Ink, you have solved my problem.
I appreciate it.
-
Nov 13th, 2010, 04:46 AM
#4
Re: Managing VB6 IDE using multiple monitors
The error is a simple typo, it should be: Screen.TwipsPerPixelX (which could be checked by deleting and re-typing the dot).
Is Screen.TwipPerPixelX usually 15?
Usually, but it is not safe to rely on that value, because even on a single computer it can change over time (and the ..X version can also change independently of the ..Y version).
I guess I have no idea what a twip is...
It is a physical measurement unit (1440 of them to an inch I think), so is actually an odd default unit to use for measuring something on the screen (which is why later versions of VB use Pixels instead).
-
Nov 13th, 2010, 04:48 AM
#5
Re: Managing VB6 IDE using multiple monitors
Sorry a little typo here, that should be TwipsPerPixelX. Do not substitute it with a magic number like 15.
-
Nov 13th, 2010, 04:54 AM
#6
Thread Starter
Lively Member
Re: Managing VB6 IDE using multiple monitors
Ah, OK.
Thanks for pointing that out, and for clarifying it, Si_the_geek.
Once again you've helped me out in a very timely, and concise, manner. 
Yes it is a rather odd measurement, but hey, so are inches, I guess.
Thanks also Magic ink.
-
Nov 13th, 2010, 06:30 AM
#7
Thread Starter
Lively Member
Re: Managing VB6 IDE using multiple monitors
Thanks again Magic Ink.
I think I started drafting a reply just before you posted your update.
It's a shame, I like magic numbers, especially short ones like 15, as opposed to Pi.
Thanks again for your help.
Tags for this Thread
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
|