using System;using System.Windows.Forms; namespace test_Winform{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } void ChangeFont() { if (cboFont.SelectedIndex < 0) { return; } FontStyle style = FontStyle.Regular; if (chkBold.Checked) style |= FontStyle.Bold; if (chkItalic.Checked) style |= FontStyle.Italic; textBox1.Font = new Font((string)cboFont.SelectedItem, 10, ..
using System;using System.Windows.Forms; namespace test_Console_N_Window_HdlEvt{ class MainApp : System.Windows.Forms.Form { public void MyMouseHandler(object sender, MouseEventArgs e) { Console.WriteLine("Sender : {0}", ((Form)sender).Text); Console.WriteLine("X:{0} Y:{1}", e.X, e.Y); Console.WriteLine("Button:{0}, Clicks:{1}", e.Button, e.Clicks); Console.WriteLine(); } public MainApp(string t..
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms; namespace test_Console_N_Window_HdlEvt{ class MainApp : System.Windows.Forms.Form { static void Main(string[] args) { MainApp form = new MainApp(); form.Click += new EventHandler( (sender, eventArgs) => { Console.WriteLine("Closing Window.."); Application.Exit(); }); Console.WriteLine("S..
- console 로 프로젝트 생성 후, 프로젝트 -> 참조 추가 : system.windows.forms 추가 using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms; namespace test_Console_N_Window_HdlEvt{ class MainApp : System.Windows.Forms.Form { static void Main(string[] args) { System.Windows.Forms.Application.Run(new MainApp()); } }} MainApp 에서 form 상속 받고, application.run 을 이용해서 Mai..
헤어 time.h 구조체 정의 struct timeval { long tv_sec; long tv_usec; } 변수의 의미 tv_sec -> 1초. tv_usec -> 1/1000000 초. 아래는 예제 sec 와 usec 를 구분해서 사용 할 수 있으며, 그 시간만큼 delay 아주 명확한 소스 struct timeval timeout; while (1) { timeout.tv_sec = 0; timeout.tv_usec = 500*1000; ...
// counter.c 공유 메모리를 생성하고 공유 메모리에 // 카운터 문자열을 계속 갱신하여 넣습니다. #include // printf() #include // sleep() #include #include #define KEY_NUM 9527 #define MEM_SIZE 1024 int main( void) { int shm_id; void *shm_addr; int count; if ( -1 == ( shm_id = shmget( (key_t)KEY_NUM, MEM_SIZE, IPC_CREAT¦0666))) { printf( "공유 메모리 생성 실패\n"); return -1; } if ( ( void *)-1 == ( shm_addr = shmat( shm_id, ( void *)0, 0))..
■ getopt 함수란 유닉스나 리눅스에서 프로그램 실행 시 '-a', '-l' 등 별도의 옵션을 줄 수 있다. 이러한 옵션(아규먼트)을 쉽게 처리하기 위해 만들어진 함수가 getopt이다. 유닉스는 unistd.h를 리눅스는 getopt.h 헤더파일을 include하면 사용 할 수 있다. 그리고 이 함수는 main함수에서 많이 사용되고 있다. 모든 C(C++)로 된 프로그램은 보통 main 함수를 정의할 때 아래와 같이 두 개의 파라미터를 가진다. 프로그램이 커맨드 라인에서 인수를 받는 방법은 main 함수를 통해서만 가능하다. int main(int argc, char *argv[]) argc 파라미터는 커맨드 라인에서 넘어온 인수의 개수를 뜻하며, argv 파라미터는 C 문자열 벡터이다. argv ..
소켓 생성 시 어떤 책은 PF_INET를 쓰고, 어떤 책은 AF_INET 를 사용합니다. PF_INET는 프로토콜 체계(프로토콜 패밀리)중 하나이고, AF_INET는 주소 체계(주소 패밀리)중 하나입니다. 프로토콜 패밀리는 아래와 같은 종류가 있습니다. 프로토콜 체계(Protocol Family) 정의 PF_INET IPv4인터넷 프로토콜 PF_INET6 IPv6인터넷 프로토콜 PF_LOCAL LOCAL 통신을 위한 UNIX 프로토콜 PF_PACKET Low level socket을 위한 인터페이스 PF_IPX IPX 노벨 프로토콜 소켓을 만들 때는 소켓이 사용될 환경을 고려해 프로토콜을 설정해 주어야 합니다. 다시 말해 프로토콜 패밀리는 소켓을 생성할 때 이 소켓이 어떤 프로토콜을 사용해 통신을 할지 ..
- Total
- 331,919
- Today
- 0
- Yesterday
- 89
- PolyBridge1-5
- c#
- 좋은글귀
- PolyBridge1-4
- 리눅스
- PolyBridge
- PolyBridge하는법
- C# 판넬 예제
- 알프스목초지1-4
- 폴리브릿지
- DaleEvans
- PolyBridge1-2
- ted
- C# 패널 예제
- 알프스목초지1-3
- 알프스목초지1-2
- 믿는다는것
- 1Day1Sentence
- 알프스목초지1-1
- 자신만의향
- C# 패널
- Nina Fedoroff
- PolyBridge1-3
- Joseph Redmon
- 알프스목초지1-5
- OnlyICan
- 인생의시간
- 사람의인생
- PolyBridge1-1
- 분할작업
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 2017/08 (4)
