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,
Printable View
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 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.
I know how to do it in VB6.
I need to do this in VB.NET.
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
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.
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.