Guidance
指路人
g.yi.org
software / rapidq / Examples / QObject / Object / QRun.inc

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

  
'=======================================================
' Type Objet
' Classe QRun
'=======================================================

     DECLARE FUNCTION FindExecutable LIB "shell32.dll" ALIAS "FindExecutableA" (lpFile AS STRING,lpDirectory AS STRING, ByRef lpResult AS STRING) AS LONG
     DECLARE FUNCTION ShellExecute LIB "shell32.dll" ALIAS "ShellExecuteA" (hwnd AS LONG,lpOperation AS STRING,lpFile AS STRING,lpParameters AS STRING,lpDirectory AS STRING,nShowCmd AS LONG) AS LONG

' ShowWindow() Commands
     CONST SW_HIDE=0
     CONST SW_SHOWNORMAL=1
     CONST SW_NORMAL=1
     CONST SW_SHOWMINIMIZED=2
     CONST SW_SHOWMAXIMIZED=3
     CONST SW_MAXIMIZE=3
     CONST SW_SHOWNOACTIVATE=4
     CONST SW_SHOW=5
     CONST SW_MINIMIZE=6
     CONST SW_SHOWMINNOACTIVE=7
     CONST SW_SHOWNA=8
     CONST SW_RESTORE=9
     CONST SW_SHOWDEFAULT=10
     CONST SW_MAX=10

     TYPE QRun EXTENDS QOBJECT

  '=============================================================
  ' Méthode trouvant le nom et chemin de l'application associé
  '=============================================================
      FUNCTION FindApplication(FileName AS STRING) AS STRING
       DIM ExeName AS STRING
       DIM value AS LONG

       ExeName=SPACE$(255)
       value=FindExecutable(FileName,"",ExeName)
       IF value>32 THEN
        result=RTRIM$(ExeName)
       ELSE
        result=""
       END IF
      END FUNCTION

  '=============================================================
  ' Méthode éxecution d'un fichier associé ou application
  '=============================================================
      SUB FileRun(FileName AS STRING,cmdShow AS SHORT)
       ShellExecute(0,"open",FileName,"","",cmdShow)
      END SUB

  '=============================================================
  ' Méthode éxecution application avec ouverture fichier
  '=============================================================
      SUB ExeRun(ExeName AS STRING,Param AS STRING,cmdShow AS SHORT)
       ShellExecute(0,"open",ExeName,Param,"",cmdShow)
      END SUB
     END TYPE
掌柜推荐
 
 
¥738.00 ·
 
 
¥1,480.00 ·
 
 
¥397.00 ·
 
 
¥950.00 ·
 
 
¥264.00 ·
 
 
¥1,005.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-01-03 16:56:26