Private Declare Function GetWinDir Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Public Function WINdir() As String
Dim str As String
str = String(20, Chr$(0))
GetWinDir str, 20
WINdir = ClrNol(str)
End Function
Public Function S32dir() As String
Dim str As String
str = String(20, Chr$(0))
GetWinDir str, 20
S32dir = ClrNol(str) & "\system32"
End Function
Public Function ClrNol(Ctx As String) As String
ClrNol = Left(Ctx, Len(Ctx) - InStr(Ctx, Chr$(0)) + 1)
End Function
Showing posts with label VB. Show all posts
Showing posts with label VB. Show all posts
Monday, January 31, 2011
VB Always On Top
Public 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
on FormLoad:
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 2 Or 1 Or 16
'you get this from klampok_child@yahoo.co.id
(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
on FormLoad:
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 2 Or 1 Or 16
'you get this from klampok_child@yahoo.co.id
Subscribe to:
Posts (Atom)