List Of Category
New Category, Add-Ins/Plugins, Database & Reporting, Snippet Function, Network & Internet, Compilation Code, Security Focus, Tutorial & Articles, Tool & Utilities, Top CategorySearch Source
Custom Search
|
|
Option Explicit
Private Const GWL_STYLE As Long = (-16&)
Private Const GWL_EXSTYLE As Long = (-20&)
Private Const WS_THICKFRAME As Long = &H40000
Private Const WS_MINIMIZEBOX As Long = &H20000
Private Const WS_MAXIMIZEBOX As Long = &H10000
Private Declare Function GetWindowLong& Lib "user32" _
Alias "GetWindowLongA" (ByVal hWnd&, ByVal nIndex&)
Private Declare Function SetWindowLong& Lib "user32" _
Alias "SetWindowLongA" (ByVal hWnd&, ByVal nIndex&, _
ByVal dwNewLong&)
Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function GetCursorPos& Lib "user32" _
(lpPoint As POINTAPI)
Private Declare Function SetCursorPos& Lib "user32" _
(ByVal x&, ByVal y&)
Private Declare Function ClientToScreen& Lib "user32" _
(ByVal hWnd&, lpPoint As POINTAPI)
Private Declare Function GetSystemMenu& Lib "user32" _
(ByVal hWnd&, ByVal bRevert&)
Private Sub Command1_Click()
Call SetWindowLong(hWnd, GWL_STYLE, _
GetWindowLong(hWnd, GWL_STYLE) Xor _
(WS_THICKFRAME Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX))
Call GetSystemMenu(hWnd, 1&)
Select Case Command1.Caption
Case "Make My Border Fixed"
Command1.Caption = "Make My Border Sizeable"
Case Else
Command1.Caption = "Make My Border Fixed"
End Select
Move Left, Top, Width - 50, Height - 50
Move Left, Top, Width + 50, Height + 50
Dim tagSavePoint As POINTAPI, tagMovePoint As POINTAPI
Call GetCursorPos(tagSavePoint)
With tagMovePoint
.x = (-1)
.y = 10
End With
Call ClientToScreen(hWnd, tagMovePoint)
Call SetCursorPos(tagMovePoint.x, tagMovePoint.y)
Call SetCursorPos(tagSavePoint.x, tagSavePoint.y)
End SubList Of Comments. Pages: | , 0
Back |
To Top