Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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

  • 5 weeks later...
Posted

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?)

  • Upvote 1
Posted

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)

×
×
  • Create New...