如何用vb制作一个类似word里的“打开”对话框

来源:百度知道 编辑:UC知道 时间:2024/06/15 02:58:16
如何用vb制作一个类似word里的“打开”对话框。麻烦吗?有直接可以用的控件吗?

通用对话框控件可以。

我知道,但记得加分,因为这个很有专业性.
在模块中加如下代码:

Public 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

Public Const OFN_LONGNAMES = &H200000

Public Const OFN_PATHMUSTEXIST = &H800

Public Const OFN_FILEMUSTEXIST = &H1000