| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1086 人关注过本帖
标题:关于load和print 的问题请教
只看楼主 加入收藏
sclangman
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2007-7-23
收藏
 问题点数:0 回复次数:3 
关于load和print 的问题请教
各位老师:小的我一个vb初学者有一关于load和print 的问题请教。
我作一个小程序,在编程中发现:在窗体的load 事件中不能使用print
例如:一个form1的窗体中有一个picture1的picturebox,,在一个form1_load中加入
picture1.print “this is a picturebox”
在picture1中不能打印this is a picturebox,然而我加了一个command1的命令按钮,在command1_click中加入
picture1.print “this is a picturebox”
又能打印this is a picturebox
请问为什么?
搜索更多相关主题的帖子: print load 
2007-07-24 09:29
Joforn
Rank: 6Rank: 6
等 级:贵宾
威 望:23
帖 子:1242
专家分:122
注 册:2007-1-2
收藏
得分:0 

Private Sub Form_Load()
Picture1.AutoRedraw = True
Picture1.Print "this is a picturebox"
End Sub

'你在窗体加载时用的Print其实已经输出,但在窗体显示时会刷新窗体,而你的Picture1.AutoRedraw属性未设置为True话就会导致输出的图形再次被清空,这样你看到的窗体中就没有任何输出了。

VB QQ群:47715789
2007-07-24 09:58
sclangman
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2007-7-23
收藏
得分:0 
多谢!多谢!多谢!多谢!多谢Do
学习
Loop while 活着老师
2007-07-24 10:03
sclangman
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2007-7-23
收藏
得分:0 

多谢!多谢!多谢!多谢!多谢
Joforn 老师

2007-07-24 10:11
快速回复:关于load和print 的问题请教
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014251 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved