koney Posted July 9, 2011 Share Posted July 9, 2011 in vclmode works well, but in webmode do not work. these are parts of my code: procedure TMainForm.MyEventClk(cPrgName:String; cCaption:string); var Child:TUniForm; begin ... try Child := TUniFormClass(FindClass('TFrm'+cPrgName)).Create(UniApplication); MyEventOn(Child,cPrgName,cCaption); except ShowMessage(cPrgName+ ' 尚未建立 not found.'); end; end; ... end; procedure TMainForm.MyEventOn(xForm: TUniForm; cPrgName: String; cCaption:string); begin with xForm do begin ShowModal; end; end; Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 9, 2011 Administrators Share Posted July 9, 2011 I need to know to real exception message. In your code exception is suppressed. Can you send the real exception message? Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted July 9, 2011 Administrators Share Posted July 9, 2011 Class must be registered first: initialization RegisterClass(TUniForm1); end. Without Registering your Form Class, FindClass will not work neither in VCL nor in web. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.