Newbie: start external program in .net compact framework

F

Francesco Ranieri

Hi to all,
I've started programming vb.net last week and I'm a newbie...
I don't know if this newsgroup is right... if no, please point me in right
direction!

I'm programming my navigation system with:
MS Windwows CE .net 5.00
MS .NET Compact Framework 1.0.4292.00
MS Visual Studio .Net 2003 - SP1

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("\..\MyDir\MySubDir\Notepad.exe", vbShow)

Please, can you help me? Can you give me an example?
Thanks in advance
Francesco

--
____________________________________________
Dott. Francesco Ranieri
Command and Control Systems
Divisione Difesa e Sicurezza
Engineering - Ingegneria Informatica S.p.A.
Viale Virgilio, n° 146 - 74100 - Taranto - Italy
Tel.\Fax: 099 - 735 08 90
Tel.: 099 - 730 12 66
E-Mail: (e-mail address removed)
Web Site: www.eng.it
 
H

Harry

Francesco Ranieri said:
Hi to all,
I've started programming vb.net last week and I'm a newbie...
I don't know if this newsgroup is right... if no, please point me in right
direction!

I'm programming my navigation system with:
MS Windwows CE .net 5.00
MS .NET Compact Framework 1.0.4292.00
MS Visual Studio .Net 2003 - SP1

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("\..\MyDir\MySubDir\Notepad.exe", vbShow)

Please, can you help me? Can you give me an example?
Thanks in advance
Francesco

--
____________________________________________
Dott. Francesco Ranieri
Command and Control Systems
Divisione Difesa e Sicurezza
Engineering - Ingegneria Informatica S.p.A.
Viale Virgilio, n° 146 - 74100 - Taranto - Italy
Tel.\Fax: 099 - 735 08 90
Tel.: 099 - 730 12 66
E-Mail: (e-mail address removed)
Web Site: www.eng.it

Here is a small snippet of code that show show you the way. Have a look at
the Process class:

Dim temp As String = "mailto:"
temp &= txtEmail.Text

temp &= "&Subject=Hello from FFA PaySmart"

temp &= "&Body=Attention: " & oAccount.ContactFirstName

temp &= Environment.NewLine & Glo.OperatorName

Process.Start(temp)
 
F

Francesco Ranieri

Thanks Harry,
But I think Process class is not present into .NET CF v. 1.0.
This class come into v. 2.0 or later!! (.... I can be wrong....)
At least, this say MSDN!

Unfortunately, I can't update Operative System\CF because it resides on nand
memory...
 
F

Francesco Ranieri

I explain better... I'm afraid I'm not clear owing to my inexperience and my
bad english!!!
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("\..\..\MobileNavigator\MobileNavigator.exe",
"\..\..\MobileNavigator\")
End Sub
.......................... blà blà blà
......................
Private Function ExecuteExternalProgram(ByVal strPRMPath As
String, ByVal strPRMDirectory As String) As Boolean

Dim objProcess As System.Diagnostics.... 'Here I
wish Process option into drop-down list, but it isn't there!!!!!
'Call Shell(strPRMPath , AppWinStyle.NormalFocus)
'This is inexistent
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
option... so, I can't select it!!
There's a way to solve this problem
Thanks again,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top