15,902,938 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by AmarjeetAlien (Top 24 by date)
AmarjeetAlien
13-Jun-11 4:39am
View
I think I'm still not clear to You. "There is no clicking and so I don't think I can use OnMouseClick".
And I think I need this:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.mouseclick.aspx
And
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.click.aspx
Anyway it's freaking me out!How difficult it could be to perform a simple right click at current cursor location??! Forget everything just write a simple C# program which when run performs a right click!Like have a "for" loop from 1-10 and for each even value of i(checked after a delay) do a right click.
I know I'm very bad at programming.But that's how learning begins.
AmarjeetAlien
13-Jun-11 2:06am
View
Can you please give sample code snippet for that^^
I found this for Control.InvokeOnClick:http://msdn.microsoft.com/en-us/library/system.windows.forms.control.invokeonclick.aspx
protected void InvokeOnClick(
Control toInvoke,
EventArgs e
)
And toInvoke type list is long:http://msdn.microsoft.com/en-us/library/system.windows.forms.control.aspx
I need to know which one to use.
AmarjeetAlien
13-Jun-11 1:41am
View
What do you need for a trigger of this check?
->A slightly constant value of this variable over a small duration of time.
A time or an addressing of this variable?
->Both.I think.
why? What's the ultimate purpose of this technique?
->Please read the comments of you answer(--SA) on this thread:http://www.codeproject.com/Questions/209985/How-to-manually-set-mouse-events
AmarjeetAlien
13-Jun-11 1:34am
View
I've been through this page a number of times, but problem remains same->the user has to perform a mouse/keyboard event in this example.My user is using "onscreen keyboard" and no mouse at all! Please read my above comment.
Something like this:http://cameramouse.org/
Thanks!
AmarjeetAlien
13-Jun-11 1:25am
View
Sorry for my "small" summary.
Actually, I'm making an iMouse(eye mouse) where user uses my hardware setup(a headmount camera) to interact with computer.The user is a limbic disable(no hands) and can't use the normal mouse. My application software is to be used like a driver(not actually a driver) which detects headmount camera and allows the user to interact with computer by tracking his/her eyeball movements and blinking.
What I should have made clear is that user is "not clicking". He/She is just blinking the eye(s) and my app has to detect the blink and perform the clicking at current cursor location.The blink to perform a click is slightly longer than normal blink.
So, there are no mouse event from user side(as is the case with all available code samples) and so I can't use "OnClick" type events handlers :(
I can detect blink and all I need is to trigger the click!
Moreover I'm a Student and not a professional and so I'm not dragging myself into std GUI practices. I only need to give a demo(in fact, final presentation) that it is possible to click using blink.
Thanks for your help --SA!
AmarjeetAlien
12-Jun-11 15:03pm
View
Well,I'm not skilled enough to create ".dll" and so not in a mood to implement "Global Mouse Hook".
To know what exactly I'm trying to do you may just look at headings of my previous posts:http://www.codeproject.com/script/Answers/MemberPosts.aspx?tab=questions&mid=7063045 which were ofcourse answered by you only(--SA)!
But,I'll give a small summary.
I've a loop that keeps generating X and Y value dynamically using image processing(OpenCV) by detecting the Iris of the user.
Next I need to move cursor in sync with the Iris movement and I'm passing the pupil-coordinates as corsorpostion. I've somehow finished that.
Next I need to detect blinking to perform mouse clicks(lefteye blink=left click like that) and there are no good methods available for that.So,I'm tweaking the pupildetection procedure.When the user blinks, the pupil-coordinates remain fixed to its previous value, if it remains fixed for few seconds that means user is trying to click...for normal blink rate has to be considered. That is moment when I've to trigger the clicking at current cursor location.
I got less that 24hrs to finish that^...so I've to trick it!!
I thik this explains my problem.
AmarjeetAlien
12-Jun-11 14:20pm
View
That only Codeproject knows!! I saw that later.Basically I hit uparrow+enter :)
AmarjeetAlien
22-May-11 2:57am
View
Thanks for for detailed explanation!
CvPoint is a strudture
typedef struct CvPoint
{
int x;
int y;
}
CvPoint;
I'll try the modifications. Sorry for that bad naming convention.
AmarjeetAlien
21-May-11 3:35am
View
Thanks ambarishtv!
AmarjeetAlien
21-May-11 3:04am
View
Thanks for the reply. I have updated the question. Please have a look.
AmarjeetAlien
21-May-11 3:04am
View
Thanks for the reply. I have updated the question. Please have a look.
AmarjeetAlien
21-May-11 2:28am
View
I read that its a copy paste form here:
http://stackoverflow.com/questions/1315266/displaying-another-app-in-my-form
[
^
]
But anyway thanks for the reply.
AmarjeetAlien
1-May-11 18:06pm
View
Well,I found the documentation for "user32.dll" here:http://www.andreavb.com/API_USER32.html ..not all APIs ....and code snippets are in VB6!
Making list of APIs I need and will ask another question on how to deal with them.
Thanks!
AmarjeetAlien
1-May-11 17:28pm
View
Actually I'm developing an eyemouse for disabled peoples(http://img192.imageshack.us/i/cap1e.png/[^] http://img807.imageshack.us/i/imouse3.png/[^])
So I'm trying to port all mouse properties and functions to my application.I googled a lot and finally found I need to inport "user32.dll"....thanks Code Project that I got the solution.But so far I've been able to implement only "SwapMouseButton" using:
Collapse
[DllImport("user32.dll")]
public static extern Int32 SwapMouseButton(Int32 bSwap);
And
Collapse
private void Apply_Click(object sender, EventArgs e)
{
SwapMouseButton(Convert.ToInt32(BtnChkBoxBC.Checked));
ApplyDisable();
}
There are >700 API calls for user32.dll and I don't know which and all and how to call for mouse only. If you know some site which maintains such database with code snippet(ya,I'm poor at programming),please let me know.
Thanks SA!
AmarjeetAlien
1-May-11 16:47pm
View
Thanks SA! for guiding in exact direction...reading P/Invoke tutorial(http://msdn.microsoft.com/en-us/library/aa446536.aspx).If you know other better link,please do post.
Thanks!
AmarjeetAlien
30-Apr-11 10:27am
View
Thanks a lot Kim!
It worked happily.
AmarjeetAlien
30-Apr-11 9:29am
View
Yes....but on double click.
AmarjeetAlien
29-Apr-11 6:57am
View
Thanks for ur response Rajesh!
Well,I'm using OpenCV2.2 and so I've copied following file(from:OpenCV2.2/bin/) to "bin/debug"
opencv_core220.dll
opencv_core220d.dll
opencv_ffmpeg220.dll
opencv_ffmpeg220d.dll
opencv_highgui220.dll
opencv_highgui220d.dll
opencv_ml220.dll
opencv_ml220d.dll
opencv_video220.dll
opencv_video220d.dll
And all other OpenCvSharp .dll are also present.
Thanks!
AmarjeetAlien
28-Apr-11 18:25pm
View
Just in case If I'm violating something:
The MIT License
Copyright (c) 2010 David J Barnes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
AmarjeetAlien
27-Apr-11 20:17pm
View
one last question...are all mouse properties present in user32.dll only or I'll have to Import some other dll also.
Please Respond.
Thanks!
AmarjeetAlien
27-Apr-11 20:02pm
View
I know...sorry for being too naive!
I got it here is the list:
user32 732 functions .....
ActivateKeyboardLayout 1
AdjustWindowRect 2
AdjustWindowRectEx 3
AlignRects 4
AllowForegroundActivation 5
AllowSetForegroundWindow 6
AnimateWindow 7
AnyPopup 8
AppendMenuA 9
AppendMenuW 10
ArrangeIconicWindows 11
AttachThreadInput 12
BeginDeferWindowPos 13
BeginPaint 14
BlockInput 15
BringWindowToTop 16
BroadcastSystemMessage 17
BroadcastSystemMessageA 18
BroadcastSystemMessageExA 19
BroadcastSystemMessageExW 20
BroadcastSystemMessageW 21
BuildReasonArray 22
CalcMenuBar 23
CallMsgFilter 24
CallMsgFilterA 25
CallMsgFilterW 26
CallNextHookEx 27
CallWindowProcA 28
CallWindowProcW 29
CascadeChildWindows 30
CascadeWindows 31
ChangeClipboardChain 32
ChangeDisplaySettingsA 33
ChangeDisplaySettingsExA 34
ChangeDisplaySettingsExW 35
ChangeDisplaySettingsW 36
ChangeMenuA 37
ChangeMenuW 38
CharLowerA 39
CharLowerBuffA 40
CharLowerBuffW 41
CharLowerW 42
CharNextA 43
CharNextExA 44
CharNextW 45
CharPrevA 46
CharPrevExA 47
CharPrevW 48
CharToOemA 49
CharToOemBuffA 50
CharToOemBuffW 51
CharToOemW 52
CharUpperA 53
CharUpperBuffA 54
CharUpperBuffW 55
CharUpperW 56
CheckDlgButton 57
CheckMenuItem 58
CheckMenuRadioItem 59
CheckRadioButton 60
ChildWindowFromPoint 61
ChildWindowFromPointEx 62
CliImmSetHotKey 63
ClientThreadSetup 64
ClientToScreen 65
ClipCursor 66
CloseClipboard 67
CloseDesktop 68
CloseWindow 69
CloseWindowStation 70
CopyAcceleratorTableA 71
CopyAcceleratorTableW 72
CopyIcon 73
CopyImage 74
CopyRect 75
CountClipboardFormats 76
CreateAcceleratorTableA 77
CreateAcceleratorTableW 78
CreateCaret 79
CreateCursor 80
CreateDesktopA 81
CreateDesktopW 82
CreateDialogIndirectParamA 83
CreateDialogIndirectParamAorW 84
CreateDialogIndirectParamW 85
CreateDialogParamA 86
CreateDialogParamW 87
CreateIcon 88
CreateIconFromResource 89
CreateIconFromResourceEx 90
CreateIconIndirect 91
CreateMDIWindowA 92
CreateMDIWindowW 93
CreateMenu 94
CreatePopupMenu 95
CreateSystemThreads 96
CreateWindowExA 97
CreateWindowExW 98
CreateWindowStationA 99
CreateWindowStationW 100
CsrBroadcastSystemMessageExW 101
CtxInitUser32 102
DdeAbandonTransaction 103
DdeAccessData 104
DdeAddData 105
DdeClientTransaction 106
DdeCmpStringHandles 107
DdeConnect 108
DdeConnectList 109
DdeCreateDataHandle 110
DdeCreateStringHandleA 111
DdeCreateStringHandleW 112
DdeDisconnect 113
DdeDisconnectList 114
DdeEnableCallback 115
DdeFreeDataHandle 116
DdeFreeStringHandle 117
DdeGetData 118
DdeGetLastError 119
DdeGetQualityOfService 120
DdeImpersonateClient 121
DdeInitializeA 122
DdeInitializeW 123
DdeKeepStringHandle 124
DdeNameService 125
DdePostAdvise 126
DdeQueryConvInfo 127
DdeQueryNextServer 128
DdeQueryStringA 129
DdeQueryStringW 130
DdeReconnect 131
DdeSetQualityOfService 132
DdeSetUserHandle 133
DdeUnaccessData 134
DdeUninitialize 135
DefDlgProcA 136
DefDlgProcW 137
DefFrameProcA 138
DefFrameProcW 139
DefMDIChildProcA 140
DefMDIChildProcW 141
DefRawInputProc 142
DefWindowProcA 143
DefWindowProcW 144
DeferWindowPos 145
DeleteMenu 146
DeregisterShellHookWindow 147
DestroyAcceleratorTable 148
DestroyCaret 149
DestroyCursor 150
DestroyIcon 151
DestroyMenu 152
DestroyReasons 153
DestroyWindow 154
DeviceEventWorker 155
DialogBoxIndirectParamA 156
DialogBoxIndirectParamAorW 157
DialogBoxIndirectParamW 158
DialogBoxParamA 159
DialogBoxParamW 160
DisableProcessWindowsGhosting 161
DispatchMessageA 162
DispatchMessageW 163
DisplayExitWindowsWarnings 164
DlgDirListA 165
DlgDirListComboBoxA 166
DlgDirListComboBoxW 167
DlgDirListW 168
DlgDirSelectComboBoxExA 169
DlgDirSelectComboBoxExW 170
DlgDirSelectExA 171
DlgDirSelectExW 172
DragDetect 173
DragObject 174
DrawAnimatedRects 175
DrawCaption 176
DrawCaptionTempA 177
DrawCaptionTempW 178
DrawEdge 179
DrawFocusRect 180
DrawFrame 181
DrawFrameControl 182
DrawIcon 183
DrawIconEx 184
DrawMenuBar 185
DrawMenuBarTemp 186
DrawStateA 187
DrawStateW 188
DrawTextA 189
DrawTextExA 190
DrawTextExW 191
DrawTextW 192
EditWndProc 193
EmptyClipboard 194
EnableMenuItem 19
AmarjeetAlien
27-Apr-11 19:34pm
View
Thanks it worked fine:
private void BtnChkBoxBC_CheckedChanged(object sender, EventArgs e)
{
if (!BtnChkBoxBC.Checked)
{
SwapMouseButton(0);
}
else
{
SwapMouseButton(1);
}
ApplyEnable();
}
Thanks a lot!
Can you please let me know the name of other mouse setting...like "pointer speed","click lock",etc....in fact I'm implementing all mouse properties in my App.
AmarjeetAlien
27-Apr-11 19:27pm
View
ApplyEnable() is for enabling "Apply" button(I hope the image link is working,let me know) which is desabled by default....I even don't have any code for "Apply" button action.
private void ApplyEnable()
{
Apply.Enabled = true;
}
AmarjeetAlien
27-Apr-11 19:20pm
View
Thanks for the reply....but it didn't work :(
To let You know...I haven't added any mouse handler in my program....I've only created the check box which when selected should invert(in this case) mouse selection....this is how I used your code:
[DllImport("user32.dll")]
public static extern Int32 SwapMouseButton(Int32 bSwap);
private void BtnChkBoxBC_CheckedChanged(object sender, EventArgs e)
{
SwapMouseButton(1);
SwapMouseButton(0);
ApplyEnable();
}
Show More