请问为什么这段代码总是说第二句的对象变量或 with 块变量未设置???
Dim Pic As StdPicture
Pic.AutoRedraw = True
Pic.Picture = LoadPicture("C:\test.jpg")
Pic.CurrentX = (Pic.Width - Pic.TextWidth("test")) / 2
Pic.CurrentY = (Pic.Height - Pic.TextHeight("test")) / 2
Pic.Print "test"
SavePicture Pic.Image, "c:\new.jpg"
Dim Pic As StdPicture
Pic.AutoRedraw = True
Pic.Picture = LoadPicture("C:\test.jpg")
Pic.CurrentX = (Pic.Width - Pic.TextWidth("test")) / 2
Pic.CurrentY = (Pic.Height - Pic.TextHeight("test")) / 2
Pic.Print "test"
SavePicture Pic.Image, "c:\new.jpg"
免费的学习交流网站,欢迎大家访问!
http://www.j2soft.cn/
lz还是老老实实用控件来做。 放个picture控件: 名称改为pic
再把Dim Pic As StdPicture去掉。 就应该ok了!!
这些你用的属性,方法,都是picture控件的方法啊,
要达到你的目的,这个控件最方便。要不显示,visiable=false就可以了。
不清楚其他的方法。。