Results 1 to 2 of 2

Thread: Running mode

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 1999
    Location
    Reynosa, Mexico
    Posts
    274
    I want to know if my App is running as an EXE or into a VB environment design. How can I know it?

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    617

    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
  •  



Click Here to Expand Forum to Full Width