易截截图软件、单文件、免安装、纯绿色、仅160KB

vb调用getopenfilename打开多文件的问题

VB code:

Option Explicit

Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _
"GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long

Private Type OPENFILENAME
lStructSize As Long
hwndOwner As Long
hInstance As Long
lpstrFilter As String
lpstrCustomFilter As String
nMaxCustFilter As Long
nFilterIndex As Long
lpstrFile As String
nMaxFile As Long
lpstrFileTitle As String
nMaxFileTitle As Long
lpstrInitialDir As String
lpstrTitle As String
flags As Long
nFileOffset As Integer
nFileExtension As Integer
lpstrDefExt As String
lCustData As Long
lpfnHook As Long
lpTemplateName As String
End Type
Const OFN_ALLOWMULTISELECT = &H200
Const OFN_EXPLORER = &H80000
Const OFN_PATHMUSTEXIST = &H800
Const OFN_FILEMUSTEXIST = &H1000

Private Sub Command1_Click()
Dim OpenFile As OPENFILENAME
Dim lReturn As Long
Dim sFilter As String
OpenFile.lStructSize = Len(OpenFile)
OpenFile.hwndOwner = Me.hWnd
OpenFile.hInstance = App.hInstance
sFilter = "All Files(*.*)" & Chr(0)
OpenFile.lpstrFilter = sFilter
OpenFile.nFilterIndex = 1
OpenFile.lpstrFile = String(1000000, 0)


相关问答:

【急求】VB中使用WScript调用外部命令 - VB / 基础类

在下是vb的新手,想写段程序,在vb中,使用wscript调用一些外部的命令,但是程序执行一直有错误,请各位高手帮忙解答下,谢谢。
代码如下:
VB code:

Private Function getFile_CMD(filename, filepath) As Bo ......

帮我改改这VB题 - VB / 基础类

帮我改改 我总觉得有问题
Type ID
  number As Single
  score As Integer
  name As String * 6
End Type
Dim personl As ID, i%
Private Sub Command1_Click()
 i = 0
&nbs ......

关于VB.NET和MS ACCESS的问题

我写了一个软件,要用到ACCESS数据库,我再访问ACCESS的时候,我需要从表里读出一行数据,我的程序是这样写的,SQLSTRING="SELECT * from '" &ME.TEXTBOX1.TEXT &"' WHERE ID = '"& ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号