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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mikezang
    New Member
    • May 2010
    • 4

    #1

    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?
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    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?

    Comment

    • mikezang
      New Member
      • May 2010
      • 4

      #3
      I don't care the form, but if there is no source, can I get what I want?

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        You would need to write software to interact with it then

        Comment

        • mikezang
          New Member
          • May 2010
          • 4

          #5
          Is there the simplest way to do this? for example, use vbs?

          Can you give some advise?

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Look up the SendKeys API, or write your orn program that does whatever that program does.

            Comment

            • tlhintoq
              Recognized Expert Specialist
              • Mar 2008
              • 3532

              #7
              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(objec t 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?

              Comment

              • mikezang
                New Member
                • May 2010
                • 4

                #8
                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?

                Comment

                • Plater
                  Recognized Expert Expert
                  • Apr 2007
                  • 7872

                  #9
                  I believe microsoft has a free version like "developer studio express" or something?

                  Comment

                  Working...