Guidance
指路人
g.yi.org
software / rapidq / Examples / File & Directory / launcher / filelist.bas

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

  
'' Simple Application Launcher
'' How to use the File List Box as a Directory List Box in Rapid-Q by William Yu

     $INCLUDE "RAPIDQ.INC"

     DECLARE SUB ChangeDirectories
     DECLARE SUB ExecuteApplication
     DECLARE SUB ResizeForm

     CREATE Form AS QFORM
      Height = 300
      Width = 450
      CREATE DirList AS QFILELISTBOX     '' Can double as a Directory list box
       ShowIcons = True
       Mask = "*.*"
       AddFileTypes(ftDirectory)          '' Add Directories
       DelFileTypes(ftNormal)             '' Remove files (see RAPIDQ.INC for values)
       OnDblClick = ChangeDirectories
       Height = Form.ClientHeight
       Width = 200
      END CREATE
      CREATE EXEList AS QFILELISTBOX
       ShowIcons = True
       Mask = "*.EXE"
       OnDblClick = ExecuteApplication
       Left = 215
       Height = Form.ClientHeight
       Width = 225
      END CREATE
      Center
      CAPTION = DirList.Directory
      OnResize = ResizeForm
      SHOWMODAL
     END CREATE


     SUB ChangeDirectories
      CHDIR(DirList.Item(DirList.ItemIndex) - "[" - "]")
      DirList.Directory = CURDIR$:  EXEList.Directory = CURDIR$
      Form.CAPTION = CURDIR$
     END SUB

     SUB ExecuteApplication
      RUN EXEList.FileName    ' Non-Blocking
'  SHELL EXEList.FileName  ' Blocks, until program terminates
                           ' Becareful running 16-bit applications
     END SUB

     SUB ResizeForm
      DirList.Height = Form.ClientHeight
      EXEList.Height = Form.ClientHeight
      EXEList.Width = Form.ClientWidth - 215
     END SUB
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2023-2-3  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:1999-09-16 19:25:36