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

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

  
Appendix A: QRun  
Documentation component by D.Glodt (c)2001-2002 Appendix A: QRun

QRun Component

QRun is a coponent no visible to éxecute applications or associated files.

 

 

QRun Properties

Field Type R/W Default




QRun Methods

Method Type Description Params




FindApplication FUNCTION(FileName$) AS STRING Return the name and path of associated application. 1
FileRun SUB(FileName$,cmdShow%) Run a associated file or an exe file.
cmdShow can be
SW_HIDE
SW_SHOWNORMAL
SW_NORMAL
SW_SHOWMINIMIZED
SW_SHOWMAXIMIZED
SW_MAXIMIZE
SW_SHOWNOACTIVATE
SW_SHOW
SW_MINIMIZE
SW_SHOWMINNOACTIVE
SW_SHOWNA
SW_RESTORE
SW_SHOWDEFAULT
SW_MAX
2
ExeRun SUB(ExeName$,Param$,cmdShow%) Run an exe file with parameters. 3

QRun Events

Event Type Occurs when... Params




QRun Examples

$typecheck on
$INCLUDE "Rapidq.inc"
$INCLUDE "Object\QRun.inc"

declare sub OuvrirClick
declare sub QuitterClick

dim App as QRun
CREATE Form AS QFORM
    Caption ="Execute"
    Width = 200
    Height = 200
    Center
    CREATE Menu AS QMAINMENU
      CREATE item1 AS QMENUITEM
        Caption="&Fichier"
        CREATE item2 AS QMENUITEM
          Caption="&Ouvrir"
          OnClick=OuvrirClick
        END CREATE
        CREATE item5 AS QMENUITEM
          Caption="-"
        END CREATE
        CREATE item6 AS QMENUITEM
          Caption="&Quitter"
          OnClick=QuitterClick
        END CREATE
      END CREATE
    END CREATE
END CREATE

Form.ShowModal

sub OuvrirClick
  dim file as QOPENDIALOG
  
  file.Filter="Fichiers(*.*)|*.*"
  file.InitialDir=CurDir$

  if file.Execute then
    if App.FindApplication(file.fileName)<>"" then
      App.fileRun(file.fileName,SW_SHOW)
    end if
  end if
end sub

sub QuitterClick
  Form.Close
end sub



掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2023-2-4  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-09-03 18:33:08