When you need to send command line arguments to you Pocket PC (Windows CE) application, you may shock to see that "Command" property (For VB users) is not supported and it throws "NotSupported" Exception. Hummmn, alternate is to use System.Environment.GetCommandLineArgs. BUT when you type this, you will shock again that GetCommandLineArgs is not member of System.Environment. hummm, what to do now?
Well, there is a work around here, fortunately. You need to define a Main function in your application, the entry point to the application. And give it signatures like this
Public Sub
Main(
ByVal
args
As
String
())
': Process the command line arguments here, available in args array
Application.Run(
New
frmMain)
End
Sub
For C# users, the should also use the same technique, by changing the signature of Main function.
So, you can now pass arguments to your Windows CE applications.
Sameers