Guidance
指路人
g.yi.org
software / rapidq / Examples / Date & Time / A complete PRG / modMain.bas

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
'*****************************************************************************'
'CODER : Victor Garnier (FRANCE).                                             '
'CODER EMAIL : victor.garnier@ifrance.com                                     '
'REALEASE DATE : 15/10/2002                                                   '

'-----------------------------------------------------------------------------'
     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
    'récupère ce qui est à droite du délimiteur '\'

      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
掌柜推荐
 
 
¥860.00 ·
 
 
¥410.00 ·
 
 
¥288.00 ·
 
 
¥918.00 ·
 
 
¥288.00 ·
 
 
¥264.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-10-15 13:07:58