private void SelectTab()
{
IntPtr hand1 = FindWindowA(null, "EPSON R330 Series 打印首选项");
if (hand1 != IntPtr.Zero)
{
IntPtr hwnd11 = FindWindowEx(hand1, 0, "SysTabControl32", null); //
int GW_CHILD = 5;
int TCM_FIRST = 0x1300;
uint TCM_SETCURSEL = Convert.ToUInt32(TCM_FIRST + 12);
uint TCM_GETCURSEL = Convert.ToUInt32(TCM_FIRST + 11);
UInt32 TCM_GETCURFOCUS = Convert.ToUInt32(TCM_FIRST + 47);
UInt32 TCM_SETCURFOCUS = Convert.ToUInt32(TCM_FIRST + 48);
int sss = SendMessage(hwnd11, TCM_SETCURFOCUS, 4, 0);
int ssss = SendMessage(hwnd11, TCM_GETCURFOCUS, 4, 0);
IntPtr hwnd111 = FindWindowEx(hand1, 0, null, "维护"); //
int controlId = 0xf43;
IntPtr EdithWnd = GetDlgItem(hwnd111, controlId);
int re = SendMessage(EdithWnd, 0xf5, 0, 0);
}
}