如何在VB中读写图片?

ta 2000-06-09 11:32:00
在VB中我们可在许多地方得到 如: Image Picture Icon 等图片. 但是如何在程序中改写其中的内容.
能否给出一段代码示范一下.
多谢!
...全文
175 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
jtk 2000-07-19
  • 打赏
  • 举报
回复
loadpicture("c:......") or call API
mafangsan 2000-06-09
  • 打赏
  • 举报
回复
假设Image控件名称为Image1
Private Sub Form_Click()
Image1.Picture=LoadPicture("c:\windows\clouds.bmp")
End Sub
xlzhou 2000-06-09
  • 打赏
  • 举报
回复
The image in VB is COM object.
It support IPictureDisp interface,
Query this interface and get_handle property can help you to get the image's handle. With the handle do anything you like.



Janven 2000-06-09
  • 打赏
  • 举报
回复
VB函数
LoadPicture
SavePicture

另外,你所谓的程序中改写具体什么意思?
Un1 2000-06-09
  • 打赏
  • 举报
回复
你可以先设form或picture或usercontrol的autoredraw为true,把它赋值于之后再hdc上重化, 然后在piantpicture,当然还可以把修改之后的内容存盘。

7,762

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧