Verkenner in Userform

Status
Niet open voor verdere reacties.

Kramer

Gebruiker
Lid geworden
12 jun 2002
Berichten
447
Hallo iedereen,

Ik ben al een tijdje bezig om een userform te ontwikkelen die een bepaalde map in de verkenner opend en die laat zien in het userform.


Wie kan mij helpen.

Bedankt voor het meedenken.
 
zal je de windows api's moeten gebruiken, google eens naar apiviewer, krijg je zo'n beetje alle beschikbare api-functies te zien met vb voorbelden.
dit werkt in ieder geval bij mij:
Option Compare Database
Option Explicit

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

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


Declare Function GetSaveFileName Lib "comdlg32.dll" _
Alias "GetSaveFileNameA" (pOPENFILENAME As OPENFILENAME) _
As Long

Function OpenBestand() As String
Dim xOpenBestand As OPENFILENAME
Dim Bericht As String
xOpenBestand.lStructSize = Len(xOpenBestand)
xOpenBestand.hwndOwner = Form_frmImporteren.Hwnd
xOpenBestand.lpstrFilter = "Tekstbestanden (*.txt)" + Chr$(0) + "*.*"
xOpenBestand.lpstrFile = Space$(254)
xOpenBestand.nMaxFile = 255
xOpenBestand.lpstrFileTitle = Space$(254)
xOpenBestand.nMaxFileTitle = 255
xOpenBestand.lpstrInitialDir = "C:\JP CWI\2006"
xOpenBestand.lpstrTitle = "Importeren"
xOpenBestand.flags = 0
If GetOpenFileName(xOpenBestand) > 0 Then

End If
OpenBestand = Trim$(xOpenBestand.lpstrFile)
End Function
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan