473,386 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

run winform to console

I have written a winform application not I need to run the same app in
colsole mode without user interaction. Is there an easy way to do
this? I have all the information available as input in the seperate
file so....
Jun 27 '08 #1
2 2050
On Apr 23, 11:22 am, CSharper <cshar...@gmx.comwrote:
I have written a winform application not I need to run the same app in
colsole mode without user interaction. Is there an easy way to do
this? I have all the information available as input in the seperate
file so....
I may be completely wrong but it seems straightforward to me. I think
you should pass the file as argument to the Main method and write code
to parse the inputs from the file and set them to the respective UI
elements ( rather to the actual fields that the UI elements represent)
and trigger the logic. If you do not want the UI to appear, you can
simply add a branch in the main method for the count of input
arguments == 1. If its 0 show the UI. if not hide it.
Jun 27 '08 #2
On Apr 23, 10:51 am, mgsram <mgs...@gmail.comwrote:
On Apr 23, 11:22 am, CSharper <cshar...@gmx.comwrote:
I have written a winform application not I need to run the same app in
colsole mode without user interaction. Is there an easy way to do
this? I have all the information available as input in the seperate
file so....

I may be completely wrong but it seems straightforward to me. I think
you should pass the file as argument to the Main method and write code
to parse the inputs from the file and set them to the respective UI
elements ( rather to the actual fields that the UI elements represent)
and trigger the logic. If you do not want the UI to appear, you can
simply add a branch in the main method for the count of input
arguments == 1. If its 0 show the UI. if not hide it.
Yes, I went back and looked at it, Winform is paunched from program.cs
there I put the logic to check and see if there is any parameters
passed, if it is passed then run as GUI else console. That will sove
my problem.
Thanks.
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Bnaya | last post by:
I'm invoking the same Dll from Console application and WinForm application Both signed with SrongName. the class that I'm invoking is protected with StrongNameIdentityPermission Demand
5
by: Sunny | last post by:
Hi, If I have (hmm, at least I want to have :) ) a winform, displaying the progress of a long duration method, which is running in a separate thread, how do I implement canceling the thread, if I...
3
by: Liren Zhao | last post by:
I use some "Console.WriteLine(some strings here)" to display some debug information in my winform program. How can I get the information in my programe or same them in a text file ?
1
by: Ollie Riches | last post by:
Does anyone know a way to create a winform window that has similiar functionality to the 'Output' window in VS .Net - i.e. that basically acts like a console window but is proper MDI child of the...
2
by: Steve | last post by:
I have created a console app that simply prints out a message a couple times, then exits, here is the code: <code> for(int i = 0; i < 10; i++) { System.Threading.Thread.Sleep(500);...
6
by: WT | last post by:
Hello, Using VS2005. I have an assembly library that can be called from a Web site asp.net application or from a winform application. From this library I need to retrieve a path using simply a...
0
by: Tom | last post by:
Hi all -- this is my first posting here and I want to start by saying thank you to all the responders. I have done some searching and reading and have learned a few things I didn't even know to...
1
by: ffimbel | last post by:
Hi I would like to implement a single exe which could be invoked either as a standard windows form (no argument) or as a console app (when run with app.exe -nologo). I tried compiling the exe...
6
by: None | last post by:
Hello, my app is written in C#. Given an app file path (e.g. e:\abc.exe), how can I determine if it's a winform app or a console one. (note: abc.exe can be either a native exe or a .net one)
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.