'first create control arraylist al1 on the form.
FileSearch(al1,AppPath,"*.exe") 'gather all exe files from application directory and assign file list to arraylist 'al1'.
'you can display each file names excluding file path something like:
For i = 0 To al1.count-1
Msgbox(SubString (al1.item(i), StrLength(AppPath)+1,StrLength(al1.item(i))+1-StrLength(AppPath)))
Next
Wrong forum - this is about Windows Mobile, hence the reference to an exe file..Activity.Title
Could I ask how? Thanks in advance.It is easy to get the actual filename on the desktop
I have searched and found informations about this here:P/Invoke to native code
Sub App_Start
Form1.Show
obj.New1(False)
oProcess.New1(False)
Method3
End Sub
Sub Method1
'System.Reflection.Assembly.GetEntryAssembly().Location
obj.CreateNew("System.Reflection.Assembly" & obj.System_Mscorlib)
obj.Value = obj.RunMethod("GetEntryAssembly")
label1.Text = obj.GetProperty("Location")
End Sub
Sub Method2
'System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName:
oProcess.CreateNew("System.Diagnostics.Process" & oProcess.System_NS)
oProcess.Value = oProcess.RunMethod("GetCurrentProcess")
obj.CreateNew("System.Diagnostics.ProcessModule" & oProcess.System_NS)
obj.Value = oProcess.GetProperty("MainModule")
label1.Text = obj.GetProperty("FileName")
End Sub
Sub Method3
'System.Windows.Forms.Application.ExecutablePath
obj.CreateNew("System.Windows.Forms.Application" & obj.System_Windows_Forms)
label1.Text = obj.GetProperty("ExecutablePath")
End Sub
That's what I said before.Oh, so none of them work on Device