Save the picture in the clipboard as JPG file with VB

zhaozj2021-02-16  52

Option Explicit 'button on a form, a control imgedit Private Sub Command1_Click () If (ImgEdit1.IsClipboardDataAvailable And ImgEdit1.ImageDisplayed) Then' image pasting from the clipboard, the parameters of Imgedit display region start coordinates ImgEdit1.ClipboardPaste 0, 0 imgedit1.completepaste Endiffs Save Image for JPG Format Imgedit1.saveas "E: /MC/mytest.jpg", WiFileTypejpg,, 6END SUB

Private Sub Form_Load () imgedit1.image = "e: /mc/m1.jpg" first let IMGEDIT displays a picture, otherwise, the following statement will occur when it is imgedit1.displayEND SUB

转载请注明原文地址:https://www.9cbs.com/read-23162.html

New Post(0)