a button code to open a new form

Hi

I want to write a code for a button to open a new form.

Can you help me to find some tutorials and links to do so .

Thanks in advance .

On the button clicked event, write something like this -

void clicked()
{
Args args = new Args();
MenuFunction menuFunction;
;

menuFunction = new MenuFunction(menuitemdisplaystr(SalesTable), MenuItemType::Display);
menuFunction.run(args);

}

thank you so much

You can use this code,

Args args = new Args();

FormRun formRun;

VendTable vendTable_filtered;

;

select vendTable_filtered where vendTable_filtered.AccountNum == “1001”;

args.name(formstr(VendTable));

args.record(vendTable_filtered);

formRun = classfactory.formRunClass(args);

formRun.init();

formRun.run();

formRun.detach();

thank’s for answer…

your code is really use full…