Cursor.Position, SetCursorPos, mouse_event 를 이용해서 마우스를 컨트롤하는 샘플코드이다. 원하는 위치로 이동할 수도 있고, 마우스 클릭도 조절할 수 있다. using System; using System.Drawing; using System.Runtime.InteropServices; using System.Threading; using System.Windows.Forms; namespace MouseSample { class Program { static void Main(string[] args) { Point myPoint = new Point(); myPoint.X = 10; myPoint.Y = 10; Cursor.Position = myPoint; Thre..
메모장이 실행되기를 기다렸다가, 메모장에 문장을 입력하는 샘플코드이다. Thread를 이용한 것이다. 이것은 AutoIt, AutoHotKey 같은 Task Automation 프로그램 대용으로 활용할 수 있다. using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; using System.Windows.Forms; namespace ProcessTest { class Program { static void Main(string[] args) { ThreadStart myThreadStart = new ThreadStart(DoWork); Thread myThread = new ..
메모장에 Hello World 문장을 입력하는 샘플코드이다. using System; using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; using System.Windows.Forms; namespace ProcessTest { class Program { static void Main(string[] args) { Process[] myProcesses = Process.GetProcessesByName("notepad"); foreach (Process item in myProcesses) { SetForegroundWindow(item.MainWindowHandle); Thread.Sleep(..
현재 실행중인 메모장을 모두 종료시키는 샘플코드이다. using System; using System.Diagnostics; namespace ProcessTest { class Program { static void Main(string[] args) { Process[] myProcesses = Process.GetProcessesByName("notepad"); foreach (Process item in myProcesses) { // Close process by sending a close message to its main window. item.CloseMainWindow(); // Free resources associated with process. item.Close(); } } } }
현재 컴퓨터에서 작동 중인 process 목록을 출력해주는 샘플코드이다. using System; using System.Diagnostics; namespace ProcessTest { class Program { static void Main(string[] args) { Process[] processes = Process.GetProcesses(); foreach (Process item in processes) { Console.WriteLine(item.ToString()); } } } }
WebBrowser.Navigate 명령 이후, 웹페이지가 완전히 로딩 될 때까지 기다리게하는 예제이다. WebBrowser.ReadyState를 이용해서 완료상태를 체크한다. using System.Threading; using System.Windows.Forms; namespace MyBrowser { public partial class Form1 : Form { public Form1() { InitializeComponent(); this.webBrowser1.Navigate("http://www.tistory.com"); while (webBrowser1.ReadyState != WebBrowserReadyState.Complete) { Thread.Sleep(100); Application..
내용에 따라서 자동으로 크기가 변하는 RichTextBox 샘플코드이다. The key is handling the ContentsResized event on the RichTextBox (doesn't exist on a TextBox). The ContentsResizedEventArgs has a NewRectangle property which will give you the desired size. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; na..
iTextSharp 컴포넌트를 이용한 샘플코드이다. 가장 기본적인 예제로 Hello World 파일을 만드는 예제이다. using System; using System.IO; using iTextSharp.text; using iTextSharp.text.pdf; namespace iTextSharpSample { class Program { static void Main(string[] args) { // step 1: // Create an instance of the iTextSharp.text.Document object Document document = new Document(); // step 2: // Create a Writer that listens to this document and..
- Total
- Today
- Yesterday
- AxWebBrowser
- AdSense숨기기
- download.com
- 스크린캡쳐
- registry
- iTextSharp
- Rollback Rx
- 애드센스감추기
- tagREADYSTATE
- windows
- .net framework
- c#
- iText
- java
- Service pack
- Automation
- jre
- DotNetMagic
- Sample Code
- Phalanger
- 유틸리티
- AdSense감추기
- Microsoft
- READYSTATE_COMPLETE
- 애드센스숨기기
- Regular Expressions
- autohotkey
- ScreenHunter
- WinAutomation
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |