TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bing In
NA
30
9k
windows form solution
Oct 1 2016 3:20 AM
output number of click
edit the code below
using System;
using System.Windows.Forms;
class MainApp : System.Windows.Forms.Button Mybtn;
{
public MainApp()
{
InitializeComponent();
}
private void InitializeComponent()
{
this.MyBtn = new System.Windows.Forms.Button();
this.MyBtn.Location = new System.Drawing.Point(20, 20);
this.MyBtn.Size = new System.Drawing.Size(100, 50);
this.MyBtn.Test = "button";
this.MyBtn.Click += new System.EventHandler(this.MyBtn_Click);
this.Controls.Add(this.MyBtn);
}
public static void Main()
{
Application.Run(new MainApp());
}
private void Form_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form_MouseDown);
Console.WriteLine("number of click : {0}", e.Button);
Console.WriteLine();
}
}
}
Attachment:
ControlTest1.zip
Reply
Answers (
3
)
How to use SqldataAdapter with DataGridView
project does not work well after published