i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the panel events but i want to add a button and when i press the button this events happen how can i do this can i put event inside the event
here is the code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace painter
{
public partial class painter : Form
{
bool shouldPaint = false;
public painter()
{
InitializeComponent();
}
private void painter_MouseDown(object sender, MouseEventArgs e)
{
shouldPaint = true;
}
private void painter_MouseUp(object sender, MouseEventArgs e)
{
shouldPaint = false;
}
private void painter_MouseMove(object sender, MouseEventArgs e)
{
if (shouldPaint)
{
Graphics graphics = CreateGraphics();
graphics.FillEllipse(new SolidBrush(color.black), e.X, e.Y, 10, 10);
}
}
here is the code but i want to happen when i click a button
any help thanks
mySQL and PHP search
Hello,I am trying to code a project and ran into a brick wall with one of my pages. I am pretty new at php/mySQL and can not figure this out. Now I know that you are not going to sit there and type my
registration form
first time posting. did some searches but didnt find exactly what i am looking for. dont flame cause i am posting in the wrong area. I am starting from scratch with a new registration form for a
=> and <=
So I was digging through some code when I came across the <= operator. This is the first time I've ever seen it. I felt the same way I did when I first saw a ternary statement. What is
Calling variables
I want to call this to my website but it doesn't display what I want it to,Code: <h5>Edit Subject: <?php echo $sel_subject['menu_name']; ?></h5>If I change
How do I create a 2D game "camera" to follow player?
In J2ME programming I'm targeting MIDP 2.0 devices.I'm using gamecanvas and I was thinking that I could create my full world (640 x 480) using a TiledLayer and then set the refpixel of the TilerLayer
b+ tree
Hi can every body help me about b+ tree ?(insert & delete)
Linking with Foreign Keys
I have been getting an erro when I try and link:
$GPRMC and NMEA how to extract from report
Hi There,Im a little bi lost and not sure where to start with this one, ive got a small gps receiver which impolling over a serial connection, each time i poll the device i get a load of rubbish back
Logging and nologging bulk insert
Hi,
Insert to MySQL inside foreach
Hey.I am parsing some html, and putting inside an html db.I need to create a randomized integer to be a unique identifier, and i chose just to use time().But I foreach the results, and inside here i