티스토리 뷰
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace WindowsApplication6
{
public partial class Form1 : Form
{
[DllImport("user32")]
public static extern IntPtr GetWindow(IntPtr hwnd, int wCmd);
[DllImport("user32")]
public static extern bool IsWindowVisible(IntPtr hwnd);
[DllImport("user32")]
public static extern int GetWindowTextLength(IntPtr hwnd);
[DllImport("user32")]
public static extern int GetWindowText(IntPtr hwnd, StringBuilder lpString, int cch);
public const int GW_HWNDFIRST = 0;
public const int GW_HWNDNEXT = 2;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
IntPtr hWnd = GetWindow((IntPtr)this.Handle, GW_HWNDFIRST);
while (hWnd != IntPtr.Zero)
{
int Length = GetWindowTextLength(hWnd);
if (IsWindowVisible(hWnd) && Length > 0)
{
StringBuilder sb = new StringBuilder(Length+1);
GetWindowText(hWnd, sb, sb.Capacity);
Console.WriteLine(sb.ToString());
}
hWnd = GetWindow(hWnd, GW_HWNDNEXT);
}
}
}
}
- Total
- Today
- Yesterday
- C# 책
- 블로그 개설
- c#.net
- robot
- c#ㄱㄱ
- ROS2 설치
- iptime 2000au
- readonly
- 창숨기기
- C#책
- C 책
- c#초보
- ROS2
- C# 속으루..
- 창숨김
- 블로그 공지
- 창숨김 다운
- ubuntu
- C#입문
- 블로그
- 창숨김 프로그램
- Node
- USB
- ipTIME
- c#
- 블로그 이야기
- 창숨기기 프로그램
- 책 소개
- 디스크 쓰기 금지되어 있습니다
- 2000au
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |