JackT 1 Posted September 18 When right clicking my programs toolbar button it open the JumpList menu. I can add a Task which runs a program when selected with command line parameters ? Is there any way to simply send a command to the program generating the taskbar button so that it executes the command against the current instance ? I just want to add a function to show a hidden window. Thanks for any help in advance Jack T Share this post Link to post
JackT 1 Posted September 18 (edited) My work around is to create a dll and call a function in it using RunDLL32 as the Task. I pass in the windows handle of my main window along with the name of the function I want to execute. The DLL posts a message to the main program window to make it do the thing I wanted it to do. Edited September 18 by JackT Share this post Link to post
FredS 141 Posted September 18 I used an EXE built in an older version (smaller size), it parses the cmdline, registers a mutual Windows Message then sends it back in the form of a WM_CopyData message. Note: WM_CopyData works across Application and Bitness boundaries Share this post Link to post
Remy Lebeau 1677 Posted September 19 (edited) 20 hours ago, FredS said: I used an EXE built in an older version (smaller size), it parses the cmdline, registers a mutual Windows Message then sends it back in the form of a WM_CopyData message. Or, you could just have the main EXE do that same work in its startup code to send the message to an existing instance of itself. This has the added benefit that if there is no existing instance running, the new instance can continue to load itself normally, and then take the requested action when ready. Edited September 19 by Remy Lebeau 1 Share this post Link to post
FredS 141 Posted September 20 14 hours ago, Remy Lebeau said: Or, you could just have the main EXE do that same work in its startup code to send the message to an existing instance of itself. This has the added benefit that if there is no existing instance running, the new instance can continue to load itself normally, and then take the requested action when ready. I tested that for speed and it was too slow.. Share this post Link to post
Anders Melander 2137 Posted September 20 15 hours ago, FredS said: I tested that for speed and it was too slow.. It shouldn't be; The image has already been loaded so loading a second instance should be very fast. Of course, if the application is doing a lot of slow stuff in the startup code (initialization sections, etc.), before the message is sent, then it will be slow. Share this post Link to post
FredS 141 Posted September 22 On 9/20/2025 at 3:07 PM, Anders Melander said: Of course, if the application is doing a lot of slow stuff It was a notably slower response time. Think about it, you need to go through all the initialization and class constructors of all code used. DevEx, UniDac and more.. 1 Share this post Link to post
Anders Melander 2137 Posted September 22 52 minutes ago, FredS said: you need to go through all the initialization and class constructors of all code used. Fair point. Share this post Link to post