Guest_imported
New member
- Jan 1, 1970
- 0
I have the code below that opens notepad...where would I put an IF statement to say either...bring the window forward or open a new one? I put comments in there but I"m not sure if that's where they go
Private Sub Command1_Click()
Dim path As String
Dim ret As Long
path = Space$(255)
ret = GetWindowsDirectory(path, 255)
path = Left$(path, ret)
path = path & "\notepad.exe" ' this is just to get the notepad path
' use this call instead of standard Shell function
' IF NOTEPAD IS OPEN - BRING FORWARD
'ELSE
Module1.ShellIt (path)
End Sub
Private Sub Command1_Click()
Dim path As String
Dim ret As Long
path = Space$(255)
ret = GetWindowsDirectory(path, 255)
path = Left$(path, ret)
path = path & "\notepad.exe" ' this is just to get the notepad path
' use this call instead of standard Shell function
' IF NOTEPAD IS OPEN - BRING FORWARD
'ELSE
Module1.ShellIt (path)
End Sub