Article ID: 101325
Article Last Modified on 1/18/2007
Declare Function SetWindowPos Lib "user32" (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
For Microsoft Access 1.x and 2.0:
Declare Sub SetWindowPos Lib "User" (ByVal hwnd%, _
ByVal hWndInsertAfter%, _
ByVal X%, ByVal Y%, ByVal cx%, _
ByVal cy%, ByVal wFlags%)
Global Const HWND_TOPMOST = -1
Global Const SWP_NOSIZE = &H1
Global Const SWP_NOMOVE = &H2
Function TopMost (F As Form)
Call SetWindowPos(f.hwnd, HWND_TOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE Or SWP_NOSIZE)
End Function
Popup: Yes
OnOpen: =TopMost(Form)
Popup: Yes
OnTimer: =TopMost(Form)
TimerInterval: 50
Declare Function FindWindow% Lib "user32" Alias "FindWindowA" _
(ByVal lpclassname As Any, _
ByVal lpCaption As Any)
Declare Function SetWindowPos Lib "user32" (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
For Microsoft Access 1.x and 2.0:
Declare Function FindWindow% Lib "user" (ByVal lpclassname As Any, _
ByVal lpCaption As Any)
Declare Sub SetWindowPos Lib "User" (ByVal hwnd%, _
ByVal hWndInsertAfter%, _
ByVal X%, _
ByVal Y%, _
ByVal cx%, _
ByVal cy%, _
ByVal wFlags%)
Global Const HWND_TOPMOST = -1
Global Const SWP_NOSIZE = &H1
Global Const SWP_NOMOVE = &H2
Function Float_Calc()
Dim X&, hwnd%
X = Shell("CALC.EXE", 1)
hwnd% = FindWindow%("SciCalc", 0&)
Call SetWindowPos(hwnd%, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or _
SWP_NOSIZE)
End Function
? Float_Calc()
Additional query words: float
Keywords: kbhowto kbprogramming KB101325