The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Form Placement
Posted: 19 Oct 09 2:34 PM
|
Is there anyway to control where a form is opened up to on a windows screen?
MainView objects? |
|
|
|
Re: Form Placement
Posted: 21 Oct 09 1:14 PM
|
Ive dug this out take a look and see what you can come up with:
Dim MV
Set MV = Application.MainViews.Add("YOURFORM", 2, False) MV.Height = 600 MV.Width = 800 MV.ShowModal
It is possible to control the position of the form as well as the size, you just have to play about with the code a bit. |
|
|
|
Re: Form Placement
Posted: 21 Oct 09 8:45 PM
|
Thanks Andrew.
mv.left and mv.top don't do the trick...... |
|
|
|
Re: Form Placement
Posted: 22 Oct 09 12:11 AM
|
Here is an idea to look in to... I don't recall if MV exposes an hWnd property, but if not then you could access the hWnd of the Form that you are loading using hte MV container. Then use some Win32 APIs to set the Top and Left of the Window (dialog form) using that hWnd. |
|
|
|
Re: Form Placement
Posted: 22 Oct 09 9:14 AM
|
OK Todd, you know I don't have a 'vbscript within SLX' clue of how to use an exposed hWnd property.....
|
|
|
|
Re: Form Placement
Posted: 23 Oct 14 3:28 PM
|
Hi, did you ever come up with a way to do this. It appears like I may need to do something like this.
thank you |
|
|
|