社区
VB基础类
帖子详情
image的属性picture一点击load,就退出VB,怎么回事?
powerstar
2000-08-03 04:46:00
image的属性picture,一点击load,就退出VB,怎么回事?
我在两个机子上都出现了同一问题,有一台从新装了WIN98就好了,难道是操作系统的原因么?
在程序中写函数是可以的。
...全文
152
8
打赏
收藏
image的属性picture一点击load,就退出VB,怎么回事?
image的属性picture,一点击load,就退出VB,怎么回事? 我在两个机子上都出现了同一问题,有一台从新装了WIN98就好了,难道是操作系统的原因么? 在程序中写函数是可以的。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
8 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
prefix
2000-08-08
打赏
举报
回复
是操作系统的问题。我和我朋友都遇到多次了。重装win98就行了。
TerryMai
2000-08-07
打赏
举报
回复
你的VB出问题了~!
先重装VB一次~!
如果还不行的话,我建议你装WIN2000
wulang
2000-08-05
打赏
举报
回复
何以见得是Bug?
我用的很好啊,没有出现powerstar所说的问题,可能是系统出问题了吧。
Un1
2000-08-04
打赏
举报
回复
VB BUG
OUYAN
2000-08-04
打赏
举报
回复
可能是系统的原因吧。
shines77
2000-08-03
打赏
举报
回复
哦 是这样啊,这样就奇怪了,我也没有遇到过,我想应该是调用对话框的comctl32.dll出错了,还是,你装的是VB5还是VB6啊,怎么会这样呢,大家知道是怎么回事吗,我估计多半是系统问题。Win98是第二版吗?PictureBox也出错吗??
powerstar
2000-08-03
打赏
举报
回复
shines,是这样的,我在窗口中加入了image控件,image的属性中不是有一个picture么,Picture的属性值是图形文件,我只要一点击“...”,就退出了VB。
不知是什么原因?
shines77
2000-08-03
打赏
举报
回复
image的属性picture有load吗,怎么点击load啊,请你说清楚。
是不是
假设ImageArray(0)以存在,并且是Image
Load ImageArray(1)
出错?
还是什么,肯定不是,请你列出源程序说明。
要不然帮不了你,是不,大伙,有谁看懂了?
VB
动态改变图像框
Image
的Stretch
属性
.rar
VB
动态改变图像框
Image
的Stretch
属性
,用户通过自定义的两款代码,可随意改变
image
的长度和宽度大小,不过本源码将此两种操作封装在按钮事件中,用户只需单击按钮,即可放大或缩小
image
框,动态改变了
Image
的Stretch
属性
,可以按如下方法定义按钮事件: Private Sub Form_
Load
()
Image
1.
Pic
tu
re =
Load
Pic
tu
re(App.Path "\e055.ico") '加载图片 End Sub Private Sub Command1_Click()
Image
1.Stretch = True '缩放图形来适应控件的大小 End Sub Private Sub Command2_Click()
Image
1.Stretch = False '缩放控件来适应图形的大小 End Sub Private Sub Command3_Click()
Image
1.Width =
Image
1.Width * 2 '放大图像框
Image
1.Height =
Image
1.Height * 2 End Sub Private Sub Command4_Click()
Image
1.Width =
Image
1.Width / 2 '缩小图像框
Image
1.Height =
Image
1.Height / 2 End Sub 完整的源代码请下载查看。
vb
窗体设计
内有设计窗体的图片,和运行效果图 该窗体由全图片构造,包括,标题栏,最大化、最小化、关闭按钮,一下为部分代码, Private Sub Form_
load
() Dim retValue As Long
Image
5.
Pic
tu
re =
Load
Pic
tu
re("D:\
vb
测试\
vb
实例\窗体的设计2\8.jpg")
Image
6.
Pic
tu
re =
Load
Pic
tu
re("D:\
vb
测试\
vb
实例\窗体的设计2\8.jpg")
Image
7.
Pic
tu
re =
Load
Pic
tu
re("D:\
vb
测试\
vb
实例\窗体的设计2\8.jpg")
Image
8.
Pic
tu
re =
Load
Pic
tu
re("D:\
vb
测试\
vb
实例\窗体的设计2\8.jpg") Form1.Top = 0 '设置窗体上边界位置 Form1.Left = Screen.Width - Form1.Width retValue = SetWindowPos(Me.hwnd, HWND_TOPMOST, Me.CurrentX, Me.CurrentY, 300, 300, SWP_SHOWWINDOW) End Sub Private Sub
Image
1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) ReleaseCap
tu
re SendMessage hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0& End Sub Private Sub
Image
2_Click() Form1.WindowState = 1 End Sub Private Sub
Image
4_Click() End End Sub Private Sub
Image
5_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Image
5.
Pic
tu
re =
Load
Pic
tu
re("D:\
vb
测试\
vb
实例\窗体的设计2\9.jpg") End Sub Private Sub
Image
5_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
Image
5.
Pic
tu
re =
Load
Pic
tu
re("D:\
vb
测试\
vb
实例\窗体的设计2\8.jpg") End Sub Private Sub
Image
6_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Image
6.
Pic
tu
re =
Load
Pic
tu
re("D:\
vb
测试\
vb
实例\窗体的设计2\9.jpg") End Sub Private Sub
Image
6_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
Image
6.
Pic
tu
re =
Load
Pic
tu
re("D:\
vb
测试\
vb
实例\窗体的设计2\8.jpg") End Sub
利用activeX实现matlab和
vb
的混合编程-
vb
_matlab_activeX.rar
利用activeX实现matlab和
vb
的混合编程-
vb
_matlab_activeX.rar 想要在
vb
里面直接执行matlab的代码吗?想省去编译dll文件的代码吧? 好的,activeX帮你实现这样的功能. activeX简介: ActiveX部件是Microsoft公司提供的一种用于模块集成的新的协议,它是Visual Basic工具箱的扩充部分。在程序中加入ActiveX后,它将成为开发和运行环境的一部分。Matlab实现了ActiveX自动化服务支持,在Visual Basic下通过ActiveX自动化接口可将Matlab作为Visual Basic语言的一个ActiveX部件调用,实现
VB
与MATLAB间的无缝集成,该方式比较适合C/S模式,具有自动化程度高、效率高、占用资源少、数据交换能力强等优点,大大缩短了程序开发周期,优化了系统性能。 activeX运用: 使用ActiveX部件,首先必须获得Matlab ActiveX对象在系统注册表中定义的名字─Matlab.Application。在
VB
中创建ActiveX对象的代码如下: Dim Matlab as Object. Set Matlab = CreateObject Matlab.Application对象主要有3个函数,具体如下: (1) BSTR Execute([in]BSTR Command)方法 接受单一的字符串(Command), MATLAB将运行命令及结果作为一个字符串返回。用于执行一个合法的MATLAB命令; (2) PutFullMatrix方法 void PutFullMatrix pr, [in] SAFEARRAY pr, [in] SAFEARRAY pi ) 将一个指定变量名的一维或二维数组(mxArray)放入工作空间。 (3) GetFullMatrix方法 void GetFullMatrix pr, [in] SAFEARRAY pr, [in] SAFEARRAY pi ) 通过GetFullMatrix方法,从指定的工作空间检索一个完整的一维或二维的实型或虚型数组(mxArray),其实部和虚部分别存放到两个单独的Double型数组中。[2] 通过这三种方法,可以方便地利用Matlab执行命令,从
VB
向Matlab中输送数据或者从Matlab中获取数据。 实例举例: 1.程序功能: 给出三个变量:x=0:0.05*pi:10*pi;y=sin;z=cos 并且做出x,y,z的三维图形,并在
vb
的
image
窗口中显示, 下面是
vb
程序的界面,只有一个command按钮和
image
图片框 程序界面.jpg 下面是程序的运行结果: 程序运行结果.jpg 2.代码 Dim Matlab As Object Dim Result1 As String Dim Result2 As String Dim Result3 As String Private Sub Command1_Click() Result1 = Matlab.Execute;z=cos") Result2 = Matlab.Execute") Result3 = Matlab.Execute")
Image
1.
Pic
tu
re = Clipboard.GetData() Call Matlab.quit '
退出
Matlab End Sub Private Sub Form_
Load
() Set Matlab = CreateObject End Sub 3.程序源程序:
vb
_matlab_activeX.rar
sql+
vb
。点餐系统
点餐系统,sql+
vb
。大家交流 VERSION 5.00 Begin
VB
.Form 主食 BackColor = &H80000009& Caption = "主食" ClientHeight = 9165 ClientLeft = 450 ClientTop = 1425 ClientWidth = 14400 LinkTo
pic
= "Form7" ScaleHeight = 9165 ScaleWidth = 14400 Begin
VB
.Timer Timer1 Interval = 800 Left = 4920 Top = 8400 End Begin
VB
.CommandButton Command1 BackColor = &H00FF00FF& Caption = "返回" Down
Pic
tu
re = "曹道耘3.frx":0000 BeginProperty Font Name = "宋体" Size = 14.25 Charset = 134 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 8280
Pic
tu
re = "曹道耘3.frx":41FA TabIndex = 5 Top = 8400 Visible = 0 'False Width = 1215 End Begin
VB
.
Image
Image
5 Height = 4410 Left = 4920
Pic
tu
re = "曹道耘3.frx":8707 Top = 2760 Width = 4455 End Begin
VB
.
Image
Image
4 Height = 4395 Left = 9840
Pic
tu
re = "曹道耘3.frx":D393 Top = 4680 Width = 4470 End Begin
VB
.
Image
Image
3 Height = 4380 Left = 9840
Pic
tu
re = "曹道耘3.frx":12B42 Top = 120 Width = 4470 End Begin
VB
.
Image
Image
2 Height = 4380 Left = 120
Pic
tu
re = "曹道耘3.frx":17B18 Top = 4680 Width = 4455 End Begin
VB
.
Image
Image
1 Height = 4410 Left = 12
Using DIB Sections in
VB
Using DIB Sections in
VB
An Easy to Use Class for manipulating DIBSections plus a blindingly quick technique for updating the bits Updated! 17 February 1999 The previous version of this code crashed when run under NT4.0. This was because the code was not always clearing up the SAFEARRAY pointer after it had finished using it. Under Win9x, this did not cause a problem but NT is stricter. All the samples and the code are now updated to fix this problem. This is a supporting article describing in more detail the DIB Section techniques used in the
vb
Accelerator
Image
Processor. It describes what DIB Sections are, how to use them and provides a class I wrote to wrap up the DIB Section. What is a DIB Section?A DIB (Device Independent Bitmap) Section is a GDI object like a standard DIB but which additionally provides a pointer to the memory used to store the bitmap bits to which the creating application has direct access. This allows ultimate flexibility if you want to modify the bits of a bitmap. Using DIB SectionsA DIB section is created using the GDI CreateDIBSection call. You need to modify the declare provided for this in the
VB
API guide because this declare assumes you cannot use the pointer to the bitmap re
tu
rned by the function and simply discards it. Here are the declares you need:Private Type BITMAPINFOHEADER '40 bytes biSize As Long biWidth As Long biHeight As Long biPlanes As Integer biBitCount As Integer biCompression As Long biSize
Image
As Long biXPelsPerMeter As Long biYPelsPerMeter As Long biClrUsed As Long biClrImportant As Long End Type Private Type BITMAPINFO bmiHeader As BITMAPINFOHEADER bmiColors As RGBQUAD End Type ' Note - this is not the declare in the API viewer - modify lplpVoid to be ' Byref so we get the pointer back:
VB基础类
7,763
社区成员
197,609
社区内容
发帖
与我相关
我的任务
VB基础类
VB 基础类
复制链接
扫一扫
分享
社区描述
VB 基础类
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章