| Mirage Source http://web.miragesource.net/forums/ |
|
| Question about form http://web.miragesource.net/forums/viewtopic.php?f=201&t=865 |
Page 1 of 1 |
| Author: | Forte [ Sun Dec 17, 2006 7:35 pm ] |
| Post subject: | Question about form |
I have 2 forms open, but i want one always above the other. Is there a way to do this? |
|
| Author: | Lea [ Sun Dec 17, 2006 7:39 pm ] |
| Post subject: | |
Tips and Tricks of Visual Basic By Volte-Face wrote: How to Keep a Form Always-on-Top
This question gets asked a lot, so I’ll include it here. Const HWND_TOPMOST = -1 Const HWND_NOTOPMOST = -2 Const SWP_NOSIZE = &H1 Const SWP_NOMOVE = &H2 Const SWP_NOACTIVATE = &H10 Const SWP_SHOWWINDOW = &H40 Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos"( _ ByVal hwnd As Long, _ ByVal hWndInsertAfter As Long, _ ByVal x As Long, _ ByVal y As Long, _ ByVal cx As Long, _ ByVal cy As Long, _ ByVal wFlags As Long) As Long There. That’s the API to do it with. Now, it’s very simple to make a top-most window: SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE And you have yourself a topmost window. |
|
| Author: | Forte [ Sun Dec 17, 2006 7:46 pm ] |
| Post subject: | |
ok well im noobish so cud u help me a lil bit more =D i declared those at the top of my form and then placed the top part in the form load but the declares dont really work |
|
| Author: | halla [ Sun Dec 17, 2006 7:50 pm ] |
| Post subject: | |
Well you can put the top part in a mod and then the bottom part in any form you want at the top I guess. |
|
| Author: | Forte [ Sun Dec 17, 2006 7:54 pm ] |
| Post subject: | |
k i got it working, ya see i made my inventory always ontop if you open it. but once i open my game my inventory opens along with my frmmirage x_x i guess i can work this out though i tried putting frminv.vis = false on frmMirages form load but then when i open the inv it dosnt stay ontop |
|
| Author: | Matt [ Sun Dec 17, 2006 8:09 pm ] |
| Post subject: | |
Why would you put your inventory in a separate form? O_o |
|
| Author: | Forte [ Sun Dec 17, 2006 8:13 pm ] |
| Post subject: | |
lol, its hard to explain but it has to do wiht my gui and all. everything is seperate forms while frm mirage is just the picscreen and chatbox. |
|
| Author: | Matt [ Sun Dec 17, 2006 8:17 pm ] |
| Post subject: | |
If you're setting everything else up like that, why not do the chat as well? |
|
| Author: | Forte [ Sun Dec 17, 2006 8:22 pm ] |
| Post subject: | |
im planning on doing that actually. but i need some forms infront of others . like if you have inventory open and the picscreen goes infront of it. it cang et annoying, i think itd be cleaner if some are always on top so you know where they are and then you can move them aside. ok i got it working, u can close the topic |
|
| Author: | Robin [ Sun Dec 17, 2006 8:51 pm ] |
| Post subject: | |
Isn't there a property that allows you to do that... I can't remember. |
|
| Author: | Forte [ Sun Dec 17, 2006 8:55 pm ] |
| Post subject: | |
i heard there was, but i couldnt find it. if you do happen to come across it cud ya tell me |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|