본문 바로가기
728x90
반응형

C#21

C# 시스템 종료하기 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 윈폼 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("ShutDown", "-s"); } } } 2012. 12. 24.
C# 랜덤함수 적응하기 - 문화상품권 번호 추출하기 이는 실제 문화상품권 코드가 아닌 문화상품권 핀코드의 형태만 따라한것입니다. 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 윈폼 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } Random rnd = new Random(); int temp; private void button1_Click(object sender,.. 2012. 12. 23.
C# 로또 번호 추첨기 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 Lotto { public partial class Form1 : Form { public Form1() { InitializeComponent(); } Random rnd = new Random(); int min = 1; int max = 46; int[] arrint = new int[7]; private void button1_Click(object sen.. 2012. 12. 22.
C# 오른쪽마우스 클릭시 메뉴 띄우기 contextMenuStrip을 추가합니다. 그리고 폼 속성에서 contextMenuStrip을 찾아 방금 추가한 contextMenuStrip1로 설정합니다. 실행해보면 오른쪽클릭할때마다 메뉴가 뜹니다. 2012. 12. 13.
728x90
반응형