Guidance
指路人
g.yi.org
software / rapidq / examples / GUI / StatusBar / StatusQGauge.bas

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

  
'From:  "billk2867 <wakcanton@a...>"  Tue Dec 31, 2002  2:05 am

' Put The QGauge In The QStatusbar
'
' BillK
'
     DECLARE SUB UPDATESTATUS(X%,Y%)
     DECLARE SUB NOGAUGE
     DECLARE FUNCTION SetParent LIB "user32" Alias_
      "SetParent" (hWndChild AS LONG, _
      hWndNewParent AS LONG) AS LONG
'
     CREATE BFONT AS QFONT
      NAME="ARIAL"
      SIZE=9
      BOLD=1
     END CREATE
'
     CREATE FORM AS QFORM
      CAPTION= "FORM"
      WIDTH= 425
      HEIGHT= 270
      FONT= BFONT
      CENTER
'
      CREATE PANEL10 AS QPANEL
       CAPTION= ""
       ALIGN= 1
       TOP= 0
       LEFT= 0
       WIDTH= 568
       HEIGHT= 59
      END CREATE ' PANEL10
'
      CREATE STATUSBAR16 AS QSTATUSBAR
       ALIGN= 2
       TOP= 295
       LEFT= 0
       WIDTH= 568
       HEIGHT= 28
       ADDPANELS "","","",""
      END CREATE ' STATUSBAR16
'
      CREATE PANEL17 AS QPANEL
       CAPTION= ""
       BEVELOUTER=2
       ALIGN= 3
       TOP= 59
       LEFT= 0
       WIDTH= 130
       HEIGHT= 236
      END CREATE ' PANEL17
'
      CREATE SPLITTER21 AS QSPLITTER
       ALIGN= 3
       TOP= 59
       LEFT= 176
       WIDTH= 2
       COLOR=8421504
       HEIGHT= 236
      END CREATE ' SPLITTER21
'
      CREATE RICHEDIT20 AS QRICHEDIT
       ALIGN= 5
       TOP= 59
       LEFT= 187
       WIDTH= 381
       HEIGHT= 236
       ONMOUSEMOVE=UPDATESTATUS
      END CREATE ' RICHEDIT20
'
      CREATE COOLBTN12 AS QCOOLBTN
       CAPTION= "ABC"
       TOP= 7
       LEFT= 16
       WIDTH= 40
       HEIGHT= 35
       PARENT= PANEL10
      END CREATE ' COOLBTN12

      CREATE CHECKBOX22 AS QCHECKBOX
       CAPTION= "GAUGE"
       TOP= 28
       LEFT= 12
       WIDTH= 66
       HEIGHT= 25
       CHECKED=1
       PARENT= PANEL17
       ONCLICK=NOGAUGE
      END CREATE ' CHECKBOX22
'
      CREATE GAUGEPNL AS QPANEL
       BEVELINNER=0
       BEVELOUTER=0
       TOP=4
       WIDTH= 135
       HEIGHT= 20
       CREATE GAUGE26 AS QGAUGE
        TOP= 4
        LEFT=4
        WIDTH= 125
        HEIGHT= 14
        POSITION=35
        SHOWTEXT=0
        FORECOLOR=156
        BACKCOLOR=12632256
       END CREATE
      END CREATE ' GAUGE26
'
     END CREATE ' FORM
'
     SETPARENT GAUGEPNL.HANDLE,STATUSBAR16.HANDLE
     STATUSBAR16.PANEL(1).WIDTH=GAUGEPNL.WIDTH + 8
     GAUGEPNL.LEFT=STATUSBAR16.PANEL(0).WIDTH + 4
     FORM.SHOWMODAL
'
     SUB UPDATESTATUS
      GAUGE26.POSITION=(X%/RICHEDIT20.WIDTH) * 100
     END SUB
'
     SUB NOGAUGE
      IF CHECKBOX22.CHECKED=0 THEN
       GAUGEPNL.VISIBLE=0
      ELSE
       GAUGEPNL.VISIBLE=1
      END IF
     END SUB
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Tue 2022-10-4  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-19 07:48:52