일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- winmodev
- windows mobile 6.5
- 마이크로소프트
- 옴니아2
- 김춘배
- 루나네스
- 훈스닷넷
- 윈도우폰
- 지승욱
- 서진호
- UX베이커리
- 신동혁
- 황광진
- 쉐어포인트코리아
- 실버라이트 코리아
- 주신영
- 안드로이드
- 소년포비소프트
- 윈도데브
- MIX10
- 데브피아
- 윈모데브
- 소년포비
- 윈도우폰7
- 스마트폰
- 윈도우 모바일
- 윈도우모바일
- 헤이맨
- 신석현
- 거제도
- Today
- Total
목록프로그램 세상/C# (78)
소년포비의 세계정복!!
using System; using System.Collections.Generic; using System.Text; using Microsoft.Win32; // 레지스트리관련 클래스를 쓰기위해 추가 namespace regiEx1 { class Program { static void Main(string[] args) { string regSubkey = "Software\\myTestKey"; // 서브키를 얻어온다. 없으면 null RegistryKey rk = Registry.LocalMachine.OpenSubKey(regSubkey, true); // 없으면 서브키..
응용 프로그램의 중복 실행을 방지시키는 소스 입니다. static void Main() { System.Diagnostics.Process[] myProc = System.Diagnostics.Process.GetProcessesByName("WindowsApplication10"); // 여기서 Mulpumi는 프로젝트 속성의 프로젝트 이름 if(myProc.Length < 2) { Application.Run(new Form1()); } else { MessageBox.Show("이미 실행중입니다."); Application.E..
string strDir = @"D:\MyTemp"; string strSubDir = "Sub"; DirectoryInfo DirInfo = new DirectoryInfo (strDir); if (DirInfo.Exists) { // 디렉토리 삭제 Directory.Delete (strDir, true); MessageBox.Show ("디렉토리 삭제", "알림"); } else { // 디렉토리 생성 DirInfo = Directory.CreateDirectory (strDir); // 서브 디렉토리 생성 DirInfo.CreateSubdirectory (strSubDir); MessageBox.S..
using (Bitmap bmp = new Bitmap (@"C:\Documents and Settings\purred\My Documents\My Pictures\20040613-022147.jpg")) { // 이미지 회전 bmp.RotateFlip (RotateFlipType.Rotate180FlipNone); // 이미지 대칭 bmp.RotateFlip (RotateFlipType.RotateNoneFlipX); Graphics g = e.Graphics; g.DrawImage (bmp as Image, new PointF (0, 0)); }
C# 콘트롤 마우스 클릭후 드래그 이동시키기 private bool bDrag; private Point startPos; private void my_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if (e.Button == MouseButtons.Left && bDrag == false) { startPos.X = e.X; startPos.Y = e.Y; SetCapture (Handle); bDrag = true; } } private void my_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { ..
C# 프로그래밍을 하다보면 C++에서 만들어 둔 DLL을 사용해야 할 경우가 많이 있지요. in 기능의 인수들을 그냥 대충 바꾸면 되는데 out 기능의 포인터를 사용한 Call by Referance 인수들을 참 난감합니다. 그러나 아래와 같이 선언하면 사용이 가능합니다. 참고 하세요. using System; using System.Collections.Generic; usin..
C#에서 Win32 API 사용하기 개요 Win32 API를 불러올 때, 함수의 명칭, 인자, 리턴 값을 가지고 불러오게 되어 있다. 하지만, C#에서 타입들이 모두 객체(Object)의 형식이며, 일반적인 C 의 데이터 형과 상이한 모양을 가진다. 이러한 문제들을 해결할 수 있는 것이 PInvoke 기능이다. PInvoke( Platform Invocation Service)는 ..
1. C# WindowsFormApplication 만들고 2. 참조에 Microsoft.mshtml 추가 3. 폼 코드보기에서 아래 내용으로 변경 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 mshtml; namespace WindowsFormsApplication1 { public partial class Form1 : Form..
람다 표현식은 코드를 별도의 메서드 정의 없이 인라인으로 바로 작성할 수 있는 방법이다. // 정수 하나를 입력 받아서, 그 수를 2배하는 코드 작성 using System; public class 람다식 { public static void Main(string[] args) { Console.WriteLine(Plus(2)); //[1] 메서드 PlusHandler ph = delegate(int a) { return (a + a); }; //[2] 무명메서드 C..
. 새 프로젝트 -> 기타 프로젝트 형식 -> Visual Studio 솔루션 -> 빈 솔루션 -> 이름 : DLL파일만들기 2. 솔푸션 안에 새 프로젝트 추가 ( Console, Windows Form, Web Site, Calculator(클래스라이브러리)) 1) 새 프로젝트 추가 -> 콘솔 응용 프로그램 -> ConsoleCalculator 2) 새 프로젝트 추가 -> Windows Forms 응용 프로..