|
-
Apr 20th, 2004, 10:46 AM
#1
Thread Starter
Frenzied Member
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
-
Apr 20th, 2004, 11:19 AM
#2
Hyperactive Member
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.
-
Apr 22nd, 2004, 09:00 AM
#3
Thread Starter
Frenzied Member
I know how to do it in VB6.
I need to do this in VB.NET.
Don't anthropomorphize computers -- they hate it
-
Apr 22nd, 2004, 11:57 AM
#4
Addicted Member
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
-
Apr 22nd, 2004, 12:34 PM
#5
Thread Starter
Frenzied Member
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
-
Apr 26th, 2004, 10:57 AM
#6
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|