| View previous topic :: View next topic |
| Author |
Message |
Hippo Contributor


Joined: 08 Feb 2005 Posts: 53
|
Posted: Wed Feb 23, 2005 8:15 pm Post subject: Ontop Command |
|
|
Is there a way to set the main dialogs Ontop status without having to re-run the program. I am currently doing it by saving a registry value then asking the user to restart the program. Then depending on whether ontop is set or not defines how I create the dialog.
Surely there has to be an easier way without re-starting the program? |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Thu Feb 24, 2005 1:55 am Post subject: |
|
|
| Code: |
WINDOW ONTOP,<window>
|
Where <window> is either the window caption text, #className, or %handle. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
Hippo Contributor


Joined: 08 Feb 2005 Posts: 53
|
Posted: Thu Feb 24, 2005 3:16 pm Post subject: |
|
|
Thanks for that, worked a treat. I couldnt work out how to make the window Not ontop until I found this thread http://forum.vdsworld.com/viewtopic.php?t=1690 and this little snippet of code in particular
| Code: |
LOADLIB USER32
%H = @strdel(@WINEXISTS(#MYWin),1,1)
if %H
%H = @lib(user32,SetWindowPos,BOOL:,%H,-2,0,0,0,0,3)
else
ERROR -1
end
FREELIB USER32
END
|
Which works well. I now have a program which can have its ontop status changed without restarting it. I am a happy bunny  |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Feb 24, 2005 4:50 pm Post subject: |
|
|
There's another trick that comes in handy on various
occasions like this...
Make a main dialog window with nothing in it, and don't
show it. Then use a child window as the main window.
This allows you to close/re-create the dialog with different
options - without actually closing your program.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|