Jump to content
Xtreme .Net Talk

lrvar

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by lrvar

  1. Also the way I did it was adding a webbrowser and in the navigate option yust enter the path and filename.. webbrowser1.navigate = "C:\Users\Luis\Desktop\1.pdf"
  2. Done, I found a way!! Option Strict On Imports System.Windows.Forms Imports System.Runtime.InteropServices Public Class Form1 Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs) Handles Me.MouseMove, Label1.MouseMove, Label2.MouseMove, Label3.MouseMove Label3.Text = "Usando los valores del parámetro: " & vbCrLf & "x= " & e.X & ", Y = " & e.Y End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim x As Integer = Cursor.Position.X Dim y As Integer = Cursor.Position.Y Dim p As POINT_API GetCursorPos(p) Label1.Text = "Usando Cursor.Position: " & vbCrLf & "x= " & x & ", Y = " & y Label2.Text = "Usando GetCursorPos: " & vbCrLf & "x= " & p.X & ", Y = " & p.Y If GetAsyncKeyState(1) = 0 Then Label4.Text = "Your Left Mouse Button Is UP" Else Label4.Text = "Your Left Mouse Button Is Down" End If If GetAsyncKeyState(2) = 0 Then Label5.Text = "Your Right Mouse Button Is UP" Else Label5.Text = "Your Right Mouse Button Is Down" End If End Sub End Class Module WinAPI Public Structure POINT_API Public X As Integer Public Y As Integer End Structure Public Declare Function GetCursorPos Lib "user32.dll" (ByRef lpPoint As POINT_API) As Boolean End Module
  3. Hi, I want to detect a mouse event anywhere on the screen,By now Im only detecting the click inside the form: Private Sub Main_MouseDown(ByVal sender As Object, ByVal e As_ System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown If e.Button = Windows.Forms.MouseButtons.Right Then MsgBox("Right") End If End Sub In advance thanks!!
×
×
  • Create New...