home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of the Best
/
_.img
/
01171
/
demo.bas
< prev
next >
Wrap
BASIC Source File
|
1990-12-22
|
4KB
|
180 lines
Dim Menu$(6)
Subroutine MakeMenu()
Menu$(1) = "&Datei &Info &Ende__F9"
Menu$(2) = "&Hintergrund &Wei▀ &Grau &Schwarz"
Menu$(3) = "&Grafik &Text &Linie &Bogen Ba&r &Pie &Maus"
Menu$(4) = "&Clipboard &Lesen &Schreiben"
Menu$(5) = "&Verschiedenes Start_Uhr Stop_Uhr &DialogBox &FileBox &Timer"
Menu$(6) = ""
Menu Menu$
Endsub
Subroutine CheckHinter(n%)
MenuItem 2001, 1, 0
MenuItem 2002, 1, 0
MenuItem 2003, 1, 0
MenuItem n%, 1, 1
Endsub
Subroutine Hello()
Font 21, 12, 700, 0, 1
Print "Hello Windows"
Endsub
Subroutine Linie()
x% = 20 : y% = 20
MoveTo x%, y%
For i% = 1 To 8
Style i%/2, 0, 1
y% = 220 - y%
x% = x% + 60
LineTo x%, y%
Endfor
EndSub
Subroutine DialogBox()
Dialog 10,20, 150,120, 0, 0, "Demo Dialog" ' Rahmen
Dialog 10,10, 40,10, 11, 11, "Button" ' BUTTON
Dialog 10,24, 60,10, 13, 13, "OK" ' DEFBUTTON
Dialog 10,40, 60,60, 14, 10, "Gruppe" ' GROUPBOX
Dialog 14,50, 40,10, 15, 12, "Radio1" ' RADIOBUTTON
Dialog 14,64, 40,10, 16, 12, "Radio2" ' "
Dialog 14,78, 40,10, 17, 12, "Radio3" ' "
Dialog 80,10, 60,10, 18, 5, "Eingabe" ' LTEXT
Dialog 80,25, 60,10, 19, 18, "START" ' LEDIT
Dialog 80,40, 60,10, 20, 1, "Check" ' CHECKBOX
Dialog
_INIT:
DlgItem 15, 15, 17, 4, "Radio1" ' 1. Leuchtknopf an
_2: 'ESC
Dialog @
_11:
DlgItem 19, 0, 0, 2, "Button"
_13:
DlgItem 19, String$ ' Editierfeld auslesen
Print String$
Dialog @
_15:
DlgItem 15, 15, 17, 4, "Radio1"
_16:
DlgItem 16, 15, 17, 4, "Radio2"
_17:
DlgItem 17, 15, 17, 4, "Radio3"
_20:
If checked% = 0 Then
DlgItem 20, 0, 0, 4, "Check" ' Checkmarke setzen
checked% = 1
Else
DlgItem 20, 0, 0, 0, "Check" ' Checkmarke entfernen
checked% = 0
Endif
Endsub
Rem *** Hauptprogramm ***
Rem Initialisierung
Gosub MakeMenu()
MenuItem 2001, 1, 1
_MOUSE:
If mouse% Then
Mouse button%, x%, y%
MoveTo x%, y% : Print "Knopf ";button%
Endif
_KEY:
If asc%(Inkey$()) = 195 Then Goto _1002
_CLOSE:
If clock% Then Stop "clock.exe"
clock% = 0
_TIMER:
MessageBox "Timer", "Message", 0, a%
_1001:
MessageBox "WinBasic (c) 1990 Zimmer Informatik","Info", 0, a%
_1002:
If clock% Then Stop "clock.exe"
clock% = 0
Stop ' Programm-Ende
_2001:
cls 0 : Gosub CheckHinter(2001)
_2002:
cls 2 : Gosub CheckHinter(2002)
_2003:
cls 4 : Gosub CheckHinter(2003)
_3001:
cls
Gosub Hello()
_3002:
cls
Gosub Linie()
_3003:
cls
Colour 4, 7
Style 1, 4, 1
MoveTo 300, 150
Arc 100, 0, 270
_3004:
cls
Colour 2, 5
Style 0, 4, 3
MoveTo 300, 150
Rect 70, 150
_3005:
cls
Colour 2, 6
Style 1, 3, 3
MoveTo 300, 150
Pie 100, 0, 270
_3006:
mouse% = 1 - mouse% ' Flipflop 0/1
_4001:
Cls
Clip Get "Demo.tmp"
Open "I", #1, "Demo.tmp"
Repeat
Line Input #1, zeile$
Print zeile$
Until Error%() <> 0
Close #1
Erase "Demo.tmp"
_4002:
Cls
Open "O", #1, "Demo.tmp"
Print #1, "1. Zeile"
Print #1, "2. Zeile"
Close #1
Clip Put "Demo.tmp"
Erase "Demo.tmp"
_5001:
If Clock% = 0 Then
Cursor 2
Exec "clock.exe", "", 7
clock% = 1 ' Merker setzen
Cursor 0
Endif
MenuItem 5001, 1, 1
_5002:
trace on
Stop "clock.exe"
clock% = 0
MenuItem 5001, 1, 0
_5003:
Gosub DialogBox()
_5004:
Files "\windows", "*.exe", file$
Print file$
_5005:
Timer 3000