Simple windowed application: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1,470:
iup.MainLoop()
end</lang>
 
=={{header|M2000 Interpreter}}==
For labels M2000 window manager use Buttons with locked property to true. We can press enter because when the form open, default control is the Button1 (the second button we make). edit
 
For label1 we make a linked property, named Caption$ (we can use dot, so we can use label1.caption$). See that we make as second linked property for the same property but with a number (cap). How this is possible?
 
Μ2000 controls are internal COM object and as those they can use Variant type properties and these properties can convert as they need. So if need a string and we pass a number then the number change to string.
 
 
<lang M2000 Interpreter>
Module CheckIt {
Declare Form1 Form
Declare Label1 Button Form Form1
Declare Button1 Button Form Form1
Method Label1,"move", 2000, 2000, 4000, 600
Method Button1,"move", 2000, 3000, 4000, 600
With Label1, "Caption" as caption$, "Locked", true, "Caption" as cap
With Button1, "Caption", "click me", "Default", True ' make this the default control
caption$="There have been no clicks yet"
m=0
Function Button1.Click {
m++
cap=m
}
Method Form1, "Show",1
Declare Form1 Nothing
}
Checkit
</lang>
 
=={{header|Mathematica}}==
Anonymous user