Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# CA1060 P/Invoke method Pin
Richard MacCutchan15-Mar-18 2:56
mveRichard MacCutchan15-Mar-18 2:56 
GeneralRe: C# CA1060 P/Invoke method Pin
Eddy Vluggen15-Mar-18 3:13
professionalEddy Vluggen15-Mar-18 3:13 
GeneralRe: C# CA1060 P/Invoke method Pin
Richard MacCutchan15-Mar-18 3:56
mveRichard MacCutchan15-Mar-18 3:56 
GeneralRe: C# CA1060 P/Invoke method Pin
OriginalGriff13-Mar-18 0:14
mveOriginalGriff13-Mar-18 0:14 
AnswerRe: C# CA1060 P/Invoke method Pin
#realJSOP12-Mar-18 2:11
mve#realJSOP12-Mar-18 2:11 
GeneralRe: C# CA1060 P/Invoke method Pin
Member 1371048712-Mar-18 7:12
Member 1371048712-Mar-18 7:12 
GeneralRe: C# CA1060 P/Invoke method Pin
#realJSOP12-Mar-18 7:36
mve#realJSOP12-Mar-18 7:36 
QuestionC#, process, TPL tasks, following a process Pin
Dwayne Barsotta10-Mar-18 21:00
Dwayne Barsotta10-Mar-18 21:00 
I'm starting to plan out a project and I need some help with ideas.

Situation: my company uses a software managed by a third party company. I do not know exactly how this works but the link to this program looks like "113.444.767.123/bin/some file". This is started though iexplorer then switches over from the iexplorer process to a different process (I have the name).

We recently had then create a test company for training purposes. I can make two separate desktop icons easy enough. But once the program is running, if both the training and real companies are running at the same time, it is hard to determine the difference.

I want to change the taskbat icon, and pop a message balloon when the user switches between the two.

First problem, windows will use the desktop icon before the app icon, so I'm going to create a bootloader app that is launched from the desktop, it will open my real app and kill itself. Now I will have access to change the taskbar icon through code.

Second problem, I can't just call the process the company program and follow the returned processId because the original iexplorer ID calls the other program, thus changing ID's.
My thoughts: when I start the process from my program I start a loop the constantly calls getProcesses and loops through each one until the actual program process name is found. Once found I'll have the ID off the correct process and can match up icons based on that.

Third problem monitoring what process is active to change the icons.
My thoughts were to use TPL tasks, start a new async task that runs a loop to get the ForgroundWindowGetID and compare it to the list of IDs for the program I'm tracking. This is were in a little murky, can I send the ID back to my main program to handle the icons and balloons while still keeping the async task running, or do I need to stop the async task when the ID changes, then restart the task?
AnswerRe: C#, process, TPL tasks, following a process Pin
Gerry Schmitz11-Mar-18 7:48
mveGerry Schmitz11-Mar-18 7:48 
AnswerRe: C#, process, TPL tasks, following a process Pin
#realJSOP12-Mar-18 1:17
mve#realJSOP12-Mar-18 1:17 
GeneralRe: C#, process, TPL tasks, following a process Pin
Dwayne Barsotta13-Mar-18 19:31
Dwayne Barsotta13-Mar-18 19:31 
GeneralRe: C#, process, TPL tasks, following a process Pin
Gerry Schmitz14-Mar-18 6:30
mveGerry Schmitz14-Mar-18 6:30 
GeneralRe: C#, process, TPL tasks, following a process Pin
Matt T Heffron15-Mar-18 8:13
professionalMatt T Heffron15-Mar-18 8:13 
GeneralRe: C#, process, TPL tasks, following a process Pin
Gerry Schmitz15-Mar-18 11:32
mveGerry Schmitz15-Mar-18 11:32 
Questionmethod and parameters Pin
Member 137173708-Mar-18 23:50
Member 137173708-Mar-18 23:50 
AnswerRe: method and parameters Pin
OriginalGriff8-Mar-18 23:56
mveOriginalGriff8-Mar-18 23:56 
GeneralRe: method and parameters Pin
Member 137173709-Mar-18 0:19
Member 137173709-Mar-18 0:19 
GeneralRe: method and parameters Pin
Richard Deeming9-Mar-18 0:36
mveRichard Deeming9-Mar-18 0:36 
GeneralRe: method and parameters Pin
Member 137173709-Mar-18 0:47
Member 137173709-Mar-18 0:47 
GeneralRe: method and parameters Pin
OriginalGriff9-Mar-18 1:24
mveOriginalGriff9-Mar-18 1:24 
AnswerRe: method and parameters Pin
#realJSOP9-Mar-18 6:20
mve#realJSOP9-Mar-18 6:20 
AnswerRe: method and parameters Pin
Luc Pattyn9-Mar-18 9:20
sitebuilderLuc Pattyn9-Mar-18 9:20 
AnswerRe: method and parameters Pin
BillWoodruff10-Mar-18 18:43
professionalBillWoodruff10-Mar-18 18:43 
QuestionWPF: Groupbox background image Pin
Hervend8-Mar-18 19:12
Hervend8-Mar-18 19:12 
AnswerRe: WPF: Groupbox background image Pin
Richard MacCutchan8-Mar-18 20:58
mveRichard MacCutchan8-Mar-18 20:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.