locked
Launching Application RRS feed

  • Question

  • Hello All,

    I would like to develop an application which should commit the following requirements.

    1) When the application get installed on the device, it should get activated in the Background and not Foreground.
    2) When user selects any of the provided shortcuts (StartMenu/Application folder etc etc..) then it should come to foreground which was running in background as per 1.

    In short the application should behave like Background process at first time whent it starts after installation and for the next launch action ( here i mean when user selects one of the short-cut provided for the application) it should display the UI.
    The important part i would like to know is, How I can identify the user action against the short-cut of the application which is already running in the background?

    Thanks in adv.
    Regards,
    Amit Rote
    Monday, June 1, 2009 9:21 AM

Answers

All replies

  • Hi Amit,

    In the loading of your application or in constrcutor, try to hide your form by using the following link

    http://jajahdevblog.com/jasmine/?p=41

    When you click on the icon or shortcut, automatically it will open the running instance of the application.


    Please let me know if you have any queries regarding this.

    Regards,
    Malleswar
    Monday, June 1, 2009 9:58 AM
  • Hi Amit,

    In the loading of your application or in constrcutor, try to hide your form by using the following link

    http://jajahdevblog.com/jasmine/?p=41

    When you click on the icon or shortcut, automatically it will open the running instance of the application.


    Please let me know if you have any queries regarding this.

    Regards,
    Malleswar

    Thanks Malleswar,

    using ShowWindow() API its not hiding the form.

    let me more clear about the requirement / flow of the app.

    The actual requirement is, when user installs the cab file then, the application should not launch its UI (i.e. form). But when the user selects any of the shortcut of the application then it should launch the UI. In otherway the first when application will start to process then it will start some sync process with the server and for which the UI is not at all required. One more thing i would like add is that, now onwards this syncing process will be continue. But when user selects any of the shortcut then the application should launch the UI.(e.g. say some sync settings panel).

    Waiting for the ans :)
    Thanks and Regards,
    Amit Rote
    Monday, June 1, 2009 10:15 AM
  • Hi Amit,

    As I know, when you isntall the CAB, UI will not be launched. It will be launched only either you click on short cut or exe.


    when user opening the application ( for the first time), try to call showwindow in your contsructor or form_load event. So that it will be minimized before it shows a from to the user.

    It will be shown the running instance of the application, when user clicks on shortcut or .exe.


    Please let me know if my understanding is wrong.


    Regards,
    Malleswar
    Monday, June 1, 2009 11:21 AM
  • Hi malleswar,

    You are right that after installing application user need to launch it using the shortcut only.

    But actually its requirement of the targeted application that, it should get launched when installation complete.

    I gues to achive this we need to write one application through VC++ which itself will start to install the cab file of actual application and once completing the installation process it will start that application also. right? ( If yes i need help regarding the same :) )
    Now, when the actual application will start after this installation process, it should not launch any UI part of the application. (Here the user is under impression that application is just installed and not launched. So to launch the application user will select the shortcut of the application.) So when the user selects the shortcut then the application UI should get launched. I mean here the UI (Form) of the application will get activated.
    The idea behind this flow is that, we need to start some sync process immediately when the app get installed. But in case of UI it depends on the user when to launch it.

    I appreciate if anybody have any different idea to achive the same.
    Hope now it is clear.

    Regards,
    Amit Rote
    Monday, June 1, 2009 11:55 AM
  • Hi Amit Rote,

    You can try launching the application after installing the application by using Setup32.dll. I never tried this. but here you will have a possiblity to write code, by using that you can try to launch the application.

    Check this links.

    http://msdn.microsoft.com/en-us/library/aa924308.aspx

    http://www.christec.co.nz/blog/archives/119


    Regards,
    Malleswar


    • Marked as answer by Amit Rote Tuesday, June 2, 2009 1:29 PM
    Monday, June 1, 2009 4:06 PM
  • Thanks Malleswar.

    I got what exactly i am looking for.

    Hoping same help for all UnAnswered Threads. :)

    Regards,
    Amit Rote
    • Marked as answer by Amit Rote Tuesday, June 2, 2009 1:29 PM
    Tuesday, June 2, 2009 1:28 PM