Public Const email = "Marco.Sambento@netc.pt?subject="
Public Const SW_SHOWNORMAL = 1
Dim WordPad As String
Global WinDir As String
Private Declare Function GetWindowsDirectory Lib "kernel32.dll" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Sub Main()
GetWinDir
frmMain.Show
End Sub
Function GetWinDir()
Dim WinDirectory As String ' receives path of Windows directory
Dim slength As Long ' receives length of the string returned
WinDirectory = Space(255) ' initialize buffer to receive the string
slength = GetWindowsDirectory(WinDirectory, 255) ' read the path of the Windows directory
WinDir = Left(WinDirectory, slength) ' extract the returned string from the buffer