seeing as how I got such great help last time I needed help, I'm going to ask again
I'm trying to get my application to open a standard Open File dialog box, I found a little program on this site that had what i wanted, and there was no way I could get it to work... I"m using VB6.. what's the simplest steps in getting the dialog to work..
Here's a little app I made to show all 6 functions of the CommonDialog ocx. It uses a RichTextBox so you can save rtf files with colour.
Last edited by Keithuk; 12-07-2005 at 11:13 AM.
I've been programming with VB for 15 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
I've been programming with VB for 15 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
Hi ..... try the following code ... it worked for me ..
You need "comdlg32.dll" to call the open file dialog box ... Its info is given on MSDN site .. I don't remember the link .. but its something like this ...
I hope it helps........
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
Function SelectFileOpenDialog()
Dim strTemp, strTemp1, pathStr As String
Dim i, n, j As Long
Dim OpenFile As OPENFILENAME
Dim lReturn As Long
Dim sFilter As String
Dim Fname As String
Bookmarks