Click here to Skip to main content
15,886,519 members
Home / Discussions / C#
   

C#

 
GeneralRe: EntityFramework Disable Lazy loading Pin
Dave Kreskowiak5-Mar-15 12:09
mveDave Kreskowiak5-Mar-15 12:09 
AnswerRe: EntityFramework Disable Lazy loading Pin
Gerry Schmitz5-Mar-15 12:23
mveGerry Schmitz5-Mar-15 12:23 
Questionsolved: WinForms: What would make closing a MainForm require two Clicks on the ControlBox ? Pin
BillWoodruff5-Mar-15 2:08
professionalBillWoodruff5-Mar-15 2:08 
AnswerRe: WinForms: What would make closing a MainForm require two Clicks on the ControlBox ? Pin
Alan N5-Mar-15 2:58
Alan N5-Mar-15 2:58 
GeneralRe: WinForms: What would make closing a MainForm require two Clicks on the ControlBox ? Pin
BillWoodruff5-Mar-15 3:50
professionalBillWoodruff5-Mar-15 3:50 
QuestionMemoryStream with PDF Pin
Jassim Rahma4-Mar-15 22:18
Jassim Rahma4-Mar-15 22:18 
AnswerRe: MemoryStream with PDF Pin
Pete O'Hanlon4-Mar-15 22:21
mvePete O'Hanlon4-Mar-15 22:21 
QuestionSend Mouse motion using sendMessage() Pin
Omarkkk4-Mar-15 22:10
Omarkkk4-Mar-15 22:10 
Hi all,,
I was reading about sending a mouse motion to for example Notepad..
I tried to implement something to help me send a right click to Notepad so when the event fired it shows that there is a right click fired and the right click menu appears in the notepad..

I wrote this code but I'm not sure it's correct -no error but it doesn't work..

// to send the mouse Message
C#
[DllImport("user32.dll")]
       public static extern int SendMessage(int hWnd,uint Msg, int wParam,int lParam);


// mouse input

C#
private const uint WM_RBUTTONDOWN = 0x0204;
private const uint WM_RBUTTONUP = 0x0205;


// event handler

C#
private void button6_Click(object sender, EventArgs e)
        {
int window = FindWindow(null, "Notepad");
            SendMessage(window, WM_RBUTTONDOWN, 0, 0);
            SendMessage(window, WM_RBUTTONUP, 0, 0);
        }


it does not work for me,,
Do I need to add extra code or functions for that??

Thanks Smile | :)
AnswerRe: Send Mouse motion using sendMessage() Pin
Gerry Schmitz4-Mar-15 23:52
mveGerry Schmitz4-Mar-15 23:52 
GeneralRe: Send Mouse motion using sendMessage() Pin
BillWoodruff5-Mar-15 3:48
professionalBillWoodruff5-Mar-15 3:48 
GeneralRe: Send Mouse motion using sendMessage() Pin
Gerry Schmitz5-Mar-15 5:27
mveGerry Schmitz5-Mar-15 5:27 
GeneralRe: Send Mouse motion using sendMessage() Pin
Pete O'Hanlon5-Mar-15 7:12
mvePete O'Hanlon5-Mar-15 7:12 
GeneralRe: Send Mouse motion using sendMessage() Pin
Gerry Schmitz5-Mar-15 11:00
mveGerry Schmitz5-Mar-15 11:00 
Questionhow to design E R D for language dictionary Pin
Member 112641494-Mar-15 19:02
Member 112641494-Mar-15 19:02 
AnswerRe: how to design E R D for language dictionary Pin
OriginalGriff4-Mar-15 19:43
mveOriginalGriff4-Mar-15 19:43 
AnswerRe: how to design E R D for language dictionary Pin
Pete O'Hanlon4-Mar-15 22:19
mvePete O'Hanlon4-Mar-15 22:19 
QuestionRunning forms in a thread in .NET Pin
landersohn694-Mar-15 8:45
landersohn694-Mar-15 8:45 
AnswerRe: Running forms in a thread in .NET PinPopular
Eddy Vluggen4-Mar-15 9:04
professionalEddy Vluggen4-Mar-15 9:04 
GeneralRe: Running forms in a thread in .NET Pin
landersohn694-Mar-15 9:18
landersohn694-Mar-15 9:18 
GeneralRe: Running forms in a thread in .NET Pin
Eddy Vluggen4-Mar-15 9:29
professionalEddy Vluggen4-Mar-15 9:29 
GeneralRe: Running forms in a thread in .NET Pin
landersohn694-Mar-15 10:53
landersohn694-Mar-15 10:53 
GeneralRe: Running forms in a thread in .NET Pin
Eddy Vluggen4-Mar-15 11:12
professionalEddy Vluggen4-Mar-15 11:12 
GeneralRe: Running forms in a thread in .NET Pin
landersohn696-Mar-15 18:34
landersohn696-Mar-15 18:34 
GeneralRe: Running forms in a thread in .NET Pin
Mycroft Holmes4-Mar-15 15:57
professionalMycroft Holmes4-Mar-15 15:57 
AnswerRe: Running forms in a thread in .NET Pin
Dave Kreskowiak4-Mar-15 9:10
mveDave Kreskowiak4-Mar-15 9:10 

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.