15,886,422 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 ADemontis (Top 6 by date)
ADemontis
21-Jan-18 14:00pm
View
would not this run every 30 seconds?
ADemontis
30-Aug-14 10:36am
View
i have modified it this way but still does not work
Friend Sub newbutton_MouseClick(sender As Object, e As System.Windows.Forms.MouseEventArgs)
If drag = False Then
Try
LeggiDizionario(sender, My.Application.Info.DirectoryPath & "\custom\custombuttons.txt")
Process.Start(My.Settings.buttprocess)
ignoreclick = False
Catch ex As Exception
MsgBox("Cannot start process - check definition")
End Try
dict.Clear()
End If
End Sub
ADemontis
29-Aug-14 13:21pm
View
what do you exatcly mean by 'check it in the click handler'?
I have modified the code:
Friend Sub newbutton_MouseClick(sender As Object, e As System.Windows.Forms.MouseEventArgs)
If ignoreclick = True And drag = False Then
' reads the file where the process definition i stored and associates the process to the button depending on the button name
Try
LeggiDizionario(sender, My.Application.Info.DirectoryPath & "\custom\custombuttons.txt")
Process.Start(My.Settings.buttprocess)
ignoreclick = False
Catch ex As Exception
MsgBox("Cannot start process - check definition")
End Try
dict.Clear()
Else
MsgBox(ignoreclick.ToString)
End If
End Sub
Private Sub newbutton_MouseDown(sender As Object, e As MouseEventArgs)
drag = True
ignoreclick = False
mousex = Windows.Forms.Cursor.Position.X - sender.Left
mousey = Windows.Forms.Cursor.Position.Y - sender.Top
End Sub
Private Sub newbutton_MouseUp(sender As Object, e As MouseEventArgs)
drag = False
ignoreclick = True
End Sub
Private Sub newbutton_MouseMove(sender As Object, e As MouseEventArgs)
If drag = True And ignoreclick = False Then
sender.Top = Windows.Forms.Cursor.Position.Y - mousey
sender.Left = Windows.Forms.Cursor.Position.X - mousex
End If
End Sub
the drag part works well but i don't know why i always get the ignoreclick to False status
ADemontis
29-Aug-14 9:41am
View
'to click the mouse' is pushing the button and releasing... a click is formally made up of a mousedown followed by a mouseup events. But te mpuseclick event seems to be unusable along with the 2 single parts that make a click (mousedown and mouseup). I am lloking for a workaround to use the 3 events on the same object.
ADemontis
29-Aug-14 9:39am
View
I don't want to simulate anything, i want to use mouse events and assign an action on every event.
But thhe 'mouseclick' event seems to be unusable along with mouseup and mousedown.
ADemontis
29-Aug-14 9:16am
View
when i click the mouse, of course.... it's mouseclick...
I want to be able to move the picturebox and to open a process by clicking on it.
Show More