資源描述:
《vb實(shí)現(xiàn)截圖、復(fù)制、剪切和粘貼功能》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫(kù)。
1、'ReleaseDC函數(shù)釋放設(shè)備上下文環(huán)境(DC)供其他應(yīng)用程序使用PrivateDeclareFunctionReleaseDCLib"user32"(ByValhwndAsLong,ByValhdcAsLong)AsLong'OpenClipboard函數(shù)用于打開(kāi)剪切板PrivateDeclareFunctionOpenClipboardLib"user32"(ByValhwndAsLong)AsLong'EmptyClipboard函數(shù)用于清空剪切板PrivateDeclareFunctionEmptyClipboard
2、Lib"user32"()AsLong'SetClipboardData函數(shù)用于把數(shù)據(jù)放到具有指定格式的剪切板,窗口必須是當(dāng)前剪切板的擁有者,該函數(shù)必須在OpenClipboard調(diào)用后才可以用PrivateDeclareFunctionSetClipboardDataLib"user32"(ByValwFormatAsLong,ByValhMemAsLong)AsLong'SelectObject函數(shù)選擇一對(duì)象到指定的設(shè)備上下文環(huán)境中,該新對(duì)象替換先前的相同類型的對(duì)象。PrivateDeclareFunctionSelect
3、ObjectLib"gdi32"(ByValhdcAsLong,ByValhObjectAsLong)AsLong'DeleteDC該函數(shù)刪除指定的設(shè)備上下文環(huán)境(Dc)。PrivateDeclareFunctionDeleteDCLib"gdi32"(ByValhdcAsLong)AsLong'BitBlt該函數(shù)對(duì)指定的源設(shè)備環(huán)境區(qū)域中的像素進(jìn)行位塊(bit_block)轉(zhuǎn)換,以傳送到目標(biāo)設(shè)備環(huán)境。PrivateDeclareFunctionBitBltLib"gdi32"(ByValhDestDCAsLong,ByValX
4、AsLong,ByValYAsLong,ByValnWidthAsLong,ByValnHeightAsLong,ByValhSrcDCAsLong,ByValxSrcAsLong,ByValySrcAsLong,ByValdwRopAsLong)AsLong'CreateCompatibleDC該函數(shù)創(chuàng)建一個(gè)與指定設(shè)備兼容的內(nèi)存設(shè)備上下文環(huán)境(DC)。通過(guò)GetDc()獲取的HDC直接與相關(guān)設(shè)備溝通,而本函數(shù)創(chuàng)建的DC,則是與內(nèi)存中的一個(gè)表面相關(guān)聯(lián)。PrivateDeclareFunctionCreateCompatible
5、DCLib"gdi32"(ByValhdcAsLong)AsLong'CreateCompatibleBitmap該函數(shù)創(chuàng)建與指定的設(shè)備環(huán)境相關(guān)的設(shè)備兼容的位圖。PrivateDeclareFunctionCreateCompatibleBitmapLib"gdi32"(ByValhdcAsLong,ByValnWidthAsLong,ByValnHeightAsLong)AsLong'CloseClipboard關(guān)閉剪貼板,這使其他窗口能訪問(wèn)剪貼板PrivateDeclareFunctionCloseClipboardLib
6、"user32"()AsLong'CreateDC該函數(shù)通過(guò)使用指定的名字為一個(gè)設(shè)備創(chuàng)建設(shè)備上下文環(huán)境。PrivateDeclareFunctionCreateDCLib"gdi32"Alias"CreateDCA"(ByVallpDriverNameAsString,ByVallpDeviceNameAsString,ByVallpOutputAsString,lpInitDataAsLong)AsLongConstMAX_TOOLTIPAsInteger=64ConstNIF_ICON=&H2'刪除圖標(biāo)ConstNIF_M
7、ESSAGE=&H1ConstNIF_TIP=&H4ConstNIM_ADD=&H0'添加圖標(biāo)到任務(wù)欄提示區(qū)ConstNIM_DELETE=&H2ConstWM_MOUSEMOVE=&H200ConstWM_LBUTTONUP=&H202ConstWM_RBUTTONUP=&H205PrivateTypeNOTIFYICONDATAcbSizeAsLonghwndAsLonguIDAsLonguFlagsAsLonguCallbackMessageAsLonghIconAsLongszTipAsString*MAX_TOOLT
8、IPEndTypePrivateDeclareFunctionGetMenuLib"user32"(ByValhwndAsLong)AsLongPrivateDeclareFunctionGetSubMenuLib"user32"(ByValhMenuAsLong,ByVal