Click here to Skip to main content
15,909,953 members
Home / Discussions / C#
   

C#

 
GeneralRe: Windows Timer event, with other program Pin
Nader Elshehabi14-Sep-06 12:26
Nader Elshehabi14-Sep-06 12:26 
GeneralRe: Windows Timer event, with other program Pin
T.Willey14-Sep-06 12:55
T.Willey14-Sep-06 12:55 
GeneralRe: Windows Timer event, with other program Pin
T.Willey14-Sep-06 13:10
T.Willey14-Sep-06 13:10 
GeneralRe: Windows Timer event, with other program Pin
Nader Elshehabi14-Sep-06 13:41
Nader Elshehabi14-Sep-06 13:41 
GeneralRe: Windows Timer event, with other program Pin
T.Willey14-Sep-06 14:02
T.Willey14-Sep-06 14:02 
GeneralRe: Windows Timer event, with other program Pin
Nader Elshehabi14-Sep-06 14:28
Nader Elshehabi14-Sep-06 14:28 
GeneralRe: Windows Timer event, with other program [modified] Pin
T.Willey15-Sep-06 7:29
T.Willey15-Sep-06 7:29 
AnswerRe: Windows Timer event, with other program Pin
Nader Elshehabi15-Sep-06 9:21
Nader Elshehabi15-Sep-06 9:21 
Hello

Sorry I saw your post late. Here is the way -if you still want it-.

First, you can't do that using C# alone. you have to make some Windows API unmanaged functions. The functions import code is:
[DllImport("User32.dll", CharSet=CharSet.Auto)]
private static extern bool SetForegroundWindow(IntPtr hWnd);

Now this loop will go through all top-level windows, check their title, then activate the one that has "Autocad" word on it:
foreach(Process P in Process.GetProcesses())
{
    if (P.MainWindowTitle.Length > 0 && P.MainWindowTitle.IndexOf("Autocad") != -1)
    SetForegroundWindow(P.MainWindowHandle);
}

One flow is that all windows that has "Autocad" word on it will be activated sequentily. If you know more word in a single phrase -ie. as a sentence- this should narrow this error margin.

RegardsRose | [Rose]

GeneralRe: Windows Timer event, with other program Pin
T.Willey15-Sep-06 10:03
T.Willey15-Sep-06 10:03 
GeneralRe: Windows Timer event, with other program Pin
Nader Elshehabi15-Sep-06 12:52
Nader Elshehabi15-Sep-06 12:52 
QuestionHotKey Indicator Pin
mtone14-Sep-06 5:18
mtone14-Sep-06 5:18 
AnswerRe: HotKey Indicator Pin
Not Active14-Sep-06 5:28
mentorNot Active14-Sep-06 5:28 
AnswerRe: HotKey Indicator Pin
John Baird14-Sep-06 5:55
John Baird14-Sep-06 5:55 
AnswerRe: HotKey Indicator Pin
Nader Elshehabi14-Sep-06 9:43
Nader Elshehabi14-Sep-06 9:43 
Questionchange form background image Pin
Muller214-Sep-06 4:53
Muller214-Sep-06 4:53 
AnswerRe: change form background image Pin
Judah Gabriel Himango14-Sep-06 5:13
sponsorJudah Gabriel Himango14-Sep-06 5:13 
GeneralRe: change form background image Pin
Muller214-Sep-06 5:49
Muller214-Sep-06 5:49 
GeneralRe: change form background image Pin
User 665814-Sep-06 6:16
User 665814-Sep-06 6:16 
QuestionConvert existing classes to have .designer.cs files Pin
amymarie314-Sep-06 4:53
amymarie314-Sep-06 4:53 
AnswerRe: Convert existing classes to have .designer.cs files Pin
Judah Gabriel Himango14-Sep-06 5:15
sponsorJudah Gabriel Himango14-Sep-06 5:15 
QuestionCreateFontInderect Pin
Draders2314-Sep-06 4:30
Draders2314-Sep-06 4:30 
Questionhow can i use UI Wizard in c# Pin
Parshant Verma14-Sep-06 4:29
Parshant Verma14-Sep-06 4:29 
AnswerRe: how can i use UI Wizard in c# Pin
Judah Gabriel Himango14-Sep-06 5:09
sponsorJudah Gabriel Himango14-Sep-06 5:09 
Questionhow to add image in crystal report Pin
cauvang14-Sep-06 4:04
cauvang14-Sep-06 4:04 
AnswerRe: how to add image in crystal report Pin
Sebastien Lachance14-Sep-06 4:25
Sebastien Lachance14-Sep-06 4:25 

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.