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

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

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

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

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

نمایش BITMAP نزدیک به منوآیتم ( سایت آفیس NEXT MENU ITEM )

 این ویژگی ( Feature ) تست نشده و فقط طبق سند آفیس و جذاب بودنش در این صفحه درج شده .


To add a new bitmap item to a menu, use the MF_BITMAP flag with the InsertMenu or AppendMenu
 function.


MF_BITMAP=&H4 
'Uses a bitmap as the menu item. The lpNewItem parameter contains a handle to the bitmap.


InsertMenuA hMenu,uPosition:6,uFlags:MF_BYPOSITION+MF_BITMAP, 
uIDNewItem:6,lpNewItem:Handle To Bitmap




DrawMenuBar hSysMenu/hMenu/hSubMenu

setmenuitembitmaps hSysMenu, 5, &H400, loadimage(image_Bitamp), loadimage(image_Bitamp



استخراج آیکون از فایل DLL یا EXE



ExtractIconExA(lpszFile,nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT
( nIcons


nIconIndex : 

If this value is –1 and phiconLarge and phiconSmall are both NULL, the function returns the total number of icons in the specified file


Declare PtrSafe Function DrawIcon Lib "user32" (ByVal hdc As LongPtr, ByVal x As Long, ByVal y As Long, ByVal hIcon As LongPtr) As Long


Declare PtrSafe Function DestroyIcon Lib "user32" (ByVal hIcon As LongPtr) As Long


Declare PtrSafe Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As LongPtr, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As LongPtr 

نمایش Bitmap کنار منو ( پیوند BitMap مشخص شده به آیتم منو )

Type: HBITMAP

A handle to the bitmap to be displayed, or it can be one of the values in the following table. It is used when the MIIM_BITMAP flag is set in the fMask member


uflags: MF_BYCOMMAND

hBitmap:LoadBitmap,LoadIcon,LoadImage







Dim mim As MENUITEMINFOA

(mim.cbSize = Len(mim

   mim.fMask = MIIM_BITMAP

mim.hbmpitem=1

SetMenuItemInfoA hSysMenu, 6, 1, mim


Use the GetSystemMetrics function with the CXMENUCHECK and CYMENUCHECK values to retrieve the bitmap dimensions.


تصویر بالا با استفاده از تابع زیر ( foo هندلی برای Bitmap ) و   loadimagea ( در آرگومان Type حتما IMAGE_BITMAP  استفاده شود ) بدست آمده  ضمنا  Bitmap ها در Shell32  در اینترنت وجود دارد و می توانید در سیستم خود لود نمایید و مانند زیر استفاده کنید .


windows_7_shell32_dll.shtml


SetMenuItemBitmaps hMenu, 1,MF_BYPOSITION, foo, foo


Device Context


















BMP_file_format

 Picture Property Doffice.11

stdole.SavePicture


The IDispatch interface ID is defined as a GUID with the value of {00020400-00000000-C000-000000000046}

H20400&

HC0&

H46&


GUID.htm&id