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

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

  
Appendix A: QFormEx  
Documentation component by D.Glodt (c)2000-2001 Appendix A: QFormEx

QFormEx Component

QFormEx is a a component as QForm with  Drag&Drop of files and tray icon function.


QFormEx Properties

Field Type R/W Default




DragEnable BOOLEAN RW False
Accept drop file in the application window 
DragZone QRECT RW
Zone of drop file 
DeskBar BOOLEAN RW False
If true , application will inside the desk tool bar when the window will minimized.
Set to false if the évent WndProc is use.
FormStyle INTEGER RW fsNormal
Style fsStayOnTop is now supported

QFormEx Methods

Method Type Description Params




AddTrayIcon SUB Add  an icon application inside the desk tool bar. 0
DelTrayIcon SUB Delete  the icon application of desk  tool bar. 0

QFormEx Events

Event Type Occurs when... Params




OnDrag (File$) Drop file 1
OnTrayClick Click right button on icon application of tool bar 0
OnTrayDblClick Double click on left button on icon application of tool bar 0
OnMinimise Window minimized 0

QFormEx Example1

$TYPECHECK ON
$INCLUDE "rapidq.inc"
$INCLUDE "Object\QFormEx.inc"

declare Sub depose(file as string)

CREATE Form AS QFormEx
  width=300
  Height=200
  Caption="Drag and drop files"
  center
  DragEnable=true
  OnDrag=Depose
  CREATE Listbox as QLISTBOX
    Width=150
    height=100
  END CREATE
END CREATE

form.DragZone.Left=listbox.left
form.DragZone.Top=listbox.Top
form.DragZone.Right=listbox.Width
form.DragZone.Bottom=listbox.Height
Form.ShowModal

Sub Depose(file as string)
  ListBox.AddItems(file)
End Sub

QFormEx Example2

$TYPECHECK ON
$INCLUDE "rapidq.inc"
$INCLUDE "Object\QFormEx.inc"
declare sub close
declare sub show
declare sub menu
declare sub hide

CREATE Form AS QFormEx
  OnClose=Close
  OnTrayDblClick=Show
  OnTrayClick=Menu
  OnMinimise=Hide
END CREATE

CREATE PopUpMenu AS QPOPUPMENU
    Alignment = 1
    CREATE Open AS QMENUITEM
        Caption = "&Open"
        OnClick =show
    END CREATE
    CREATE Seperator AS QMENUITEM
        Caption = "-"
    END CREATE
    CREATE MeExit AS QMENUITEM
        Caption = "&Exit"
        OnClick =Close
    END CREATE
END CREATE
form.addtrayicon
form.showmodal

sub close
  form.deltrayicon
  Application.terminate
end sub

sub show
  form.visible=true
end sub

sub Hide
  form.visible=false
end sub

sub menu
  popupmenu.popup(screen.MouseX,screen.MouseY)
end sub
 
 

掌柜推荐
 
 
¥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:2003-10-07 23:58:08