Date: 02-16-2022
Return to Index
created by gbSnippets
#Compile Exe
#Dim All
'--------------------------------------------------------------------
#Include "WIN32API.INC"
'--------------------------------------------------------------------
%IDC_LISTBOX1 = 161
'====================================================================
Function PBMain () As Long
Local hDlg, lRes As Long, sBuf As String
Dialog New 0, "LB_DIR test",,, 160, 115, %WS_Caption Or %WS_SysMenu, 0 To hDlg
'------------------------------------------------------------------
Control Add ListBox, hDlg, %IDC_LISTBOX1, , 5, 5, 149, 105
sBuf = "C:\Windows\*.*" ' path + file type
Control Send hDlg, %IDC_LISTBOX1, %LB_DIR, _
%DDL_ARCHIVE, StrPtr(sBuf) To lRes
Dialog Set Text hDlg, Str$(lRes+1) + " Archive files in " + sBuf
'-------------------------------------------------------------------
Dialog Show Modal hDlg
End Function
http://www.garybeene.com/sw/gbsnippets.htm