forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Ontop Command

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Hippo
Contributor
Contributor


Joined: 08 Feb 2005
Posts: 53

PostPosted: Wed Feb 23, 2005 8:15 pm    Post subject: Ontop Command Reply with quote

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
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Thu Feb 24, 2005 1:55 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Hippo
Contributor
Contributor


Joined: 08 Feb 2005
Posts: 53

PostPosted: Thu Feb 24, 2005 3:16 pm    Post subject: Reply with quote

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 Very Happy
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Feb 24, 2005 4:50 pm    Post subject: Reply with quote

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. Wink

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group