-
HITTEST
شنبه 16 شهریور 1398 14:53
Type MARGINS cxLeftWidth As Long cxRightWidth As Long cyTopHeight As Long cyBottomHeight As Long End Type Extends the window frame into the client area' DwmExtendFrameIntoClientArea (hWnd, ByRef (MARGINS ------------------------------------------------------------- if (m.Msg=&H83 And WParam=1) Then Dim nccsp As...
-
WM_MOUSEACTIVATE
شنبه 16 شهریور 1398 11:42
.wParam: Handle to the active top-level parent window LOWORD (lParam): Hit test value where the mouse is clicked. If you clicked the work area, the HTCLIENT .value is passed HIWORD (lParam): The ID of the mouse message that caused this message. Depending on the return value of this message, mouse messages are either...
-
WM_NCLBUTTONDOWN
شنبه 16 شهریور 1398 10:48
allow to drag & move userform via control Label1) Private Declare Function ReleaseCapture Lib "user32" () As Long Private Const WM_NCLBUTTONDOWN = &HA1 Private Const HTCAPTION = 2 Dim hWndForm As Long Private Sub UserForm_Initialize() hWndForm = FindWindow("ThunderDFrame", Me.Caption) End...
-
پیام ها
جمعه 15 شهریور 1398 23:10
%MAX_TITLE_BUTTONS=8 %B_EDGE=2 GLOBAL szPropName As String * 255? Or Byte TYPE CaptionButton uCmd AS LONG 'command to send when clicked nRightBorder AS LONG 'Pixels between this button and buttons to the right hBmp AS LONG 'Bitmap to display fPressed AS LONG 'Private END TYPE TYPE CustomCaption...
-
WM_NCHITTEST
جمعه 15 شهریور 1398 19:20
مختصات صفحه Screen Coordinate برای تعیین اینکه چه بخشی از پنجره با یک مختصات صفحه خاص مطابقت دارد به عنوان مثال ، هنگامی که مکان نما حرکت می کند ، وقتی دکمه ماوس را فشار داده یا آزاد می شود این پیام از طریق تابع WindowProc خودش دریافت می شود. در صورتیکه ماوس تسخیر نشود ، پیام به پنجره ای که زیر مکان نما است ارسال می...
-
رنگ کنترل رسمی ( Custom Control) در SubClaasing
جمعه 15 شهریور 1398 15:36
ساب کلاس کردن کنترل ترسیمی ( تنها یک کنترل ) Type cz As SIZE cx As Long ' Width cy As Long ' Height End Type Type CustCtrl 'Foreground text colour crForeGnd As Long 'Background text colour crBackGnd As Long 'The font hFont As Long 'The control's window handle hwnd As Long End Type Painting the control Whenever windows...
-
قلاب کردن پنجره HOOK و دسترسی به کلاس های آن از طریق Subclass کردن
جمعه 15 شهریور 1398 11:33
در WIN32 : Private Type CWPSTRUCT lParam As Long wParam As Long message As Long hwnd As Long End Type End Type Private Const SWP_FRAMECHANGED=&H20 Private Const SWP_NOSIZE=&H1 Private Const SWP_NOZORDER=&H4 Private Const WH_CALLWNDPROC=4 (Private Const GWL_WNDPROC=(-4 Private Const WM_GETFONT=&H31...
-
قلاب کردن InputBox برای ارسال پیام ویندوزی به آن HOOK /SUBCLASS
پنجشنبه 14 شهریور 1398 23:23
تست نشده ولی جواب خواهد داد توابع برای استفاده در Win32 است در Win64 نحوه ی اظهار توابع فرق میکند که در لینک توابع API در [ پیوندها ] ، نحوه ی صحیح آن در سایت خارجی درج شده. Option Explicit Necessary constants for hooking ' Private Const HCBT_ACTIVATE=5 Public Const WH_CBT=5 Constants for password masking ' Public...
-
GWL_USERDATA
پنجشنبه 14 شهریور 1398 19:31
When you send a WM_CLOSE message to a window , it tries to close the window as if the X button were pressed .You cannot know whether the application was closed externally or by clicking the X button But there is an easy alternative. When you are closing the window externally using WM_CLOSE, you can initialize its...
-
گرفتن عرض بوردر ادیت کنترل
پنجشنبه 14 شهریور 1398 18:09
SM_CXBORDER=4 'The width of a window border, in pixels. This is equivalent to the SM_CXEDGE value for windows with the 3-D look. SM_CYBORDER=6 in pixles SM_CYCAPTION=4 in pixles SM_CXEDGE=45,SM_CYEDGE=46 'The width And Height of a 3-D border, in pixels. This metric is the 3-D counterpart of SM_CXBORDER. SM_CXSIZE=30,...
-
POSTMESSAGE
پنجشنبه 14 شهریور 1398 17:01
-
بررسی وجود باتن MAXIMIZE در پرنت ویندو WIN32
پنجشنبه 14 شهریور 1398 16:29
Const GWL_EXSTYLE = -20 Const GWL_HINSTANCE = -6 Const GWL_HWNDPARENT = -8 Const GWL_ID = -12 Const GWL_STYLE = -16 Const GWL_USERDATA = -21 Const GWL_WNDPROC = -4 Const DWL_DLGPROC = 4 Const DWL_MSGRESULT = 0 Const DWL_USER = 8 در ویندوز ۳۲ بیتی : Public Declare Function GetWindowLong Lib "user32.dll" Alias...
-
انجام پروژه های کوچک
پنجشنبه 14 شهریور 1398 13:50
لطفا درخواست پروژه های ( فقط اکسس ) خود را به جی میل accessvbablogsky@gmail.com ارسال کرده تا بررسی و قیمت ارائه گردد
-
CreateWindowEx
پنجشنبه 14 شهریور 1398 11:50
HWND CreateWindowExA dwExStyle lpClassName lpWindowName dwStyle X Y nWidth nHeight hWndParent hMenu hInstance lpParam WS_EX_WINDOWEDGE=&H100 WS_EX_TOOLWINDOW=&H80 : Window Styles WS_BORDER=&H800000 WS_CHILD=&H40000000 WS_POPUP=&H80000000 : Note The windows is a pop-up window. This style cannot' be...
-
تغییرپس زمینه ادیت باکس
پنجشنبه 14 شهریور 1398 10:20
if message=WM_CTLCOLOREDIT Then HDC hdcChild=(HDC)wParam Text is black – you can modify this by adding anothe ' variable for text color ((SetTextColor hdcChild,RGB(0,0,0 SetBkColor hdcChild, m_BackColor End if (OnSetFocus(pOldWnd (m_BackColor=RGB(255,255,0 Invalidate FALSE (OnKillFocus(pNewWnd...
-
Rich Text
چهارشنبه 13 شهریور 1398 23:29
Type CHANGENOTIFY dwChangeType : CN_TEXTCHANGED End Type To receive EN_CHANGE notification codes, specify ENM_CHANGE in the mask sent with the EM_SETEVENTMASK message برای دریافت کدهای اعلان باید ENM بالا را توسط پیام EM با لا ارسال کرد. SendMessageA hwndRichBox,EM_SETEVENTMASK,0,ENM_CHANGE :EM_SETEVENTMASK wParam...
-
استایل ورودی تکست / EDIT CONTROL
چهارشنبه 13 شهریور 1398 22:38
-
تغییر بک گراند کنترل Static
چهارشنبه 13 شهریور 1398 22:08
case WM_CTLCOLORSTATIC HDC hdcStatic = (HDC) wParam (SetTextColor hdcStatic,RGB(0,0,255 (SetBkColor hdcStatic,RGB(250,250,0 ((Function=CreateSolidBrush(RGB(250,250,0 case WM_CTLCOLOREDIT HDC hdcStatic = (HDC) wParam (SetTextColor hdcStatic,RGB(0,0,255 (SetBkColor hdcStatic,RGB(0,230,0...
-
OffsetRect / جابجائی
چهارشنبه 13 شهریور 1398 20:20
Type INSTBUT uCmdId ' WM_COMMAND message uState As Integer fButtonDown ' ?button up/down fMouseDown As Boolean WNDPROC oldproc ' need to remember the old window procedure cxLeftEdge As Long cxRightEdge As Long cyTopEdge As Long cyBottomEdge As Long End Type SubClass Edit Control (BOOL InsertButton(hwnd,uCmdId Dim pbut...
-
پیام WM_MOUSEMOVE
چهارشنبه 13 شهریور 1398 19:26
setcapture releasecapture getcapture settimer killtimer wm-timer nidEvent می تواند WM_MOUSELEAVE باشد یعنی SetTimer در MOUSEMOVE تنظیم شود اگر Msg گرفته شده در TIMEPROC برابر MOUSELEAVE شد کاری انجام شده و بعد KillTimer اعمال گردد.
-
Detect Mouse Over The Button ( ردیابی وقایع ماوس )
سهشنبه 12 شهریور 1398 22:27
trackmouseevent : Posts messages when the mouse pointer leaves window or hovers over a window for a specified amount of time پست کردن پیام هایی به پرنت ویندو وقتی نشانگر ماوس پنجره را ترک کرده ( هندل به ویندو ) یا روی یک پنجره برای مدتی از زمان بصورت شناور است ( می پلکد- یا روی آن محدوده). API Declarations' Public...
-
تغییر رنگ پس زمینه WM_NCMOUSEMOVE
سهشنبه 12 شهریور 1398 21:04
-
پیام WM_SETCURSOR برای تغییررنگ Custom Button
سهشنبه 12 شهریور 1398 20:29
getdlgctrlid : Retrieves the identifier of the .specified control بر گرفته از فروم خارجی ( بررسی موقعیت ماوس در باتن موردنظر ) 1-find your button rectangle GetWindowRect BtnHwnd,BtnRect 2-transform form client coordinate in screen coordinate ClientToScreen BtnRect,pt (those 2 points in OnInitDialog or equivalent) 3 -...
-
پیام WM_PAINT جهت رنگ Client و WM_DRAWITEM برای باتن ساخته شده بجای باتن CANCEL
سهشنبه 12 شهریور 1398 13:53
تست شده The WM_PAINT message is sent when the system or another application makes a request to paint a portion of an application's window The PAINTSTRUCT structure contains information that can be used to paint the .client area of a window حاوی اطلاعاتی برای استفاده در نقاشی ناحیه ی Client پنجره. Case WM_PAINT Dim ps...
-
پیام WM_NOTIFY ( زمانیکه واقعه ای اتفاق می افتد )
دوشنبه 11 شهریور 1398 22:42
Custom Draw Item State ' CDIS_SELECTED =&H1 CDIS_GRAYED =&H2 CDIS_DISABLED =&H4 CDIS_CHECKED = &H8 CDIS_FOCUS = &H10 CDIS_DEFAULT =&H20 CDIS_HOT = &H40 CDIS_MARKED =&H80 CDIS_INDETERMINATE =&H100 CDIS_HOT : ("The item is currently under the pointer ("hot Type NMHDR...
-
WM_MOUSEMOVE در Custom Draw Control
دوشنبه 11 شهریور 1398 20:17
برگرفته از فروم خارجی Dim r As RECT (HWND h=GetDlgItem(hwndDlg,IDC_YOURCTLID GetWindowRect h, r ' get window rect of control relative to screen POINT pt={r.left,r.top } 'new point object using rect x, y Above means ->>>??? pt.x=r.left:pt.y=r.top ' ScreenToClient hwndDlg,pt ' convert screen co-ords to client...
-
رسم ۳ باتن در TitleBar
یکشنبه 10 شهریور 1398 21:46
X,y طبق POINTAPI در lParam (x = CLng(lParam) And &HFFFF& 'LoWord(lParam (y = CLng(lParam) \ 65535 ' LoWord(lParam در پیام WM_NCPAINT Private tBtn As RECT Dim i As Integer Dim C As Integer C=10 Gap=0 For i=0 To 2 GetClientRect lhwnd,tBtn With tBtn (Bottom=GetSystemMetrics(SM_CYCAPTION. Left=.Right-c-Gap....
-
Gradient Button ( باتن با سطح شیب دار) / DrawCloseButton ( رسم باتن کلوز )
یکشنبه 10 شهریور 1398 20:34
Dim rc As RECT rc.left = 0 rc.top = 0 rc.right = 260 rc.bottom = 80 Dim hpen draw gradient button' Dim i As Integer i=0 Do ((hpen=CreatePen(PS_SOLID,4,RGB(150-i,0,0 SelectObject hdc, hpen Rectangle hdc, 0, 0 + i, 262, 1 + i DeleteObject hpen (SetBkColor hdc,RGB(130,0,0 (SetTextColor hdc, RGB(255,255,255 TextOut...
-
WM_NCHITTEST
یکشنبه 10 شهریور 1398 19:16
Private Const HTBOTTOMRIGHT = 17 Dim rc1 As RECT Dim rc2 As RECT Select Case wMsg Case WM_SIZE GetClientRect hwnd, rc2 If PtInRect(rc2,rc1.Left,rc1.Top) Then InvalidateRect hwnd, rc1,True Else PostMessage hwnd, WM_PAINT, 0, 0 End If Case WM_PAINT GetClientRect hwnd, rc1 (rc1.Left=rc1.Right-GetSystemMetrics(SM_CXSIZE...
-
Draw TitleBr
شنبه 9 شهریور 1398 23:44
Private tCloseRect As RECT Private tUpdatedCloseButtonRect As RECT Private bCloseButtonPressed As Boolean ---------------------------------------------- : WNDPROC GetClientRect hwnd, tClientRect Select Case Msg Case WM_NCLBUTTONDOWN SetWindowPos hwnd,HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE Case WM_ACTIVATE...