none
When running application no gui is shown even though I build a gui? RRS feed

  • Question

  • Here's my GUI:

    https://gyazo.com/bb3b4429f36e21fe17fbd96940a82548

    Here's my code:

    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;
    using System.Runtime.InteropServices;

    namespace Jitterclicker
    {
        public partial class <g class="gr_ gr_85 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" data-gr-id="85" id="85">Form1 :</g> Form
        {
            [DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
            public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);
            private const int MOUSEEVENTF_LEFTDOWN = 0x02;
            private const int MOUSEEVENTF_LEFTUP = 0x04;
            private const int MOUSEEVENTF_MOVE = 0x0001;

            public void DoMouseClick()
            {
                //perform click            
                mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
                mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
            }

            private void OnKeyDownHandler(object sender, KeyEventArgs e)
            {
                bool isPressed = false;
                if (e.KeyCode == Keys.R)
                {
                    if (isPressed == false)
                    {
                        jitterTimer.Start();
                        isPressed = true;
                    } else
                    {
                        isPressed = false;
                        jitterTimer.Stop();
                    }
                }
            }
            private void Form1_Load(object sender, EventArgs e)
            {
            }

            private void jitterTimer_Tick(object sender, EventArgs e)
            {
                DoMouseClick();

                Random r = new Random();

                Console.WriteLine(jitterTimer.Interval);
                jitterTimer.Interval = r.Next(flatTrackBar1.Value, flatTrackBar2.Value);
            }

            private void timer1_Tick(object sender, EventArgs e)
            {
                mintickLabel.Text = flatTrackBar1.Value.ToString();
                maxtickLabel.Text = flatTrackBar2.Value.ToString();
            }
        }
    }

    Every time I build I get this:

    https://gyazo.com/8c826a071d11fc0b74bb6a24a5099dec

    Any help would be great thanks.

    Monday, December 24, 2018 6:39 PM

All replies