Re: Command Line
From: Ignacio Machin \( .NET/ C# MVP \) ("Ignacio)
Date: 10/01/04
- Next message: Ignacio Machin \( .NET/ C# MVP \): "Re: combobox"
- Previous message: Greg Burns: "Re: DirectoryInfo.GetFiles is broken"
- In reply to: Jarod: "Re: Command Line"
- Next in thread: Ignacio Machin \( .NET/ C# MVP \): "Re: Command Line"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 1 Oct 2004 08:40:28 -0400
Hi,
I'm a little confused, do you need to perform any input/output to the
console?
IF you do , then you have a problem ( see my other post)
IF you dont and all you need is to accept some parameters, perform some
action ( without using in any way the console ) and then create the form you
can do it using a windows app, just change the static void Main( ) to
static void Main( string[] args ) and remember that args[0] is the first
parameter, not the program being executed !!!
cheers,
-- Ignacio Machin, ignacio.machin AT dot.state.fl.us Florida Department Of Transportation "Jarod" <Jarod@discussions.microsoft.com> wrote in message news:5ACC7860-C548-4B07-8AE2-EC007601DDE0@microsoft.com... > > Are you writing in C# or VB.NET? This is a C# group, but Sub Main looks > > very much like VB.NET... > > Yeah it was mistake, because I also use a VB.Net. > > > > Writing something with both a command line interface and a windows > > interface is relatively tricky, I believe. I suspect there's a way to > > write a console application and then have it "disconnect" from the > > console if you're running it in Windows mode, but I don't know how > > you'd do the disconnection. > > > > To use command line parameters for your Windows app, just change the > > signature of Main from > > > > static void Main() > > > > to > > > > static void Main (string[] args) > > > > and work from there. > > > > But I have something like this: > I wrote a Windows form application, and now I need to add some command line > parameter. The problem is, when I use Main(...) the program executes only the > main, no windows form interface starts :( I need the program to execute > Main(...) and then to normaly run the windows up. > Jarod
- Next message: Ignacio Machin \( .NET/ C# MVP \): "Re: combobox"
- Previous message: Greg Burns: "Re: DirectoryInfo.GetFiles is broken"
- In reply to: Jarod: "Re: Command Line"
- Next in thread: Ignacio Machin \( .NET/ C# MVP \): "Re: Command Line"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|