vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Brandneu! sevEingabe v3.0 - Das Eingabecontrol der Superlative!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2026
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

Visual-Basic Einsteiger
Re: vb5 ordnerauswahl control? oder code? 
Autor: wincnc
Datum: 25.12.06 01:51

Hallo, hab hier einen Code mit 'Neuer Ordner' erstellen.

Der Code geht im nächsten Post weiter !!!

Aufruf:
Private Sub Command1_Click()
Dim Pfad As String
  Pfad = BrowseForFolder("Wählen Sie einen Ordner", "C:\", Me.hwnd, False, , _
    True, False)
  MsgBox Pfad
End Sub
In Modul:
Option Explicit
 
Private Const DIALOG_CURRENT_SELECTION_TEXT As String = "Auswahl: "
 
Private Type BROWSEINFO
  hOwner As Long
  pidlRoot As Long
  pszDisplayName As String
  lpszTitle As String
  ulFlags As Long
  lpfnCallback As Long
  lParam As Long
  iImage As Long
End Type
 
Private Type RECT
  Left As Long
  Top As Long
  Right As Long
  Bottom As Long
End Type
 
Private Type Size
  cx As Long
  cy As Long
End Type
 
Private Declare Function SHBrowseForFolder Lib "shell32.dll" _
  Alias "SHBrowseForFolderA" ( _
    lpBrowseInfo As BROWSEINFO) As Long
 
Private Declare Function SHGetPathFromIDList Lib "shell32.dll" _
  Alias "SHGetPathFromIDListA" ( _
  ByVal lPIDL As Long, _
  ByVal pszPath As String) As Long
 
Private Declare Sub CoTaskMemFree Lib "ole32.dll" ( _
  ByVal pv As Long)
 
Private Declare Function SendMessage Lib "user32" _
  Alias "SendMessageA" ( _
  ByVal hwnd As Long, _
  ByVal wMsg As Long, _
  ByVal wParam As Long, _
  lParam As Any) As Long
 
Private Declare Sub CopyMemory Lib "kernel32" _
  Alias "RtlMoveMemory" ( _
  pDest As Any, _
  pSource As Any, _
  ByVal dwLength As Long)
 
Private Declare Function ILCreateFromPath Lib "shell32" _
  Alias "#157" ( _
  ByVal sPath As String) As Long
 
Private Declare Function LocalAlloc Lib "kernel32" ( _
  ByVal uFlags As Long, _
  ByVal uBytes As Long) As Long
 
Private Declare Function LocalFree Lib "kernel32" ( _
  ByVal hmem As Long) As Long
 
Private Declare Function lstrcpyA Lib "kernel32" ( _
  lpString1 As Any, _
  lpString2 As Any) As Long
 
Private Declare Function lstrlenA Lib "kernel32" ( _
  lpString As Any) As Long
 
Private Declare Function FindWindowEx Lib "user32.dll" _
  Alias "FindWindowExA" ( _
  ByVal hWnd1 As Long, _
  ByVal hWnd2 As Long, _
  ByVal lpsz1 As String, _
  ByVal lpsz2 As String) As Long
 
Private Declare Function GetWindowDC Lib "user32.dll" ( _
  ByVal hwnd As Long) As Long
 
Private Declare Function GetWindowRect Lib "user32.dll" ( _
  ByVal hwnd As Long, _
  ByRef lpRect As RECT) As Long
 
Private Declare Function GetTextExtentPoint Lib "gdi32.dll" _
  Alias "GetTextExtentPointA" ( _
  ByVal hDC As Long, _
  ByVal lpszString As String, _
  ByVal cbString As Long, _
  ByRef lpSize As Size) As Long
 
Private Declare Function PathCompactPath Lib "shlwapi.dll" _
  Alias "PathCompactPathA" ( _
  ByVal hDC As Long, _
  ByVal pszPath As String, _
  ByVal dx As Long) As Long
 
Private Const MAX_PATH = 260
 
Private Const WM_USER = &H400
 
Private Const BFFM_INITIALIZED = 1
Private Const BFFM_SELCHANGED As Long = 2
Private Const BFFM_SETSTATUSTEXTA As Long = (WM_USER + 100)
Private Const BFFM_SETSTATUSTEXTW As Long = (WM_USER + 104)
Private Const BFFM_ENABLEOK As Long = (WM_USER + 101)
Private Const BFFM_SETSELECTIONA As Long = (WM_USER + 102)
Private Const BFFM_SETSELECTIONW As Long = (WM_USER + 103)
 
Private Const BIF_NEWDIALOGSTYLE As Long = &H40
Private Const BIF_RETURNONLYFSDIRS As Long = &H1
Private Const BIF_BROWSEINCLUDEFILES As Long = &H4000
Private Const BIF_STATUSTEXT As Long = &H4
 
Private Const LMEM_FIXED = &H0
Private Const LMEM_ZEROINIT = &H40
Private Const LPTR = (LMEM_FIXED Or LMEM_ZEROINIT)
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
vb5 ordnerauswahl control? oder code?810xverbatim24.12.06 22:58
Re: vb5 ordnerauswahl control? oder code?638wincnc25.12.06 01:51
Re: vb5 ordnerauswahl control? oder code?651wincnc25.12.06 01:52
Re: vb5 ordnerauswahl control? oder code?566xverbatim25.12.06 08:25

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2026 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel