Results 1 to 2 of 2
  1. #1
    CoderNever's Avatar
    Join Date
    Feb 2009
    Gender
    female
    Location
    https://mpgh.net MPGHCash: $700,458,011
    Posts
    1,198
    Reputation
    131
    Thanks
    2,236
    My Mood
    Buzzed

    Virtual Mouse Clicks On Minimized Form

    I essentially wish to have a form running in the background, and clicking somewhere on the web-browser control in which I have implanted on the form. I do not wish to use anything such as get-elements, because the item I will be clicking is java base, and not html, or php based. If you have any clue what so ever, and what I can do to accomplish it I ask that you share it. I thank you for your consideration in helping me.

    Goals
    ● click on a position that is located on a form that is running in back round.
    ● You will still be able to use your mouse normally on the computer.

  2. #2
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,672
    My Mood
    Breezy
    I'm not sure if that's possible.. Perhaps you could do some 'hacking' with SendMessage to the control's handle or somethings. What exactly is this Java element/item you're trying to click on? More information would be nice.

    EDIT - I found a snippet here, might be what you're looking for:
    https://snippets.dzone.com/posts/show/6047

    It's in C# but is easily converted to VB.NET, here's a quick translation:
    Code:
    <DllImport("user32.dll", CharSet := CharSet.Auto, SetLastError := False)> _
    Private Shared Function SendMessage(hWnd As IntPtr, Msg As UInteger, wParam As IntPtr, lParam As IntPtr) As IntPtr
    End Function
    
    <DllImport("user32.dll", SetLastError := True)> _
    Private Shared Function GetWindow(hWnd As IntPtr, uCmd As UInteger) As IntPtr
    End Function
    
    <DllImport("user32.dll", CharSet := CharSet.Auto)> _
    Private Shared Function GetClassName(hWnd As IntPtr, lpClassName As StringBuilder, nMaxCount As Integer) As Integer
    End Function
    
    Dim handle As IntPtr = WebBrowser1.Handle
    Dim className As New StringBuilder(100)
    While className.ToString() <> "Internet Explorer_Server" ' your mileage may vary with this classname
    	handle = GetWindow(handle, 5) ' 5 == child
    	GetClassName(handle, className, className.Capacity)
    End While
    Dim lParam As IntPtr = DirectCast((y << 16) Or x, IntPtr) ' X and Y coordinates of the click
    Const wParam As IntPtr = IntPtr.Zero
    Const downCode As UInteger = &H201 ' change this if you want to simulate Ctrl-Click and such
    Const upCode As UInteger = &H202 ' these codes are for single left clicks
    SendMessage(handle, downCode, wParam, lParam) ' mousedown
    SendMessage(handle, upCode, wParam, lParam) ' mouseup
    Last edited by master131; 04-21-2012 at 03:05 AM.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

Similar Threads

  1. [HELP] Fast Mouse Click Code[Solved]
    By <(-_-)> in forum Visual Basic Programming
    Replies: 6
    Last Post: 04-01-2010, 08:41 PM
  2. [HELP]Fast Mouse Click[Solved]
    By <(-_-)> in forum Visual Basic Programming
    Replies: 5
    Last Post: 03-27-2010, 09:24 PM
  3. Method to Stimulate Mouse Clicks
    By zhaoyun333 in forum C++/C Programming
    Replies: 0
    Last Post: 01-23-2010, 10:10 PM
  4. Storing Mouse Clicks
    By gwentravolta in forum Visual Basic Programming
    Replies: 9
    Last Post: 11-07-2009, 03:38 AM
  5. Get Mouse Click
    By Xocitus in forum C++/C Programming
    Replies: 4
    Last Post: 07-11-2007, 09:47 PM