get focus from the FORM in dynamcis AX 2009

static void Jimmy_activateWindow(Args _args)
{
    FormRun     fr;
    Args        args = new Args();
    CustTable   CustTable = CustTable::find("WIB-CHN");
;
    args.name(formstr(CustTable));
    args.record(CustTable);
    fr = classfactory.formRunClass(args);
    
    fr.init();
    fr.run();
    fr.detach();

   // info("Form was shown, now the infolog will be in front of it");
   // infolog.viewUpdate();

    infolog.activateWindow(fr.hWnd());//get focus from the form
}
posted @ 2011-01-13 10:57  Fandy Xie  Views(331)  Comments(0Edit  收藏  举报