VB-LEANER
Nov 29th, 1999, 11:40 AM
is there anyway i can get the path of the window which the user is currently looking thru or exploring
plz help!!
Serge
Nov 29th, 1999, 11:42 AM
Use GetWindowsDirectory API. Here's an example:
Private Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Public Function GetWindowsPath() As String
Dim lRet As Long
Dim strBuffer As String
strBuffer = Space(255)
lRet = GetWindowsDirectory(strBuffer, Len(strBuffer))
If lRet Then GetWindowsPath = Left(strBuffer, lRet)
End Function
Example: strWindows = GetWindowsPath
------------------
Serge
Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
[This message has been edited by Serge (edited 11-29-1999).]