3 Return without GoSub 5 Invalid procedure call or argument 6 Overflow 7 Out of memory 9 Subscript out of range 10 This array is fixed or temporarily locked 11 Division by zero 13 Type mismatch 14 Out of string space 16 Expression too complex 17 Can't perform requested operation 18 User interrupt occurred 20 Resume without error 28 Out of stack space 35 Sub or Function not defined 47 Too many DLL application clients 48 Error in loading DLL 49 Bad DLL calling convention 51 Internal error 52 Bad file name or number 53 File not found 54 Bad file mode 55 File already open 57 Device I/O error 58 File already exists 59 Bad record length 61 Disk full 62 Input past end of file 63 Bad record number 67 Too many files 68 Device unavailable 70 Permission denied 71 Disk not ready 74 Can't rename with different drive 75 Path/File access error 76 Path not found 91 Object variable or With block variable not set 92 For loop not initialized 93 Invalid pattern string 94 Invalid use of Null 96 Unable to sink events of object because the object is already firing events to the maximum number of event receivers that it supports 97 Can not call friend function on object which is not an instance of defining class 98 A property or method call cannot include a reference to a private object, either as an argument or as a return value 321 Invalid file format 322 Can't create necessary temporary file 325 Invalid format in resource file 380 Invalid property value 381 Invalid property array index 382 Set not supported at runtime 383 Set not supported (read-only property) 385 Need property array index 387 Set not permitted 393 Get not supported at runtime 394 Get not supported (write-only property) 422 Property not found 423 Property or method not found 424 Object required 429 ActiveX component can't create object 430 Class does not support Automation or does not support expected interface 432 File name or class name not found during Automation operation 438 Object doesn't support this property or method 440 Automation error 442 Connection to type library or object library for remote process has been lost. Press OK for dialog to remove reference. 443 Automation object does not have a default value 445 Object doesn't support this action 446 Object doesn't support named arguments 447 Object doesn't support current locale setting 448 Named argument not found 449 Argument not optional 450 Wrong number of arguments or invalid property assignment 451 Property let procedure not defined and property get procedure did not return an object 452 Invalid ordinal 453 Specified DLL function not found 454 Code resource not found 455 Code resource lock error 457 This key is already associated with an element of this collection 458 Variable uses an Automation type not supported in Visual Basic 459 Object or class does not support the set of events 460 Invalid clipboard format 461 Method or data member not found 462 The remote server machine does not exist or is unavailable 463 Class not registered on local machine 481 Invalid picture 482 Printer error 735 Can't save file to TEMP 744 Search text not found 746 Replacements too long
Option Explicit '*********************************************************** Public Function GetErrDescript(lngErrNumber As Long) 'Purpose: 根据给定的错误ID On Error Resume Next Err.Raise lngErrNumber GetErrDescript = Err.Description End Function '*********************************************************** Public Function ListErr(ctlListBox As ListBox, _ lngErrFrom As Long, _ lngErrTo As Long) 'Purpose :列出一个错误到列表框 On Error Resume Next ctlListBox.Clear Dim lngErr As Long Dim strErrDescript As String For lngErr = lngErrFrom To lngErrTo strErrDescript = GetErrDescript(lngErr) With ctlListBox If strErrDescript <> "" Then .AddItem GetErrDescript(lngErr) .ItemData(.NewIndex) = lngErr End If
5 Invalid procedure call or argument
6 Overflow
7 Out of memory
9 Subscript out of range
10 This array is fixed or temporarily locked
11 Division by zero
13 Type mismatch
14 Out of string space
16 Expression too complex
17 Can't perform requested operation
18 User interrupt occurred
20 Resume without error
28 Out of stack space
35 Sub or Function not defined
47 Too many DLL application clients
48 Error in loading DLL
49 Bad DLL calling convention
51 Internal error
52 Bad file name or number
53 File not found
54 Bad file mode
55 File already open
57 Device I/O error
58 File already exists
59 Bad record length
61 Disk full
62 Input past end of file
63 Bad record number
67 Too many files
68 Device unavailable
70 Permission denied
71 Disk not ready
74 Can't rename with different drive
75 Path/File access error
76 Path not found
91 Object variable or With block variable not set
92 For loop not initialized
93 Invalid pattern string
94 Invalid use of Null
96 Unable to sink events of object because the object is already firing events to the maximum number of event receivers that it supports
97 Can not call friend function on object which is not an instance of defining class
98 A property or method call cannot include a reference to a private object, either as an argument or as a return value
321 Invalid file format
322 Can't create necessary temporary file
325 Invalid format in resource file
380 Invalid property value
381 Invalid property array index
382 Set not supported at runtime
383 Set not supported (read-only property)
385 Need property array index
387 Set not permitted
393 Get not supported at runtime
394 Get not supported (write-only property)
422 Property not found
423 Property or method not found
424 Object required
429 ActiveX component can't create object
430 Class does not support Automation or does not support expected interface
432 File name or class name not found during Automation operation
438 Object doesn't support this property or method
440 Automation error
442 Connection to type library or object library for remote process has been lost. Press OK for dialog to remove reference.
443 Automation object does not have a default value
445 Object doesn't support this action
446 Object doesn't support named arguments
447 Object doesn't support current locale setting
448 Named argument not found
449 Argument not optional
450 Wrong number of arguments or invalid property assignment
451 Property let procedure not defined and property get procedure did not return an object
452 Invalid ordinal
453 Specified DLL function not found
454 Code resource not found
455 Code resource lock error
457 This key is already associated with an element of this collection
458 Variable uses an Automation type not supported in Visual Basic
459 Object or class does not support the set of events
460 Invalid clipboard format
461 Method or data member not found
462 The remote server machine does not exist or is unavailable
463 Class not registered on local machine
481 Invalid picture
482 Printer error
735 Can't save file to TEMP
744 Search text not found
746 Replacements too long
Description 属性
返回或设置一个字符串表达式,包含与对象相关联的描述性字符串。可读/可写。对于 Err 对象,返回或设置与错误相关联的描述性字符串。说明Description 属性设置对错误进行简短描述。当无法处理或不想处理错误的时候,可以使用这个属性提醒用户。在生成用户自定义的错误时,将有关此错误的一个简短陈述指定给 Description 属性。如果 Description 未填入数据,而且 Number 的值与 Visual Basic 运行时错误一致,那么在生成错误时,将 Error 函数返回的字符串放置在 Description 中。
'***********************************************************
Public Function GetErrDescript(lngErrNumber As Long)
'Purpose: 根据给定的错误ID
On Error Resume Next
Err.Raise lngErrNumber
GetErrDescript = Err.Description
End Function
'***********************************************************
Public Function ListErr(ctlListBox As ListBox, _
lngErrFrom As Long, _
lngErrTo As Long)
'Purpose :列出一个错误到列表框
On Error Resume Next
ctlListBox.Clear
Dim lngErr As Long
Dim strErrDescript As String
For lngErr = lngErrFrom To lngErrTo
strErrDescript = GetErrDescript(lngErr)
With ctlListBox
If strErrDescript <> "" Then
.AddItem GetErrDescript(lngErr)
.ItemData(.NewIndex) = lngErr
End If
End With
Next
End Function
'***********************************************************
Private Sub cmdShowErr_Click()
dim lngFrom ,lngTo
Me.ListErr Me.lstA,lngFrom ,lngTo
End Sub'***********************************************************花了几分钟,写了几个函数,希望能够对你有用!
'***********************************************************
'广告时间:对不起
广告:我的第一个Visual Basic 6.0作品,欢迎大家试用,注册用户得到全部源代码。一、EasyDialog能够做什么?
(为了增强Windows通用打开/保存对话框,能够快速的打开经常访问的文件夹或者文件)
一、快速地在通用打开/保存对话框中打开你经常访问的文件夹/文件。
二、快速地在Windows Explorer中打开经常访问的文件夹/文件。
三、快速地在IE浏览器打开你经常访问的网站。
四、快速地给你的朋友发Email
五、能够使您方便地按照逻辑分类来组织和管理您的文件夹/文件,您经常访问的网址,您的Email地址。'********************************************
'*下载EasyDialog:
http://www.softboyzhou.com/download/EasyDialog.asp
'***************
'*购买EasyDialog:
http://www.softreg.com.cn/shareware_view.asp?id=/7148D197-1C1D-4E84-B92A-EE2CC07D27C0/
'***************
'*给我写信:有什么问题请来信。
[email protected]
'********************************************
*为什么我要对注册用户提供源代码呢?
当我把我的第一个软件作品发布之后。给我的一些朋友发了一封信。信的大致内容是:我刚用Visual Basic 6.0搞了一个软件
,希望你们能够下载试用。你们觉得会有人来买这个软件吗?你们觉得我的定价是不是合适呢?
于是朋友们反馈回来的信息是:
有的朋友说:软件不错,不过可能市场前景不好,因为市场上有许多同类软件。
有的朋友说:定价也不是很高。如果你想让很多的人来购买,你必须要找到合适的买主。也就是那些需要你的软件的人。
有的朋友开玩笑说:我也想学Visual Basic 6.0。不如这样吧!我去注册一份,你把源代码给我吧!
我有些激动:源代码!你知道这些源代码有多少Module,Class.
我些是我的全部心血,如果我都给你,我还凭什么混饭吃。
这个朋友半认真的说:老兄不要激动,我只是和你开玩笑的。我知道你的那些源代码的价值。不过有一句话"人生最美丽的补偿之一,就是人们真诚地帮助别人之后,同时也帮助了自己"。道理很简单:如果你的软件不能够解决别人的问题,别人怎么会来购买呢?。我也知道你现在需要一些资金来运转,你的网站太简陋,我看得请了美术设计帮你弄一弄,你的产品也该做做广告。不如把源代码提供给那些真真需要它的人吧,你帮助了别人,同时也帮助了自己。你的源代码不管是对于初学者,还是那些想提高的朋友都是非常有价值的。我也发现你很有灵感和创意。例如你的网站就是一简单的例子,你刚学了ASP,就搞了一个"无代码解决方案"。那天你写信告诉我,说你的网站开通了,让我去看看,觉得怪怪的。后来你说,你觉得网站更新很麻烦,你的"无代码解决方案"(三个ASP文件 Default.asp,Dir.asp,Content.asp)就是自动根据网站的目录结构来建立动态的页面,这样就使一个网站很像一个Windows的资源管理器。如果你能够让你的灵感和创意来帮助其他的人来解决他们的问题,那些热心善良的人也会来帮助你的。
听了朋友的话,我久久地不能平静:"人生最美丽的补偿之一,就是人们真诚地帮助别人之后,同时也帮助了自己"
'********************************************'*我的决定
面对下一个问题,做一个决定,做任何决定都好,任何决定总比没有决定好。
于是我决定:对于购买了EasyDialog的朋友,开放它的源代码。并且提供长期的Email技术支持。
如果有很多人怎么办?一天100封信,你受得了吗?
我的决定:我会将代码注解写得更详细,然后把新的版本发给用户。另外我会将常见的问题汇编到一起,定期的发给用户。
如果没有人要我的源代码怎么办?
我的决定:我会有更多的时间,继续开发下一个项目。用我的源代码再写几个程序,决不放弃。'********************************************
'*我的源代码中有什么?
*解决方案:怎样实现程序的多语言(我的一个解决方案)
*解决方案:怎样实现动态帮助(当鼠标指针移动到一个控件上方是,动态显示相关的帮助)
*解决方案:怎样来用一个文件来保存设置(我的INI文件解决方案,没有文件尺寸的限制,设置串没有长度限制,设置串能够包括回车)
*解决方案:注册码生成算法和验证算法。(我的一个解决方案)
.........
*大量的实用模块
Module=mdlEnumWindow; EnumWindows.bas
Module=mdlWindow; mdlWindow.bas
Module=ApiConst; ApiConst.bas
Module=mdlMath; mdlMath.bas
Class=clsEasyDialog; clsEasyDialog.cls
Class=clsEasyKey; clsEasyKey.cls
Class=oWindow; oWindow.cls
Form=frmWindowUnderMouse.frm
Module=mdlList; mdlList.bas
Class=clsEditMode; clsEditMode.cls
Module=mdlShell; mdlShell.bas
Module=basMisc; basMisc.bas
Form=frmCommonDialog.frm
Class=clsHelp; clsHelp.cls
Class=clsPosition; clsPosition.cls
Form=frmAbout.frm
Form=frmDriverE.frm
Module=mdlUtilities; ..\Utilities\mdlUtilities.bas
Form=frmEasyDialogD.frm
Class=clsEncrypt; clsEncrypt.cls
Form=frmRegisterD.frm
Module=mdlRegister; mdlRegister.bas
Module=mdlAbout; mdlAbout.bas
Module=mdlEasyDialog; mdlEasyDialog.bas
Module=mdlTextBox; ..\Utilities\mdlTextBox.bas
Module=mdlSpecialFolder; ..\Utilities\mdlSpecialFolder.bas'********************************************
'*下载EasyDialog:
http://www.softboyzhou.com/download/EasyDialog.asp
'***************
'*购买EasyDialog:
http://www.softreg.com.cn/shareware_view.asp?id=/7148D197-1C1D-4E84-B92A-EE2CC07D27C0/
'********************************************
'*给我写信:有什么问题请来信。
[email protected]