Beginner Questions
#2
#!yab

doc Place a description of your
doc program here.
doc
doc Author, date, license

// set DEBUG = 1 to print out all messages on the console
DEBUG = 1

OpenWindow()

// Main Message Loop
dim msg$(1)
while(not leavingLoop)
nCommands = token(message$, msg$(), "|")

for everyCommand = 1 to nCommands
if(DEBUG and msg$(everyCommand)<>"") print msg$(everyCommand)

switch(msg$(everyCommand))
case "_QuitRequested"
case "MainWindow:_QuitRequested"
leavingLoop = true
break
default

end switch
if (left$(msg$(everyCommand),5)="Test:" )DRAW FLUSH "printtext"Big GrinRAW TEXT 20,20, "Enter pressed and the text was changed on textcontrol", "printtext"
if (left$(msg$(everyCommand),5)="Radio" )DRAW FLUSH "printtext"Big GrinRAW TEXT 20,20, msg$(everyCommand)+" button was changed.", "printtext"


next everyCommand

wend

CloseWindow()

end


// Setup the main window here
sub OpenWindow()
window open 100,100 to 600,500, "MainWindow", "Main Window"
Textcontrol 20,20 to 100,50, "Test","Test","","MainWindow"
radiobutton 20,80, "Radio1", "Classic", true, "MainWindow"
radiobutton 20,100, "Radio2", "Jazz", false, "MainWindow"
radiobutton 20,120, "Radio3", "Pop", false, "MainWindow"
view 10,150 to 490,180,"printtext","MainWindow"


return
end sub

// Close down the main window
sub CloseWindow()
window close "MainWindow"
return
end sub
Reply


Messages In This Thread
Beginner Questions - by MrEntropy - 04-07-2020, 07:01 PM
RE: Beginner Questions - by bbjimmy - 04-08-2020, 03:56 PM
RE: Beginner Questions - by MrEntropy - 04-09-2020, 06:27 AM
RE: Beginner Questions - by MrEntropy - 04-11-2020, 12:37 PM
RE: Beginner Questions - by bbjimmy - 04-12-2020, 08:42 PM
RE: Beginner Questions - by MrEntropy - 04-13-2020, 09:54 AM
RE: Beginner Questions - by bbjimmy - 04-14-2020, 09:46 AM
RE: Beginner Questions - by MrEntropy - 04-19-2020, 03:24 PM
RE: Beginner Questions - by bbjimmy - 04-21-2020, 09:51 AM
RE: Beginner Questions - by MrEntropy - 04-22-2020, 07:42 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)
Free Web Hosting