十年網(wǎng)站開(kāi)發(fā)經(jīng)驗(yàn) + 多家企業(yè)客戶 + 靠譜的建站團(tuán)隊(duì)
量身定制 + 運(yùn)營(yíng)維護(hù)+專業(yè)推廣+無(wú)憂售后,網(wǎng)站問(wèn)題一站解決
例如,把文件"E:\新建文件夾\a.txt"復(fù)制到剪貼板
創(chuàng)新互聯(lián)成立與2013年,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作、外貿(mào)網(wǎng)站建設(shè)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元西固做網(wǎng)站,已為上家服務(wù),為西固各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:028-86922220
CreateObject("Shell.Application").NameSpace("E:\新建文件夾").ParseName("a.txt").InvokeVerb?"復(fù)制(C)"
Dim p1 As New Point(0, 0)
Dim p2 As New Point(My.Computer.Screen.WorkingArea.Width, My.Computer.Screen.WorkingArea.Height) '除工具欄全屏
Dim pic As New Bitmap(p2.X, p2.Y)
Using g As Graphics = Graphics.FromImage(pic)
g.CopyFromScreen(p1, p1, p2)
PictureBox1.Image = pic
End Using
Clipboard.SetImage(PictureBox1.Image)
截圖到PictureBox1中顯示,然后在把PictureBox1.image放到剪切板中
第一步,點(diǎn)擊VS工具
請(qǐng)點(diǎn)擊輸入圖片描述
第二步,打開(kāi)后,新建一個(gè)Windows窗體應(yīng)用程序
請(qǐng)點(diǎn)擊輸入圖片描述
第三步,新建完畢后,如圖所示
請(qǐng)點(diǎn)擊輸入圖片描述
第四步,拖動(dòng)文本框與按鈕,如圖示
請(qǐng)點(diǎn)擊輸入圖片描述
第五步,將剪貼板復(fù)制與粘貼代碼輸入,如圖示
請(qǐng)點(diǎn)擊輸入圖片描述
第六步,運(yùn)行程序
請(qǐng)點(diǎn)擊輸入圖片描述
7
第七步,點(diǎn)擊按鈕,成功從剪貼板中復(fù)制與粘貼操作
請(qǐng)點(diǎn)擊輸入圖片描述
用Computer類里的Clipboard的幾個(gè)Get函數(shù)
如獲取剪貼板里的文本
Dim c As New Microsoft.VisualBasic.Devices.Computer
MsgBox(c.Clipboard.GetText())
可以直接用My 里的
MsgBox(My.Computer.Clipboard.GetText())
獲取圖片
Me.BackgroundImage = My.Computer.Clipboard.GetImage()
在獲取前確定剪貼板里有沒(méi)有文本
If My.Computer.Clipboard.ContainsText Then
MsgBox(My.Computer.Clipboard.GetText)
End If
設(shè)置剪貼板里的文本
My.Computer.Clipboard.SetText(Now)
復(fù)制文件夾不用剪貼板,使用系統(tǒng)文件操作對(duì)象就好了
CreateObject("scripting.filesystemobject").copyfolder "c:\Program Files", "D:\Program Files"