Rapid-Q by William Yu (c)1999-2000 .

Back to holyguard.net

Esegui shell

$include "rapidq.inc"

$typecheck on



const open="open"

const printit="print"

const explore="explore"



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



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



declare sub print_click

declare sub open_click

declare sub tree_change

Create Form1 as qform

                Left=148

                Top=90

                create Button1 as QButton

                               onclick=open_click

                               Caption="Open"

                               Left=6

                               Top=156

                end create

                create Button2 as QButton

                               onclick=print_click

                               Caption="Print"

                               Left=96

                               TabOrder=9

                               Top=156

                end create

                create Treeview1 as QdirTree

                               onchange=tree_change

                               Height=133

                               Left=6

                               TabOrder=11

                               Top=6

                end create

                create listbox1 as QfileListbox

                               Height=133

                               Left=132

                               TabOrder=1

                               Top=6

                end create

end create



'----------Initaliation code-----------



Form1.Showmodal

sub open_click

                ShellExecute(form1.handle,open,listbox1.filename,0,0,SW_NORMAL)

                ''opens everthing with the registered application ie .doc .txt .bmp etc

end sub

sub print_click

                ShellExecute(form1.handle,printit,listbox1.filename,0,0,SW_HIDE)

                ''prints using a valid application for it if its capable of printing

end sub

sub tree_change

                listbox1.directory=treeview1.directory

end sub