Fairly straightforward question: How can I tell a VB6 application to remember what display it was closed on, and then when the application is launched again, to display the main form on that monitor?
Why don't you just save the location and size of your window before exiting, and then restores during startup? Do you need to position by monitor?
You don't need to be "aware" of all monitors. In this instance, you just be multi-monitor agnostic.
For the sake of this example, assume you have a two monitor setup, the primary to the left of the secondary, and both monitors have a resolution of 1024x768.
Rather than think of your app running in a multi-monitor environment, think of it as an application running on a single desktop that's 2048x768.
In this case, all you need to do is determine where on the desktop it sits, and Windows takes care of the rest. You don't need to worry which monitor it's on: if you set the Window to appear within the box (0,0)-(1023,767) then it appears on the primary. If the co-ords are within the box (1024,0)-(2047,767) then it appears on the secondary monitor.
It's simply a case of asking Windows to tell you the size and position of the application window. And for that you need to look at GetWindowRect() and SetWindowPos(). There's an example of how to use GetWindowRect() behind this link. (VB might have a native way of getting this without resorting to the Win32 API, but I don't have VB6 available in front of me to test with).