473,387 Members | 1,891 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,387 software developers and data experts.

How to run a console app without console or emulate a button click?

I have a c# application with a console window, the application will start to download data after I click download button.

I hope that I can use it to download data directly, I mean, when I run it, the app will start to download before I click download button, what can I do?
May 6 '10 #1
8 2693
Plater
7,872 Expert 4TB
Put the code that runs in the button click into the load function of the form, or in the main() function if you don't need the form?
May 6 '10 #2
I don't care the form, but if there is no source, can I get what I want?
May 6 '10 #3
Plater
7,872 Expert 4TB
You would need to write software to interact with it then
May 6 '10 #4
Is there the simplest way to do this? for example, use vbs?

Can you give some advise?
May 6 '10 #5
Plater
7,872 Expert 4TB
Look up the SendKeys API, or write your orn program that does whatever that program does.
May 6 '10 #6
tlhintoq
3,525 Expert 2GB
I have a c# application with a console window, the application will start to download data after I click download button
Let me guess... This is a windows forms application, that you then changed to a console application - so you could have a console window. Right?

I don't care the form, but if there is no source, can I get what I want?
What does that even mean? 'I don't care the form' We can't help you if you can't form a sentence that describes your situation or problem.

If you have a form with a button then you can call the button code after the form loads. In the form1_load(object sender, eventargs e) method, call your button_click method


but if there is no source?
Are you working on your own project/code? Or are you trying to find a way to manipulate some other program that you didn't write and you don't have the code for?
May 6 '10 #7
Hi, tlhintoq

Thanks for your message, sorry for my poor English:(

In fact, I talked about a open source program protra, It is a window app made by VS2008.

I hope someone can help me to modify and compile it for me because I don't have VS2008 environment.

Can you help me?
May 7 '10 #8
Plater
7,872 Expert 4TB
I believe microsoft has a free version like "developer studio express" or something?
May 7 '10 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Waqas Pitafi | last post by:
Hi, 3rd day is already gone without any solution. My problem is, I have a Windows Server 2003 sp1 machine as my development platform having NTFS filesystem. Other notable components installed...
3
by: Imran Aziz | last post by:
Hello All, I have a search text and button that post data and my button handler filters the repeater control. However when the button is clicked the first time. The page_load event is being called...
24
by: John Gabriel | last post by:
CreateDialogIndirect() fires my Radio button click function without the radio button having being clicked. I am using VC++ 2003.NET. I believe this is yet another Microsoft bug. Have checked dialog...
4
by: Winista | last post by:
I have a page with bunch of user controls and standard controls on the page. And then I have a Button control on the page which is used to save the data on server side. All was working fine and...
2
by: lavu | last post by:
I am trying to start a C# GUI App and automatically trigger a button click event. However when I add a statement btn.PerformClick to my Main() I get an error that a class was expected . This...
17
by: Eric | last post by:
I'm new to JavaScript and I wrote this code to play with. Oddly, if I enter text in a box and then press the button, I only get the onChange event for the text box and not the button's onclick...
5
by: Joja | last post by:
I have form with one submit button. All i want to create is to allow user to make JUST ONE button click. After that click, button will be still displayed but it will be disabled. How to make this ?
4
by: =?Utf-8?B?QVJUTUlD?= | last post by:
i have a back button inside the code i have the following: Response.Redirect("javaScript:history.go(-1)"); I can't get the thing to work like i want it to, i want the user to click the button...
8
by: Deft.Jab | last post by:
This problem only exists in IE, due to UI restrictions I'm using a href in an error label to bring up a modal popup. I'm using a callback to filter a grid on the popup. The problem: The href...
2
by: Max2006 | last post by:
Hi, I have a simple form with a button on it. After a button click postback, anytime user press F5 (browser page refresh), the button's OnClick event handler is called again without the button...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.