Click here to Skip to main content
16,010,876 members
Home / Discussions / C#
   

C#

 
QuestionReplacing method/logic in class and runtime. Pin
Member 232448319-Mar-09 9:44
Member 232448319-Mar-09 9:44 
AnswerRe: Replacing method/logic in class and runtime. Pin
Anthony Mushrow19-Mar-09 9:56
professionalAnthony Mushrow19-Mar-09 9:56 
GeneralRe: Replacing method/logic in class and runtime. Pin
Member 232448319-Mar-09 10:23
Member 232448319-Mar-09 10:23 
GeneralRe: Replacing method/logic in class and runtime. Pin
Anthony Mushrow19-Mar-09 13:40
professionalAnthony Mushrow19-Mar-09 13:40 
AnswerRe: Replacing method/logic in class and runtime. Pin
Giorgi Dalakishvili19-Mar-09 9:57
mentorGiorgi Dalakishvili19-Mar-09 9:57 
QuestionSendInput from the Windows API Pin
Steven Bostock19-Mar-09 9:43
Steven Bostock19-Mar-09 9:43 
AnswerRe: SendInput from the Windows API Pin
Luc Pattyn19-Mar-09 12:37
sitebuilderLuc Pattyn19-Mar-09 12:37 
GeneralRe: SendInput from the Windows API [modified] Pin
Steven Bostock19-Mar-09 13:34
Steven Bostock19-Mar-09 13:34 
Hi,

thanks for the reply. When I i state it doesn't work I mean the code executes but no keystrokes or mouse clicks are synthesised/played back and no Win32 error is reported back as well hence my confusion.

the definition of StructInput is that it is a variable of the type INPUT which is the struct shown below. I also provided my definiton of the MOUSEINPUT struct
[StructLayout(LayoutKind.Sequential)]
struct MOUSEINPUT
{
   public int dx;
   public int dy;
   public uint mouseData;
   public uint dwFlags;
   public uint time;
   public IntPtr dwExtraInfo;
}

[StructLayout(LayoutKind.Explicit)]
struct INPUT
{
    [FieldOffset(0)]
    public int type;
    [FieldOffset(4)] //*
    public MOUSEINPUT mi;
    [FieldOffset(4)] //*
    public KEYBDINPUT ki;
}


I wasn't aware that the x and y co-ordinates of the mouse MOUSEINPUT struct were relative to the application i wanted to synthesize the inputs which may be where im going wrong.
[i tried this but made no difference]

again thanks for the reply

modified on Friday, March 20, 2009 8:07 AM

QuestionHow do I call a real refresh of desktop icons? Pin
bbranded19-Mar-09 8:50
bbranded19-Mar-09 8:50 
AnswerRe: How do I call a real refresh of desktop icons? Pin
Alan N19-Mar-09 12:24
Alan N19-Mar-09 12:24 
GeneralRe: How do I call a real refresh of desktop icons? [modified] Pin
bbranded19-Mar-09 15:56
bbranded19-Mar-09 15:56 
GeneralRe: How do I call a real refresh of desktop icons? Pin
bbranded20-Mar-09 3:33
bbranded20-Mar-09 3:33 
GeneralRe: How do I call a real refresh of desktop icons? Pin
bbranded20-Mar-09 3:49
bbranded20-Mar-09 3:49 
AnswerRe: How do I call a real refresh of desktop icons? [modified] Pin
bbranded20-Mar-09 4:40
bbranded20-Mar-09 4:40 
QuestionWriting a basic virus scanner Pin
deviao19-Mar-09 8:37
deviao19-Mar-09 8:37 
AnswerRe: Writing a basic virus scanner Pin
Christian Graus19-Mar-09 10:43
protectorChristian Graus19-Mar-09 10:43 
GeneralRe: Writing a basic virus scanner Pin
Mark Churchill19-Mar-09 15:43
Mark Churchill19-Mar-09 15:43 
QuestionStrange Visual Studio (C#) question... Pin
Jacob Dixon19-Mar-09 7:33
Jacob Dixon19-Mar-09 7:33 
AnswerRe: Strange Visual Studio (C#) question... Pin
tech60319-Mar-09 17:50
tech60319-Mar-09 17:50 
GeneralRe: Strange Visual Studio (C#) question... Pin
Jacob Dixon19-Mar-09 18:04
Jacob Dixon19-Mar-09 18:04 
QuestionCommunicating with windows services Pin
mirko8619-Mar-09 7:18
mirko8619-Mar-09 7:18 
AnswerRe: Communicating with windows services Pin
Giorgi Dalakishvili19-Mar-09 7:26
mentorGiorgi Dalakishvili19-Mar-09 7:26 
AnswerRe: Communicating with windows services Pin
led mike19-Mar-09 7:35
led mike19-Mar-09 7:35 
GeneralRe: Communicating with windows services Pin
mirko8619-Mar-09 7:43
mirko8619-Mar-09 7:43 
JokeRe: Communicating with windows services Pin
musefan19-Mar-09 7:51
musefan19-Mar-09 7:51 

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.