faqts : Computers : Programming : Languages : Bbcbasic

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

Entry

BBCBASIC: Windows: Window: How to keep a window always on top? [Windows API SetWindowPos]

Oct 24th, 2006 12:58
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 24 October 2006 - 07:14 pm --------------------

BBCBASIC: Windows: Window: How to keep a window always on top? 
[Windows API SetWindowPos]

---

Steps: Overview:

 1. -E.g. create the following program

--- cut here: begin --------------------------------------------------

 PROCWindowChangeKeepAlwaysOnTop
 END
 :
 :
 :
 DEF PROCWindowChangeKeepAlwaysOnTop
 LOCAL HWND_TOPMOST
 LOCAL HWND_NOTOPMOST
 LOCAL SWP_NOACTIVATE
 LOCAL SWP_SHOWWINDOW
 LOCAL x%
 LOCAL y%
 LOCAL xWidthI%
 LOCAL yHeightI%
 :
 HWND_TOPMOST = -1 : REM windows are numbered. Top most is -1
 HWND_NOTOPMOST = -2
 SWP_NOACTIVATE = &10
 SWP_SHOWWINDOW = &40
 x% = 10 : REM move window 10 pixels to right (from left screen)
 y% = 10 : REM move window 10 pixels to down (from top screen)
 xWidthI% = 100 : REM horizontal size window 100 pixels
 yHeightI% = 100 : REM vertical size window 100 pixels
 :
 REM now you call that Windows API function
 REM supplying your particular parameters
 SYS "SetWindowPos", @hwnd%, HWND_TOPMOST, x%, y%, \
 \ xWidthI%, yHeightI%, SWP_NOACTIVATE OR SWP_SHOWWINDOW \
 \ TO ret%
 ENDPROC
 :

--- cut here: end ----------------------------------------------------

===

Internet: see also:

---

Microsoft: API: SetWindowPos
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/winui/winui/windowsuserinterface/windowing/windows/windowreference/w
indowfunctions/setwindowpos.asp

---

Language: Computer: BASIC: BBCBASIC: Windows: Window: Link: Can you 
give an overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/42758/fid/768

----------------------------------------------------------------------