http://msdn.microsoft.com/en-us/library/dd630576.aspx
IPアドレスの場所を検索する
http://www.iputilities.net/
How-To: Disable and Re-enable USB Storage Devices
http://technofriends.in/2008/02/11/how-to-disable-and-re-enable-usb-storage-devices/
netrtfwriter(RTFドキュメント作成するライブラリ)
http://sourceforge.jp/projects/sfnet_netrtfwriter/releases/?file_id=2317131
Detecting USB Drive Removal in a C# Program
http://www.codeproject.com/KB/system/DriveDetector.aspx
LPR(Line PRinter daemon protocol)(LPR Clientをキーワードとして検索)
http://www.codeproject.com/KB/printing/lpr.aspx
プリンタのジョブの一覧を取得する
http://www.devasp.net/net/articles/display/697.html
Windows サービス アプリケーションのセットアップ プロジェクトを Visual C# で作成する方法
http://support.microsoft.com/kb/816169/ja
Insert Plain Text and Images into RichTextBox at Runtime
http://www.codeproject.com/KB/edit/csexrichtextbox.aspx
Win32 API & アンマネージコードの呼び出しについてのWiki
http://pinvoke.net/
キーボードシミュレータを作ってみよう
http://www.yoshibaworks.com/ayacy/inasoft/autokeyb/chapter3.html
The SetKeyboardState API
http://www.pinvoke.net/default.aspx/user32.setkeyboardstate
仮想キーコード
http://homepage3.nifty.com/ic/help/rmfunc/vkey.htm
Windows Vista で Windows Installer Clean Up をインストールすると、書き込みできませんという実行時エラーが発生する
http://pasofaq.jp/controlpanel/appwiz/startmsivbs.htm
Windows Installer Clean Up Application は動作を停止しました
http://pasofaq.jp/controlpanel/appwiz/windowsinstallercleanupstop.htm
スクリプト エンジン "VBScript" が見つかりません。
http://pasofaq.jp/controlpanel/appwiz/notfindvbscript.htm
http://www.mrexcel.com/archive/VBA/index.html
! エクスクラメーション、びっくり
” ダブルクォーテーション、ダブルクォート
# (シャープ)、ナンバー
$ ドル、ダラー、ダラ
% パーセント
& アンド、アンパサンド
( ひだりかっこ、かっこひらき
) みぎかっこ、かっことじ
+ プラス、たす
- マイナス、ハイフン、ひく
* アステリスク、かける
/ スラッシュ、わる
= イコール
^ ハット
~ チルダ
’ シングルクォーテーション、シングルクォート
‘ バッククォート
\ えん、(バックスラッシュ)
| たてぼう、バーティカルライン
@ アット
[ ひだりだいかっこ、だいかっこひらき
] みぎだいかっこ、だいかっことじ
{ ひだりちゅうかっこ、ちゅうかっこひらき
} みぎちゅうかっこ、ちゅうかっことじ
; セミコロン
: コロン
, カンマ、コンマ
. ピリオド、ドット
< しょうなり
> だいなり
? クエスチョン、はてな
_ アンダーバー
コメント:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; using Microsoft.VisualBasic;
namespace ConsoleApplication1 {
class Program
{
static void Main(string[] args)
{
System.Threading.Thread.Sleep(4000);
cmdTAB_Click();
}
// struct to call API
private struct OSVERSIONINFO
{
public int dwOSVersionInfoSize;
public int dwMajorVersion;
public int dwMinorVersion;
public int dwBuildNumber;
public int dwPlatformId;
[VBFixedString(128), System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst = 128)]
// Maintenance string for PSS usage
public string szCSDVersion;
}
[DllImport("kernel32", EntryPoint = "GetVersionExA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
private static extern int GetVersionEx(ref OSVERSIONINFO lpVersionInformation);
[DllImport("user32", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
private static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);
[DllImport("user32", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
private static extern int GetKeyboardState(ref byte pbKeyState);
[DllImport("user32", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
private static extern int SetKeyboardState(ref byte lppbKeyState);
//const
const short VK_NUMLOCK = 0x90;
const short VK_SCROLL = 0x91;
const short VK_TAB = 0x09;
const short VK_CAPITAL = 0x14;
const short KEYEVENTF_EXTENDEDKEY = 0x1;
const short KEYEVENTF_KEYUP = 0x2;
const short VER_PLATFORM_WIN32_NT = 2;
const short VER_PLATFORM_WIN32_WINDOWS = 1;
private static void cmdTAB_Click()
{
OSVERSIONINFO o = default(OSVERSIONINFO);
bool NumLockState = false;
o.dwOSVersionInfoSize = Strings.Len(o);
GetVersionEx(ref o);
byte[] keys = new byte[256];
GetKeyboardState(ref keys[0]);
//NUMLOCK
NumLockState = Convert.ToBoolean(keys[VK_TAB]);
//check NUMLOCK state
//if disabled then enable it
if (NumLockState != true)
{
//=== Win95/98
if (o.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
keys[VK_TAB] = 1;
SetKeyboardState(ref keys[0]);
//=== WinNT
}
else if (o.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
//Key Press
keybd_event(Convert.ToByte(VK_TAB), 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0);
//Key Release
keybd_event(Convert.ToByte(VK_TAB), 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
//se estiver ativado -> if enabled then disable it
}
else
{
//=== Win95/98
if (o.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
keys[VK_TAB] = 0;
SetKeyboardState(ref keys[0]);
//=== WinNT
}
else if (o.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
//Key Press
keybd_event(Convert.ToByte(VK_TAB), 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0);
//Key Release
keybd_event(Convert.ToByte(VK_TAB), 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
}
}
private static void cmdNumLock_Click()
{
OSVERSIONINFO o = default(OSVERSIONINFO);
bool NumLockState = false;
o.dwOSVersionInfoSize = Strings.Len(o);
GetVersionEx(ref o);
byte[] keys = new byte[256];
GetKeyboardState(ref keys[0]);
//NUMLOCK
NumLockState = Convert.ToBoolean(keys[VK_NUMLOCK]);
//check NUMLOCK state
//if disabled then enable it
if (NumLockState != true)
{
//=== Win95/98
if (o.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
keys[VK_NUMLOCK] = 1;
SetKeyboardState(ref keys[0]);
//=== WinNT
}
else if (o.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
//Key Press
keybd_event(Convert.ToByte ( VK_NUMLOCK), 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0);
//Key Release
keybd_event(Convert.ToByte(VK_NUMLOCK), 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
//se estiver ativado -> if enabled then disable it
}
else
{
//=== Win95/98
if (o.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
keys[VK_NUMLOCK] = 0;
SetKeyboardState(ref keys[0]);
//=== WinNT
}
else if (o.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
//Key Press
keybd_event(Convert.ToByte(VK_NUMLOCK), 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0);
//Key Release
keybd_event(Convert.ToByte(VK_NUMLOCK), 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
}
}
private static void cmdCapsLock_Click()
{
OSVERSIONINFO o = default(OSVERSIONINFO);
bool CapsLockState = false;
o.dwOSVersionInfoSize = Strings.Len(o);
GetVersionEx(ref o);
byte[] keys = new byte[256];
GetKeyboardState(ref keys[0]);
//CAPSLOCK
CapsLockState = Convert.ToBoolean(keys[VK_CAPITAL]);
//check CAPSLOCK state
//if disabled then enable it
if (CapsLockState != true)
{
//=== Win95/98
if (o.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
keys[VK_CAPITAL] = 1;
SetKeyboardState(ref keys[0]);
//=== WinNT
}
else if (o.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
//Key Press
keybd_event(Convert.ToByte ( VK_CAPITAL), 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0);
//Key Release
keybd_event(Convert.ToByte(VK_CAPITAL), 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
//se estiver ativado -> if enabled then disable it
}
else
{
//=== Win95/98
if (o.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
{
keys[VK_CAPITAL] = 0;
SetKeyboardState(ref keys[0]);
//=== WinNT
}
else if (o.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
//Key Press
keybd_event(Convert.ToByte(VK_CAPITAL), 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0);
//Key Release
keybd_event(Convert.ToByte(VK_CAPITAL), 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
}
} }
}
yVoC[UNLIMITȂ1~]
ECirŃ|C Yahoo yV LINEf[^[Ōz500~`I