我想谷歌的眼睛(动画片),并让他的目光移到根据鼠标光标,光标一样的地方去的眼睛应该与
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Eyes
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
/*System.Drawing.Graphics formunyuzu = this.CreateGraphics();
int a= pictureBox1.Location.X;
int b = pictureBox1.Location.Y;
formunyuzu.TranslateTransform(a,b); */
int X = Form1.MousePosition.X;
int Y = Form1.MousePosition.Y;
if (X >= 0 && X < 12) pictureBox1.Image = Eyes.Properties.Resources;
if (X >= 12 && X < 24) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak2;
if (X >= 24 && X < 36) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak3;
if (X >= 36 && X < 48) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak4;
if (X >= 48 && X < 60) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak5;
if (X >= 60 && X < 72) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak6;
if (X >= 72 && X < 84) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak7;
if (X >= 84 && X < 96) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak8;
if (X >= 96 && X < 108) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak9;
if (X >= 108 && X < 130) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak10;
if (X >= 130 && X < 142) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak11;
if (X >= 142 && X < 154) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak12;
if (X >= 154 && X < 166) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak13;
if (X >= 166 && X < 178) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak14;
if (X >= 178 && X < 190) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak15;
if (X >= 190 && X < 202) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak16;
if (X >= 202 && X < 214) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak17;
if (X >= 214 && X < 226) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak18;
if (X >= 226 && X < 238) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak19;
if (X >= 238 && X < 250) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak20;
if (X >= 250 && X < 262) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak21;
if (X >= 262 && X < 274) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak22;
if (X >= 274 && X < 286) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak23;
if (X >= 286 && X < 298) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak24;
if (X >= 298 && X < 310) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak25;
if (X >= 310 && X < 322) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak26;
if (X >= 322 && X < 334) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak27;
if (X >= 334 && X < 346) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak28;
if (X >= 346 && X < 360) pictureBox1.Image = Eyes.Properties.Resources.yuvarlak29;
}
private void pictureBox1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}