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; 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? 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now