FUNCTION ShowDLGFolder() AS STRING
DIM iNull AS INTEGER
DIM lpIDList AS LONG
DIM lResult AS LONG
DIM sPath AS STRING
DIM udtBI AS BrowseInfo
udtBI.hWndOwner = frmMain.Handle
udtBI.lpszTitle = lstrcat("C:\\", "")
udtBI.ulFlags = BIF_USENEWUI
lpIDList = SHBrowseForFolder(udtBI)
IF lpIDList THEN
sPath = STRING$(MAX_PATH, 0)
SHGetPathFromIDList lpIDList, sPath
CoTaskMemFree lpIDList
iNull = INSTR(sPath, "")
IF iNull THEN
sPath = LEFT$(sPath, iNull - 1)
END IF
END IF
ShowDLGFolder = sPath
END FUNCTION
FUNCTION GetCompteName(strPath AS STRING) AS STRING
DIM strResult AS STRING
DIM i AS INTEGER
DIM strLen AS INTEGER
strLen = LEN(strpath)
strResult = ""
FOR i = strLen TO 1 STEP - 1
IF MID$(strpath,i,1) = "\" THEN
EXIT FOR
END IF
strResult = strResult + MID$(strPath,i,1)
NEXT
getCompteName = MID$(Reverse$(strResult),1,LEN(strResult)-4)
END FUNCTION
SUB QLValignment(Sender AS QLISTVIEW, ColAlign AS INTEGER, LeftCenterRight AS INTEGER)
DIM LvColumn AS tLVCOLUMN
LvColumn.mask=LVCF_FMT
LvColumn.fmt=LeftCenterRight
SM(Sender.Handle,LVM_SETCOLUMN,ColAlign,LvColumn)
RedrawWin(Sender.Handle,0,0,1)
END SUB
SUB ShowCalendar()
Form.SHOWMODAL
END SUB
|