Results 1 to 6 of 6

Thread: Application Mode

  1. #1

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Application Mode

    Hey,

    I have an application that exposes classes and can be started remotely.
    How can I find out whether the application was started by double clicking on the EXE or if it being started remotely?
    Is there a property or something?

    THanks,
    Don't anthropomorphize computers -- they hate it

  2. #2
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    342
    Don't know if VB.NET is the same as VB6.0 in this regard, but VB6.0 does it like this:

    If App.StartMode = vbSModeStandalone Then
    End If

    Straight from MSDN:

    VB6.0
    StartMode

    VB.NET
    No equivalent. Logging in Visual Basic .NET is handled via Event Logs. For more information, see Creating and Removing Custom Event Logs.

  3. #3

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950
    I know how to do it in VB6.

    I need to do this in VB.NET.
    Don't anthropomorphize computers -- they hate it

  4. #4
    Addicted Member
    Join Date
    Aug 2002
    Posts
    224
    Hi,

    Checking if the program is running and if to enable another one to run

    Put the next lines at Form1_Load:

    If UBound(Diagnostics.Process.GetProcessesByName _
    (Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0 Then

    MsgBox("äúåëðéú ëáø ôåòìú" & vbCrLf & vbCrLf & "The Program Is Already Running", _
    MsgBoxStyle.Critical, "http://www.geocities.com/yulyos4vbnet")

    End

    End If


    Watch and copy examples of Source Code in VB.NET
    http://www.geocities.com/yulyos4vbnet

  5. #5

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950
    That will only tell me whether teh thing is running or not. I need to know how the program was started. Whether by executing the exe or by automation.
    Don't anthropomorphize computers -- they hate it

  6. #6
    Hyperactive Member
    Join Date
    Apr 2004
    Posts
    342
    Here it is cut and pasted correctly:

    App Object Changes in Visual Basic .NET

    StartMode - No equivalent. In Visual Basic 6.0, this property was used to start an application as an ActiveX component. ActiveX component creation is not supported in Visual Studio .NET.

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