真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

vb點(diǎn)虐 抓圖控件 vba抓取網(wǎng)頁(yè)數(shù)據(jù)

VB截取屏幕

[DllImport("user32.dll", EntryPoint = "GetDC")]

創(chuàng)新新互聯(lián),憑借十余年的網(wǎng)站設(shè)計(jì)制作、網(wǎng)站設(shè)計(jì)經(jīng)驗(yàn),本著真心·誠(chéng)心服務(wù)的企業(yè)理念服務(wù)于成都中小企業(yè)設(shè)計(jì)網(wǎng)站有1000+案例。做網(wǎng)站建設(shè),選創(chuàng)新互聯(lián)。

public static extern IntPtr GetDC(IntPtr hWnd);

[DllImport("user32.dll", EntryPoint = "ReleaseDC")]

public static extern IntPtr ReleaseDC(IntPtr hWnd, IntPtr hDC);

[DllImport("user32.dll", SetLastError = true)]

static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);

[DllImport("user32.dll", SetLastError = true)]

static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

先找到你要截圖的那個(gè)窗體的 句柄 然后根據(jù)這個(gè)句柄得到改窗體的DC 創(chuàng)建一個(gè)bitmap 然后填充 得到的bitmap后 顯示到picturebox里面

vb點(diǎn)虐 如何動(dòng)態(tài)添加picturebox 控件數(shù)組(在不知道圖片大小的情況下)

Dim PictureBox11(1) as PictureBox ‘放在最前面

Dim i as integer

Form_load 設(shè)i=0

動(dòng)態(tài)添加:

if ipicturebox11.ubound then load(picturebox11(i))

picturebox11(i).loadpicture("圖片地址")

Picture11(i).PaintPicture Picture11(i).Picture, 0, 0, Picture11(i).Width, Picture11(i).Height

picturebox11(i).visible=true

i=i+1

動(dòng)態(tài)刪除

i=i-1

unload picturebox11(i)

vb點(diǎn)虐 圖片按鈕如何實(shí)現(xiàn)?用什么控件?

用Button控件就可以了 修改BackgroundImage 屬性 類似這樣

Button1.BackgroundImage = Image.FromFile("C:\Users\hp\Desktop\EMOTICONS\EMOTICON SMILE.png")

如果要實(shí)現(xiàn)動(dòng)態(tài)效果的話需要2個(gè)圖片當(dāng)Button1_MouseHover事件時(shí)也就是鼠標(biāo)停留在button上的時(shí)候顯示一個(gè)圖片,當(dāng)Button1_MouseLeave事件時(shí),也就是鼠標(biāo)離開(kāi)button時(shí)顯示原來(lái)的圖片,這樣就是動(dòng)態(tài)的了.

VB.NET當(dāng)鼠標(biāo)停在屏幕任意地方,得到該點(diǎn)的顏色

我有個(gè)笨辦法,先用API抓圖到內(nèi)存里,然后再在根據(jù)你點(diǎn)鼠標(biāo)的屏幕工作區(qū)坐標(biāo),去那圖里取色。

-----------------------

'抓圖所需的API

Private Declare Function CreateCompatibleDC Lib "GDI32" (ByVal hDC As Integer) As Integer

Private Declare Function CreateCompatibleBitmap Lib "GDI32" (ByVal hDC As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer) As Integer

Private Declare Function SelectObject Lib "GDI32" (ByVal hDC As Integer, ByVal hObject As Integer) As Integer

Private Declare Function BitBlt Lib "GDI32" (ByVal srchDC As Integer, ByVal srcX As Integer, ByVal srcY As Integer, ByVal srcW As Integer, ByVal srcH As Integer, ByVal desthDC As Integer, ByVal destX As Integer, ByVal destY As Integer, ByVal op As Integer) As Integer

Private Declare Function DeleteDC Lib "GDI32" (ByVal hDC As Integer) As Integer

Private Declare Function DeleteObject Lib "GDI32" (ByVal hObj As Integer) As Integer

Declare Function GetDC Lib "user32" Alias "GetDC" (ByVal hwnd As Integer) As Integer

Const SRCCOPY As Integer = HCC0020

'抓圖的部分

Dim hDC, hMDC As Integer

Dim hBMP, hBMPOld As Integer

Dim sw, sh As Integer

hDC = GetDC(0)

hMDC = CreateCompatibleDC(hDC)

sw = Screen.PrimaryScreen.Bounds.Width

sh = Screen.PrimaryScreen.Bounds.Height

hBMP = CreateCompatibleBitmap(hDC, sw, sh)

hBMPOld = SelectObject(hMDC, hBMP)

BitBlt(hMDC, 0, 0, sw, sh, hDC, 0, 0, SRCCOPY)

hBMP = SelectObject(hMDC, hBMPOld)

Dim bmp As Bitmap = Image.FromHbitmap(New IntPtr(hBMP))

DeleteDC(hDC)

DeleteDC(hMDC)

DeleteObject(hBMP)

......

'取點(diǎn)的顏色

bmp.GetPixel(e.X, e.Y)

----------------------------

關(guān)鍵就是這些你自己組合吧,你分給的太少了,很麻煩,恕我不幫你改全了。如果要仔細(xì)幫你改,請(qǐng)另開(kāi)高分貼,不要用新馬甲來(lái)


網(wǎng)站名稱:vb點(diǎn)虐 抓圖控件 vba抓取網(wǎng)頁(yè)數(shù)據(jù)
鏈接地址:http://weahome.cn/article/ddgephi.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部