Windows Forms App as Console App : DOTNET
This is a discussion on Windows Forms App as Console App within the DOTNET forums in Framework and Interface Programming category; Hi I want to start a Visual Basic Windows Form app from the console by specifying parameters (this is possible in C#), is i add the following method i get a error Public Sub Main(ByVal args As String()) Console.Write(args.Length) End Sub the above method works in a console app. can someone help in this regard TIA Barry...
| DOTNET Discussion forums related to Microsoft Dot net technologies, CSharp and other related items |
![]() |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
| I want to start a Visual Basic Windows Form app from the console by specifying parameters (this is possible in C#), is i add the following method i get a error Public Sub Main(ByVal args As String()) Console.Write(args.Length) End Sub the above method works in a console app. can someone help in this regard TIA Barry |
|
#2
| |||
| |||
| Hi Barry, What error do you get and where? Anyway, do you want to use console app to start any other app (winforms or such)? If so, then use: [c#] System.Diagnostics.Process.Start("some.exe", string.Join(" ", args)) Regards, Alex Meleta [TechBlog] http://devkids.blogspot.com B> Hi B> B> I want to start a Visual Basic Windows Form app from the console by B> specifying parameters (this is possible in C#), is i add the B> following method i get a error B> B> Public Sub Main(ByVal args As String()) B> Console.Write(args.Length) B> End Sub B> the above method works in a console app. B> B> can someone help in this regard B> B> TIA B> Barry |
|
#3
| |||
| |||
| See : System.Environment.GetCommandLineArgs Seeing command line arguments as arguments for the main function is a C like language "tradition". You may want to elaborate a bit as I'm not sure to understand what you are trying to do (of couse Console.Write won"t work in a Windows applciation). My understanding ois that you want to launch a Windows application and reading possible command line arguments passed when starting this Windows application. --- Patrice "Barry" <someone@somewhere.com> a écrit dans le message de news: uB6bHujwHHA.1208@TK2MSFTNGP05.phx.gbl... > Hi > > I want to start a Visual Basic Windows Form app from the console by > specifying parameters (this is possible in C#), is i add the following > method i get a error > > Public Sub Main(ByVal args As String()) > Console.Write(args.Length) > End Sub > > the above method works in a console app. > > can someone help in this regard > > > TIA > Barry > |
|
#4
| |||
| |||
| Yes, i want to start a Winforms app (VB not C#) using command parameters "Patrice" <http://www.chez.com/scribe/> wrote in message news:%23UEG0akwHHA.5040@TK2MSFTNGP06.phx.gbl... > See : > System.Environment.GetCommandLineArgs > > Seeing command line arguments as arguments for the main function is a C > like language "tradition". > > > > You may want to elaborate a bit as I'm not sure to understand what you are > trying to do (of couse Console.Write won"t work in a Windows applciation). > My understanding ois that you want to launch a Windows application and > reading possible command line arguments passed when starting this Windows > application. > > > > --- > > Patrice > > "Barry" <someone@somewhere.com> a écrit dans le message de news: > uB6bHujwHHA.1208@TK2MSFTNGP05.phx.gbl... >> Hi >> >> I want to start a Visual Basic Windows Form app from the console by >> specifying parameters (this is possible in C#), is i add the following >> method i get a error >> >> Public Sub Main(ByVal args As String()) >> Console.Write(args.Length) >> End Sub >> >> the above method works in a console app. >> >> can someone help in this regard >> >> >> TIA >> Barry >> > > |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| difference between a console app and a win forms app | usenet | DOTNET | 4 | 09-28-2007 11:42 AM |
| Windows GUI app with Console Window? | usenet | xharbour | 1 | 09-08-2007 02:22 AM |
| Rendering Pictures with Web Forms vs Windows Forms from server | usenet | DOTNET | 5 | 08-23-2007 05:08 PM |
| wx.App console window [Windows] | usenet | Python | 3 | 07-12-2007 08:05 PM |
| Running pipelines in a Forms/Console application | usenet | Commerce server | 3 | 01-14-2005 08:38 PM |
All times are GMT -5. The time now is 08:33 AM.


