F
Francesco Ranieri
Hi to all,
I've started programming vb.net last week and I'm a newbie...
I'm programming an application for my navigation system.
1) Development tool is: MS Visual Studio .Net 2003 - SP1
2) Navigation system is equipped with:
a) MS Windwows CE .net 5.00
b) MS .NET Compact Framework 1.0.4292.00
I've a question for you:
I wish to "start external program" programmatically, on button click event.
I'm Visual Basic v. 6.0 expert and Shell(), ShellExecute() and
ShellExecuteEx() were very useful, but into vb.net language they are not!???
I wish the vb.net equivalent of vb60 instruction:
retVal=Shell("\MySubDir\Notepad.exe", vbShow)
I've tried "ShellExecute API" but gives me a NotSupportedException
I've tried to use "Process class" but I've not found it into CF.
I explain better... following a summary of my code into form
"frmNavSystem.vb"
----------------------------------------------------------------------------
------------------------
Imports System.Windows.Forms
Imports System.Runtime.InteropServices
Imports Microsoft.VisualBasic
Public Class frmNavSystem
Inherits System.Windows.Forms.Form
.......................... blà blà blà .....................
Private Sub pcxButton_TopLeft_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles pcxButton_TopLeft.Click
Call ExecuteExternalProgram("\MySubDir\MyApp.exe", "\MySubDir\")
End Sub
.......................... blà blà blà .....................
Private Function ExecuteExternalProgram(ByVal strPRMPath As String, ByVal
strPRMDirectory As String) As Boolean
'********************************* HERE IS THE QUESTION
*****************************
'***************** Here I wish "Process class" option into drop-down
list, but it isn't there!!!!!
'Dim objProcess As System.Diagnostics.{}
'************ This is inexistent
'Call Shell(strPRMPath , AppWinStyle.NormalFocus)
'********************************* HERE IS THE QUESTION
*****************************
End Function
.......................... blà blà blà .....................
End Class
----------------------------------------------------------------------------
------------------------
Besides, Project => MyProject property => Common Properties => Imported
reference => List of name spaces includes only "System".
The Shell() function doesn't exist into .net (? I think ?), because
generation gives me an error.
The drop-down list of System.Diagnostic.{--} doesn't give me the .Process
class option... so, I can't select it!!
Please, can you help me? Can you give me an example?
Thanks in advance
Francesco
I've started programming vb.net last week and I'm a newbie...
I'm programming an application for my navigation system.
1) Development tool is: MS Visual Studio .Net 2003 - SP1
2) Navigation system is equipped with:
a) MS Windwows CE .net 5.00
b) MS .NET Compact Framework 1.0.4292.00
I've a question for you:
I wish to "start external program" programmatically, on button click event.
I'm Visual Basic v. 6.0 expert and Shell(), ShellExecute() and
ShellExecuteEx() were very useful, but into vb.net language they are not!???
I wish the vb.net equivalent of vb60 instruction:
retVal=Shell("\MySubDir\Notepad.exe", vbShow)
I've tried "ShellExecute API" but gives me a NotSupportedException
I've tried to use "Process class" but I've not found it into CF.
I explain better... following a summary of my code into form
"frmNavSystem.vb"
----------------------------------------------------------------------------
------------------------
Imports System.Windows.Forms
Imports System.Runtime.InteropServices
Imports Microsoft.VisualBasic
Public Class frmNavSystem
Inherits System.Windows.Forms.Form
.......................... blà blà blà .....................
Private Sub pcxButton_TopLeft_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles pcxButton_TopLeft.Click
Call ExecuteExternalProgram("\MySubDir\MyApp.exe", "\MySubDir\")
End Sub
.......................... blà blà blà .....................
Private Function ExecuteExternalProgram(ByVal strPRMPath As String, ByVal
strPRMDirectory As String) As Boolean
'********************************* HERE IS THE QUESTION
*****************************
'***************** Here I wish "Process class" option into drop-down
list, but it isn't there!!!!!
'Dim objProcess As System.Diagnostics.{}
'************ This is inexistent
'Call Shell(strPRMPath , AppWinStyle.NormalFocus)
'********************************* HERE IS THE QUESTION
*****************************
End Function
.......................... blà blà blà .....................
End Class
----------------------------------------------------------------------------
------------------------
Besides, Project => MyProject property => Common Properties => Imported
reference => List of name spaces includes only "System".
The Shell() function doesn't exist into .net (? I think ?), because
generation gives me an error.
The drop-down list of System.Diagnostic.{--} doesn't give me the .Process
class option... so, I can't select it!!
Please, can you help me? Can you give me an example?
Thanks in advance
Francesco