static void createAnalogMeter(Args _args)
{
Form formBrowse;
FormActivexControl activex;
FormRun formRun;
Args args;
TreeNode treeNode;
Object waitObject = new Object();
;
formBrowse = new Form('AnalogMeter Example', true);
formBrowse.design().width(500);
formBrowse.design().height(500);
formBrowse.design().caption('Analogmeter');
formBrowse.design().addControl(FormControlType::ActiveX, 'Browser');
args = new Args(formBrowse.name());
args.name(formBrowse.name());
args.object(formBrowse);
formRun = classFactory.formRunClass(args);
formRun.init();
activex = formRun.design().controlName('Browser');
activex.height(1,1);
activex.width(1,1);
activex.className('{706FF037-D46D-11D2-AB8D-0008C7631C69}');
activex.BackColor(winapi::RGB2int(255,255,236));
activex.displayHotArea(true);
activex._Caption('Analog meter Example');
activex.minValue(22000);
activex.maxValue(40000);
activex.addMarker(25000,255,"This is where i stand");
activex.NeedleColor(winapi::RGB2int(0,128,0));
activex.pos(25000);
formRun.run();
formRun.detach();
while (activex.pos() != 40000)
{
waitObject.setTimeOut('Notify', 1000);
waitObject.wait();
activex.pos(activex.pos() + 1000);
}
}
No comments:
Post a Comment