using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
MessageBox.Show("Hello!");
}
private void Form1_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
MessageBox.Show("你好");
}
{
if (e.Button == MouseButtons.Right)
{
MessageBox.Show("你好");
}
}
private void pictureBox1_MouseEnter(object sender, EventArgs e)
{
pictureBox1.Image = Image.FromFile(@"F:\WindowsFormsApplication2\WindowsFormsApplication2\pic\ps.jpg");
}
private void pictureBox1_MouseLeave(object sender, EventArgs e)
{
pictureBox1.Image = null;
}
{
pictureBox1.Image = Image.FromFile(@"F:\WindowsFormsApplication2\WindowsFormsApplication2\pic\ps.jpg");
}
private void pictureBox1_MouseLeave(object sender, EventArgs e)
{
pictureBox1.Image = null;
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello!");
}
{
MessageBox.Show("Hello!");
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace WindowsFormsApplication4
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}