I try to detect when the mouse is over a curve in zedgraph, I am capable of doing it if the mouse is over a point of the curve, but the problem is when the curve has no points in that region,let me show you an example:
Curve is defined by 2 points: [X=0;Y=10] -- [X=1000;Y=10]
If mouse is at point [X=500;Y=10] it is over the curve, but not over any point so i cannot detect it.Is there any event which gets fired when mouse is over line but not necessarily over a point?
I'm trying to set up a timer that counts up to ten and starts/resets when the left mouse button is clicked (anywhere on the screen even when the application is in the background). I'm struggling to find a code that suggests it is possible and now I am starting to wonder even if it is possible in VB?
I need to know a way to detect if the mouse has been clicked anywhere on the screen. So as long the program I am making is open when the user clicks my program needs to do something. Please let me know as soon as possible if this is possible and how you do it.
how do I make a textbox that counts every single mouse click made while the application is open?
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal VKey As Long) As Integer Private Sub WebBrowser1_MouseDown(ByVal Button As Integer) Select Case Button
I would like the text in a button to display "hello" when it is first clicked, and "world" when it is clicked again. But I don't know how to write code to detect the second click.
========================================================== Private Sub StartStopButton_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles StartStopButton.MouseClick Button1.Text = "Hello"
I am creating an application that creates scripts to move a mouse and to click where a user wishes to via pre-programmed code and to also press keys where required. I have the code to move a mouse and to manually click anywhere. What I am after is to detect when a mouse button is pressed and dragged and when keys are pressed.
I see that there is the following MouseButtons.ToString To detect when a mouse button is pressed, and have it looping in a timer. Is there a better way to do this? I would rather not use a timer. And is there a similar routine to detect which keys are pressed?
Is there any way of detecting the position where the Mouse Button is released during a Drag & Drop operation. I need to know whether the intended Drop position was not reached when the mouse button is released.
I need to create a program that can run code each time the user clicks, I can't use windows forums since its on another program. If the code can detect global mouse clicks(system wide) or only on one program it's fine.
I've done some digging and it looks like windows API can solve my problem but i really suck at using windows API and it looks like SetWindowsHookEx() can solve my problem but i don't know how to use it correctly. This is the code from Pinvoke that I modified to hopefully work for a mouse click. i'm having trouble getting this to work.
Imports System.Runtime.InteropServices Imports System.Windows.Forms Module Module1 Sub Main() Dim t As New MouseHook
I want to make an auto log off feature, I want to detect if there is any user input, and if there isn't the user will be automatically logged off. So I want to know how to detect mouse wheel events when the form doesn't have focus.
I am trying to detect when the user selects a checkbox on the new line of a datagridview
I am using the following code but it doesn't detect the new line has been selected. When running debug IsNewRow shows as FALSE
Private Sub DataGridView1_CellContentClick(sender As System.Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
Through the years i have been programming i have found myself needing to move the mouse in a line. making the mouse move from one point to another is no problem at all, but i want to make the mouse move slowly in a straight line from one point to another.
I'm creating a type of drawing program. The user can draw a line, much like in word or paint, etc. But once the line is drawn (to a picturebox or bitmap in memory), I want the user to be able to click on the line and drag it around (translate it).
If I know the coordinates of the endpoints of the line, as well as the pen width it was drawn with, how can I tell if a certain coordinate (mouse location) is contained by the line?
My first thought was to take a mathematical approach, like get an equation for a line, and check to see if the coordinate belonged to it. But for a higher pen width, the line is thicker, and thus contains more points.
How can I tell what coordinates are part of the line? Is there some sort of intersect function in the gdi that takes a line?
When I right click in a richtextbox, a context menu appears with an option 'get line'. When that is pressed, it should return the line number in which the mouse cursor is in.
I was thinking something like:
Private Sub GetLineToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GetLineToolStripMenuItem.Click Dim intLine As Integer
I have a multi-line text box with hundreds of lines. I would like to be able to scroll up or down in the list using the mousewheel (much like using the pgup/pgdown keys). I think I need to use the .mousewheel event, but I'm not sure how to implement this. Is that supported out of the box, or do I need to hook the mouse?
I want to drag-drop single text items from ListView-A to ListView-B (both are in Details mode), but can't see how to read (and hence highlight) the index of the line in ListView-B when the mouse is hovering over it. Easy in a ListBox, but the PointToClient > IndexFromPoint features don't work with ListView controls and I just can't see another way .
I have little Problem with my ListView. When the mouse cursors hovers over an item in the first column, all the subitems of that line dissapear. If I click in it, they eppear agein. Also, they appear, if I hover the mouse over each of them.This my code for DrawSubItem-Event. I don't have implemented a DrawItem-Event because that made it even worse.
Private Sub lvResult_DrawSubItem(ByVal sender As Object, ByVal e As System.Windows.Forms.DrawListViewSubItemEventArgs) Handles lvResult.DrawSubItem Dim sf As New StringFormat()[code].....
I am developing an application with multiple picture boxes, each displaying a line graph. I want to be able to have a label following the mousepointer showing xy coordinates of the point. I also want to allow a user to zoom in on a specific picture box by double clicking on it. The code does what I want as written (changes backcolor so I know double click event fires) except moving the position of the label to follow the mouse pointer.
However if if uncomment the line in the MouseMoved sub: LB.Location = New Point(e.X, e.Y) Then the label moves as desired however the double click event no longer fires.
Public Class Form1 Dim PB As New PictureBox, LB As New Label Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Controls.Add(PB) With PB [Code] .....
I'm using VB2008 and I have ZedGraph on a form. I want the graph control to display the value of a constantly changing variable. How do I do this in code?
I have two custom action listers. One that handles Mouse.Click and one that handles Mouse.MouseDown. My question to you is, can I delay the mouse down event so that it does not intefere with the code of the Mouse.Click event? I have tried adding a timer and waiting x amount then setting a bool value to true, but the code executes to fast and it skips the other code.
Im using ZedGraph and want to do things as points are hovered over ("show point values" has to be on). is there an event i can harness that fires when you hover over points?
I am trying to install Zedgraph with VB 2008 (express) I have added the reference to the zedgraph.dll file, and the zedgraph.web.dll file, but the toolbox isn't showing any of the entries for Zedgraph. I've saved and closed the project, exited studio and come back, still nothing. I've rebooted, still nothing.