image的属性picture一点击load,就退出VB,怎么回事?

powerstar 2000-08-03 04:46:00
image的属性picture,一点击load,就退出VB,怎么回事?
我在两个机子上都出现了同一问题,有一台从新装了WIN98就好了,难道是操作系统的原因么?
在程序中写函数是可以的。
...全文
152 8 打赏 收藏 转发到动态 举报
写回复
用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)
出错?
还是什么,肯定不是,请你列出源程序说明。
要不然帮不了你,是不,大伙,有谁看懂了?
内有设计窗体的图片,和运行效果图 该窗体由全图片构造,包括,标题栏,最大化、最小化、关闭按钮,一下为部分代码, Private Sub Form_load() Dim retValue As Long Image5.Picture = LoadPicture("D:\vb测试\vb实例\窗体的设计2\8.jpg") Image6.Picture = LoadPicture("D:\vb测试\vb实例\窗体的设计2\8.jpg") Image7.Picture = LoadPicture("D:\vb测试\vb实例\窗体的设计2\8.jpg") Image8.Picture = LoadPicture("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 Image1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) ReleaseCapture SendMessage hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0& End Sub Private Sub Image2_Click() Form1.WindowState = 1 End Sub Private Sub Image4_Click() End End Sub Private Sub Image5_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) Image5.Picture = LoadPicture("D:\vb测试\vb实例\窗体的设计2\9.jpg") End Sub Private Sub Image5_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single) Image5.Picture = LoadPicture("D:\vb测试\vb实例\窗体的设计2\8.jpg") End Sub Private Sub Image6_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) Image6.Picture = LoadPicture("D:\vb测试\vb实例\窗体的设计2\9.jpg") End Sub Private Sub Image6_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single) Image6.Picture = LoadPicture("D:\vb测试\vb实例\窗体的设计2\8.jpg") End Sub
利用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的三维图形,并在vbimage窗口中显示,             下面是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") Image1.Picture = Clipboard.GetData() Call Matlab.quit '退出Matlab End Sub Private Sub Form_Load() Set Matlab = CreateObject End Sub 3.程序源程序: vb_matlab_activeX.rar
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 vbAccelerator 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 returned 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 biSizeImage 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:

7,763

社区成员

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

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