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

C#

 
AnswerRe: File name validation Pin
David Stone5-Oct-05 11:06
sitebuilderDavid Stone5-Oct-05 11:06 
QuestionHow to get datarow from OdbcDataReader? Pin
Ming Luo5-Oct-05 9:56
Ming Luo5-Oct-05 9:56 
AnswerRe: How to get datarow from OdbcDataReader? Pin
Wjousts5-Oct-05 10:10
Wjousts5-Oct-05 10:10 
AnswerRe: How to get datarow from OdbcDataReader? Pin
Guffa5-Oct-05 10:20
Guffa5-Oct-05 10:20 
Questionforms Pin
xilefxilef5-Oct-05 8:40
xilefxilef5-Oct-05 8:40 
AnswerRe: forms Pin
Heath Stewart5-Oct-05 9:19
protectorHeath Stewart5-Oct-05 9:19 
QuestionWindow Handles and Mouse Clicks Pin
budidharma5-Oct-05 8:28
budidharma5-Oct-05 8:28 
AnswerRe: Window Handles and Mouse Clicks Pin
Heath Stewart5-Oct-05 8:35
protectorHeath Stewart5-Oct-05 8:35 
You can either enumerate top-leve windows by P/Invoking EnumWindows, or simply use Process.GetProcesses like so:
foreach (Process p in Process.GetProcesses())
{
  if (p.MainWindowHandle != IntPtr.Zero)
  {
    // Do something with p.MainWindowHandle - your wrapped HWND.
  }
}
To simulate a mouse click, you can get a window handle (from a top-level window handle, P/Invoke FindWindowEx[^] and post WM_LBUTTONDOWN and WM_LBUTTONUP, which you can find the values for in the Platform SDK.

You could also P/Invoke SendInput[^]. For further help on that, see the Platform SDK on MSDN[^] or search this forum for "SendInput". I have posted this solution a couple of times that I can remember in the past.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft

[My Articles] [My Blog]
GeneralRe: Window Handles and Mouse Clicks Pin
budidharma5-Oct-05 8:42
budidharma5-Oct-05 8:42 
GeneralRe: Window Handles and Mouse Clicks Pin
budidharma6-Oct-05 6:57
budidharma6-Oct-05 6:57 
Questionhow handle objects and code of setup forms? Pin
Anonymous5-Oct-05 8:26
Anonymous5-Oct-05 8:26 
QuestionAccessing dBase files with C# Pin
TheMajorRager5-Oct-05 8:02
TheMajorRager5-Oct-05 8:02 
AnswerRe: Accessing dBase files with C# Pin
Heath Stewart5-Oct-05 9:15
protectorHeath Stewart5-Oct-05 9:15 
GeneralRe: Accessing dBase files with C# Pin
TheMajorRager5-Oct-05 11:37
TheMajorRager5-Oct-05 11:37 
AnswerRe: Accessing dBase files with C# Pin
Heath Stewart5-Oct-05 11:40
protectorHeath Stewart5-Oct-05 11:40 
GeneralRe: Accessing dBase files with C# Pin
TheMajorRager5-Oct-05 12:14
TheMajorRager5-Oct-05 12:14 
GeneralRe: Accessing dBase files with C# Pin
TheMajorRager5-Oct-05 13:54
TheMajorRager5-Oct-05 13:54 
Questioncheckbox ques Pin
ter815-Oct-05 7:13
susster815-Oct-05 7:13 
GeneralRe: checkbox ques Pin
Guffa5-Oct-05 8:57
Guffa5-Oct-05 8:57 
AnswerRe: checkbox ques Pin
Heath Stewart5-Oct-05 9:10
protectorHeath Stewart5-Oct-05 9:10 
QuestionChanging the colour & font of (null) value datagrid entries Pin
Red_Wizard_Shot_The_Food5-Oct-05 6:58
Red_Wizard_Shot_The_Food5-Oct-05 6:58 
AnswerRe: Changing the colour & font of (null) value datagrid entries Pin
Heath Stewart5-Oct-05 8:43
protectorHeath Stewart5-Oct-05 8:43 
QuestionAdding a chart to my form Pin
james3775-Oct-05 6:25
james3775-Oct-05 6:25 
AnswerRe: Adding a chart to my form Pin
enjoycrack5-Oct-05 14:24
enjoycrack5-Oct-05 14:24 
GeneralRe: Adding a chart to my form Pin
james3776-Oct-05 7:16
james3776-Oct-05 7:16 

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.