jackfang0220 Posted April 12, 2015 Posted April 12, 2015 Hi Sir: Can I disable the server and let the form show as VCL application? Is there any properties I need to adjust? MainForm or UniMainModule or UniServerModule? Thanks Jack Fang
Administrators Farshad Mohajeri Posted April 12, 2015 Administrators Posted April 12, 2015 Hi, There is no property to enable this by default. You can modify the DPR file to create and show a VCL form of your own.
jackfang0220 Posted April 14, 2015 Author Posted April 14, 2015 Hi Sir: This is what I changed in dpr file : program jtest1; uses Forms, ServerModule in 'ServerModule.pas' {UniServerModule: TUniGUIServerModule}, MainModule in 'MainModule.pas' {UniMainModule: TUniGUIMainModule}, Main in 'Main.pas' {MainForm: TUniForm}; {$R *.res} begin Application.Initialize; Application.MainFormOnTaskbar := True; Application.CreateForm( TMainForm, MainForm); Application.Run; end. But the erro says : [dcc32 Error] jtest1.dpr(16): E2197 Constant object cannot be passed as var parameter Please help , Thank you very much.
Administrators Farshad Mohajeri Posted April 14, 2015 Administrators Posted April 14, 2015 If you want to show a uniGUI form in VCL mode it is not possible.
jackfang0220 Posted April 14, 2015 Author Posted April 14, 2015 NO, I just want to have two version of application. One is for web brower , another is for native VCL application. If I develope an uniGUI application first , then I need to modified a native VCL application. What is the fastest way to modified. Thanks for help. Best Regards Jack Fang
tappatappa Posted May 14, 2015 Posted May 14, 2015 uniGUI projects are web only.In order to develop the "same" application in both web and VCL you will have to do it by hand. The only thing I can suggest is to keep the TForms and TUniForms code to a minimum, move all the actual code in TDataModules shared between the VCL and web projects. Or maybe you should look for some other solutions (remote desktop-like?) 1
Oliver Morsch Posted May 18, 2015 Posted May 18, 2015 But you can show a VCL form with a TWebBrowser in it. So it looks like a standard program (with a web gui). create a normal VCL (not UniGUI !) form in your project that is shown at startup put a TwebBrowser onto this form (Align: alClient) onFormShow: WebBrowser.Navigate('http://localhost:8077/'); onFormClose: Applicatin.Terminate; // shuts down server if form is closed To use a new browser version that works with UniGUI you must must add a registry entry or change !DOCTYPE (second I don't know how doing in UniGUI, but first works for me)
Recommended Posts