Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8999371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:10:17+00:00 2026-06-16T00:10:17+00:00

First the code private void pictureBox1_MouseMove(object sender, MouseEventArgs e) { System.Drawing.Graphics g; System.Drawing.SolidBrush brush

  • 0

First the code

private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
    {

            System.Drawing.Graphics g;
            System.Drawing.SolidBrush brush = new System.Drawing.SolidBrush(Color.Blue);
            g = pictureBox1.CreateGraphics();
            g.FillRectangle(brush, e.X, e.Y, 5, 5);

    }

This event handler would fire up whenever the mouse moves over a picture box and create a pixel. Now the problem is that as long as i move the mouse slowly all those pixels form a line. However whenever i move the mouse a bit fast the line breaks and all i see are dots with wide spaces in between them.

Need help in this matter.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:10:18+00:00Added an answer on June 16, 2026 at 12:10 am

    When the mouse is moved, you won’t get a MouseMove event for every single pixel traveled by the mouse pointer. You’ll get them at a fairly consistent time interval, so the faster the mouse moves, the further apart the points you’ll get.

    What you need to do is store the position of the last point received, and draw an actual line using DrawLine between the old position and the new one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the code: private void Lightnings_Mode_Load(object sender, EventArgs e) { this.Size = new
I have this code: private void timer_Tick(object sender, EventArgs e) { timer.Stop(); for (int
i have a problem, i tried this code : private void button1_Click(object sender, RoutedEventArgs
I have this code : private void vicationDataGridView_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { if (zawag)
This code: private void comboBoxFontSize_SelectedIndexChanged(object sender, EventArgs e) { rtbResults.Font.Size = Convert.ToInt32(comboBoxFontSize.SelectedItem); } ...generates
I have this code : private void insertValus() { ContentValues initialValues = new ContentValues();
I got this code: private void LoadXML() { WebClient myWebClient = new WebClient(); myWebClient.DownloadStringCompleted
Here's my code: private void makeDialog2() { AlertDialog.Builder about = new AlertDialog.Builder(getContext()); about.setTitle(You Won!);
private void p01_Click(object sender, EventArgs e) { if (p01.Image == pmiss.Image) { score++; makeMoleVisable(1,
I have a button with a click event : private void btnShow_Click(object sender, EventArgs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.