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; namespace WindowsFormsApplication1 { public partial class Form1 : Form { DateTime A, B; int t; String str; public Form1() { InitializeComponent(); timer1.Start(); str = " 즐거운 데블스캠프 즐거운 데블스캠프"; } private void clicked(object sender, EventArgs e) { MessageBox.Show("창 떳음"); } private void button1_Click(object sender, EventArgs e) { //MessageBox.Show("버튼 누름 ㅋ"); A = dateTimePicker1.Value; B = dateTimePicker2.Value; MessageBox.Show((B.Year-A.Year).ToString()); GetVisiblelabel1(); } private void GetVisiblelabel1() { label1.Visible = true; } private void timer1_Tick(object sender, EventArgs e) { t++; label2.Text = t.ToString(); label3.Text = str.Substring((t%10), 10); } private void pictureBox1_Paint(object sender, PaintEventArgs e) { } private void label4_MouseMove(object sender, MouseEventArgs e) { label4.Text = e.Location.ToString(); } } }