Click here to Skip to main content
15,507,526 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Performance Issue Pin
SledgeHammer0118-Aug-14 9:31
SledgeHammer0118-Aug-14 9:31 
AnswerRe: C# Performance Issue Pin
Pete O'Hanlon18-Aug-14 4:09
mvaPete O'Hanlon18-Aug-14 4:09 
GeneralRe: C# Performance Issue Pin
SledgeHammer0118-Aug-14 5:52
SledgeHammer0118-Aug-14 5:52 
GeneralRe: C# Performance Issue Pin
Pete O'Hanlon18-Aug-14 5:56
mvaPete O'Hanlon18-Aug-14 5:56 
AnswerRe: C# Performance Issue Pin
jschell18-Aug-14 12:51
jschell18-Aug-14 12:51 
QuestionC#/JS problematic iteration with table... Pin
OmegaExtern16-Aug-14 18:23
OmegaExtern16-Aug-14 18:23 
AnswerRe: C#/JS problematic iteration with table... Pin
Richard MacCutchan16-Aug-14 22:11
mveRichard MacCutchan16-Aug-14 22:11 
QuestionC# Keybind for Autoclicker Pin
Aaudiio16-Aug-14 17:39
Aaudiio16-Aug-14 17:39 
Hey. I'm looking for help with my autoclicker. I got it working with buttons, but I need keybinds instead.

C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace auto_click
{
    
    public partial class Form1 : Form
    {

        
        [System.Runtime.InteropServices.DllImport("user32.dll")]
        public static extern void mouse_event(int dwFlags, int dx, int dy, int cButtons, int dwExtraInfo);

        public const int MOUSEEVENTF_LEFTDOWN = 0x02;
        public const int MOUSEEVENTF_LEFTUP = 0x04;
        public const int MOUSEEVENTF_RIGHTDOWN = 0x08;
        public const int MOUSEEVENTF_RIGHTUP = 0x10;



        
        public void MouseClick()
        {
            mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
            mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
        }
        public Form1()
        {
            InitializeComponent();
        }


        private void timer1_Tick(object sender, EventArgs e)
        {
            MouseClick();
        }

        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode.ToString() == "F") ;
            timer1.Enabled = true;
        }
    }
}

Any idea why it doesn't work?
REEEEEEEEEEEEH

AnswerRe: C# Keybind for Autoclicker Pin
Zain Ul Abidin16-Aug-14 20:49
Zain Ul Abidin16-Aug-14 20:49 
AnswerRe: C# Keybind for Autoclicker Pin
OmegaExtern16-Aug-14 21:44
OmegaExtern16-Aug-14 21:44 
GeneralRe: C# Keybind for Autoclicker Pin
Aaudiio16-Aug-14 21:47
Aaudiio16-Aug-14 21:47 
GeneralRe: C# Keybind for Autoclicker Pin
OmegaExtern16-Aug-14 21:50
OmegaExtern16-Aug-14 21:50 
Questioncheck array value exists Pin
scottichrosaviakosmos16-Aug-14 4:11
scottichrosaviakosmos16-Aug-14 4:11 
AnswerRe: check array value exists Pin
onelopez16-Aug-14 4:34
onelopez16-Aug-14 4:34 
GeneralRe: check array value exists Pin
scottichrosaviakosmos16-Aug-14 5:03
scottichrosaviakosmos16-Aug-14 5:03 
AnswerRe: check array value exists Pin
OriginalGriff16-Aug-14 4:39
mveOriginalGriff16-Aug-14 4:39 
QuestionCatching exceptions on backgroundworker Pin
pjank4215-Aug-14 20:44
pjank4215-Aug-14 20:44 
QuestionRe: Catching exceptions on backgroundworker Pin
Richard MacCutchan15-Aug-14 22:25
mveRichard MacCutchan15-Aug-14 22:25 
AnswerRe: Catching exceptions on backgroundworker Pin
pjank4216-Aug-14 2:50
pjank4216-Aug-14 2:50 
GeneralRe: Catching exceptions on backgroundworker Pin
Richard MacCutchan16-Aug-14 6:10
mveRichard MacCutchan16-Aug-14 6:10 
AnswerRe: Catching exceptions on backgroundworker Pin
Eddy Vluggen16-Aug-14 3:10
professionalEddy Vluggen16-Aug-14 3:10 
AnswerRe: Catching exceptions on backgroundworker Pin
jschell17-Aug-14 10:56
jschell17-Aug-14 10:56 
GeneralRe: Catching exceptions on backgroundworker Pin
pjank4218-Aug-14 9:40
pjank4218-Aug-14 9:40 
QuestionMissing TCP Packets Pin
M Riaz Bashir15-Aug-14 20:24
M Riaz Bashir15-Aug-14 20:24 
AnswerRe: Missing TCP Packets Pin
Dave Kreskowiak16-Aug-14 5:29
mveDave Kreskowiak16-Aug-14 5:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.