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

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

  
Appendix A: QProcess  
Documentation component by D.Glodt (c)2003 Appendix A: QProcess

QProcess Component

QProcess is a no visible component, it function is to execute process background via a user routine.


QProcess Properties






Priority LONG R/W 0
Process priority with following values:
ProcessLow=-2
ProcessBelowNormal=-1
ProcessNormal=0
ProcessHight=2
ProcessAboveNormal=1
ProcessTimeCritical=15
ProcessIdle=-15

QProcess Methods

Method Type Description Params





Open SUB execute process 0
Close SUB Stop process 0

QProcess Events

Event Type Occurs when... Params





OnProcess Process execution 0

QProgress Example
 

$TYPECHECK ON
$INCLUDE "RAPIDQ.INC"
$include "Object\QProcess.inc"
'Subs internal 
declare sub rout1
DECLARE SUB OpenClick
DECLARE SUB SendClick
DECLARE SUB fin
'Variables globales 
dim num as long
dim process as QProcess
process.OnProcess=rout1 'process routine
CREATE Form ASQFORM
  Caption = "Test process"
  Width=200
  Height=200
  Center
  CREATE OpenButton ASQBUTTON
    Caption="&Open"
    Left=20
    Top=50
    height=20
    OnClick=OpenClick
  END CREATE
  CREATE butexit ASQBUTTON
    Caption="Close"
    Left=20
    Top=75
    height=20
    Enabled=0
    OnClick=fin
  END CREATE
  CREATE ED ASQEDIT
    left=10
    top=10
    width=100
  END CREATE
END CREATE
Form.ShowModal

SUB fin
  process.close
  OpenButton.enabled=1
end sub

SUB OpenClick
  OpenButton.enabled=0
  butexit.enabled=1
  process.priority=ProcessNormal
  process.open
END SUB

sub rout1 ' process routine
  while true
    sleep 0.1
    num++
    ed.text="Count"+str$(num)
  wend
end sub
 
 
 

掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-4-20  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-10-10 16:01:52