我可以在 Powerbuilder 中使用命令创建对象(如矩形)吗?

Can I create objects (like rectangles) with commands in Powerbuilder?

我正在尝试使用 powerscript 编写俄罗斯方块程序。不要问为什么,但我会知道,如果我可以在 powerbuilder 中创建随机对象。

您可以在数据窗口控件中创建这些类型的对象。通常这将是一系列 'Modify' 语句。这是 PowerBuilder 帮助中的一个示例:

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)

这会在数据窗口的背景中创建一个矩形。如果你需要移动这个东西,你必须设置一个计时器,然后适当地改变 x 和 y 属性。

在 PB 中创建俄罗斯方块类型的游戏将是一项了不起的成就。我以前用 PB 做过游戏,但是 none 有俄罗斯方块的运动复杂性。