|
-
Oct 10th, 2000, 04:23 PM
#1
Thread Starter
Hyperactive Member
I want to know if my App is running as an EXE or into a VB environment design. How can I know it?
-
Oct 10th, 2000, 05:20 PM
#2
Fanatic Member
hmm
try this
Private Declare Function GetModuleFileName Lib "kernel32" Alias "GetModuleFileNameA" (ByVal hModule As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long
Public Function autonome() As Boolean
Dim strFileName As String
Dim lngCount As Long
strFileName = String(255, 0)
lngCount = GetModuleFileName(App.hInstance, strFileName, 255)
strFileName = Left(strFileName, lngCount)
Dim p
p = UCase(Right(strFileName, 7))
'Attention here
If p <> "VB6.EXE" Then
'code autonome
ideorexe = True
Else
'function under VB6
ideorexe = False
End If
End Function
Bye
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|