کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی
کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

کلینیک فوق تخصصی اکسس ( کاربرد vba در اکسس )

به اشتراک گذاری اطلاعات کسب شده در اکسس از سایت آفیس و سایت های تخصصی خارجی

پیام WM_NEXTDLGCTL برای تنظیم فوکس کیبورد به کنترل دیگر




تمام مطالب زیر از سایت خارجی استخراج شده  بخوانید و لذت ببرید. داکیومنت یا رفرنس نیز با لینک قید گردیده.


wm-nextdlgctl


Sent to a dialog box procedure to set the keyboard focus to a different control in the dialog box.


ارسال به دیالوگ باکس برای تنظیم ( یا تغییر ؟ ) فوکس کیبورد به کنترل دیگر در این باکس


The low-order word indicates how the system uses wParam. If the low-order word is TRUEwParam is a handle associated with the control that receives the focus




low-order نشان میدهد که چگونه سیستم از wParam استفاده می نماید . اگر True باشد ( lParam ) ، در نتیجه wParam هندلی است در ارتباط با کنترلی که فوکس را دریافت می نماید .


wParam : GetDlgItem(hwnd/wParm,IDCtrl)

lParam=True Or >0



DM_GETDEFID :  '&H400


Retrieves the identifier of the default push button control for a dialog box.


getkeystate

syslink-control-styles

win32/url-control


Virtual-Key Codes

VK_TAB =&h9


SubClassEditControl :

Select Case Umsg 

Case 8  'WM_KILLFOCUS

'1000 is Id Of SysLink Control

'Set KeyBoard Focus To SysLink (ID:1000 )

 PostMessage hwndParent, &H28, GetDlgItem(hwndParent, 1000), 1

Or Using "SetFocus GetDlgItem(hwndParent, 1000)"



INT_PTR CALLBACK TabBackwardSubclassProc(
HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam,
UINT_PTR subclassId, DWORD_PTR)
{
switch (message) {
case WM_NCDESTROY:
RemoveWindowSubclass(hwnd, TabBackwardSubclassProc,
subclassId);
break;
case WM_GETDLGCODE:
return DefSubclassProc(hwnd, message, wParam, lParam) |
DLGC_WANTTAB;

case WM_KEYDOWN:
HWND hdlg = GetParent(hwnd);
if (wParam == VK_TAB) {
if (GetKeyState(VK_SHIFT) < 0) {
HWND tabDestination = GetDlgItem(hdlg,
// Tabbing backward - go to the Customer ID.
IDC_CUSTOMERID);
// Do the normal tabbing thing.
SendMessage(hdlg, WM_NEXTDLGCTL,
(WPARAM)tabDestination, TRUE);
} else {
if (wParam == VK_TAB) return 0;
SendMessage(hdlg, WM_NEXTDLGCTL, FALSE, FALSE);
}
return 0;
}
}
break;
case WM_CHAR:
break;
return DefSubclassProc(hwnd, message, wParam, lParam);
}







If lCode = HCBT_ACTIVATE Then
If IsMsgBox(wParam) Then
Call UnhookWindowsHookEx(hHook): hHook = 0
hStatic = GetDlgItem(wParam, IDPROMPT)
If InStr(1, sStoredPrompt, sStoredHypText, vbTextCompare) Then
hFont = SendMessage(hStatic, WM_GETFONT, 0, 0)
With tStaticRect
Call GetWindowRect(hStatic, tStaticRect)
p1.X = .Left: p1.Y = .Top
Call ScreenToClient(wParam, p1)
Call DestroyWindow(hStatic)
Call MoveWindow(hSysLink, p1.X, p1.Y, .Right - .Left, .Bottom - .Top, 1)
Call SendMessage(hSysLink, WM_SETFONT, hFont, True)
End With
Call SendMessage(wParam, WM_NEXTDLGCTL, GetDlgItem(wParam, loword(CLng(SendMessage(wParam, DM_GETDEFID, 0, 0)))), True)
End If
End If
End If