PDA

View Full Version : window always on top?



sandyrepope
24-08-2007, 01:13
I've been playing around with making a desktop pet (sometimes called a deskmate) and I was wondering if there is a way to keep the window on top all the time?

Thanks
Sandy

ErosOlmi
24-08-2007, 07:41
Hy Sandy,

yes, there is. You need to use %WS_EX_TOPMOST extended style when using DIALOG NEW.
An example can be seen in \thinBasic\SampleScripts\UI\CPU_Monitor\CPU_Monitor.tbasic



DIALOG NEW 0, "CPU Usage", 107, 172, 240, 60, _
%WS_DLGFRAME OR _
%ds_center or _
%WS_CAPTION OR _
%WS_SYSMENU OR _
%WS_OVERLAPPEDWINDOW , _
%WS_EX_TOPMOST TO hDlg


Ciao
Eros