I'm trying to program Tetris with powerscript. Don't ask why, but I would know, if I could create random objects in powerbuilder.
1 Answers
You can create these types of objects within a datawindow control. Generally this would be a series of 'Modify' statements. Here is one example from the PowerBuilder help:
string modstring
modstring = 'create rectangle(Band=background X="206" Y="6" height="69" width="1363" brush.hatch="6" brush.color="12632256" pen.style="0" pen.width="14" pen.color="268435584" background.mode="2" background.color="-1879048064" name=rect1 )'
dw_cust.Modify(modstring)
This creates a rectangle in the background of a datawindow. If you need to move the thing you would have to set up a timer and then change the x and y properties appropriately.
To create a Tetris type game in PB would be quite an achievement. I've made games with PB before but none which had the movement complexity of Tetris.

- 2,337
- 2
- 20
- 23
-
I try this out. Thank you :-) – Lemonated Nov 07 '18 at 17:12