Fábio Matte Posted April 9, 2018 Share Posted April 9, 2018 Hello, Do you have any code that tells me if the running APP is Mobile or Web? For example: If it is mobile, it creates a UnimLabel1 at runtime, if Web creates a UniLabel1 at runtime. Something like this, but to differentiate Mobile from Web: {$ IFDEF RELEASE} {$ define UNIGUI_DLL} // Generates DLL directive // {$ define UNIGUI_SERVICE} // Service Policy {$ ENDIF} {$IFDEF DEBUG} {$define UNIGUI_VCL} // {$ENDIF} {$IFDEF UNIGUI_VCL} program {$E exe} {$ENDIF} {$IFDEF UNIGUI_DLL} library {$E dll} {$ENDIF} {$IFDEF UNIGUI_SERVICE} program {$ENDIF} Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 10, 2018 Share Posted April 10, 2018 You can do what you want in hybrid application. (See demo). After launching your appli, the server know itself if it's mobile or desktop. So creating components at runtime is not a problem (no need here $ifDef directives). Quote Link to comment Share on other sites More sharing options...
Fábio Matte Posted April 10, 2018 Author Share Posted April 10, 2018 Tank you. very good. You can do what you want in hybrid application.(See demo).After launching your appli, the server know itself if it's mobile or desktop.So creating components at runtime is not a problem (no need here $ifDef directives). Quote Link to comment Share on other sites More sharing options...
Ron Posted April 12, 2018 Share Posted April 12, 2018 When running a hybrid application, you have two mainforms, one for each platform, and only one of them will be created and shown. So in onShow you can have code which controls the flow of the app, like for instance skipping login if a url parameter is used, and then hide the mainform and going to another form etc. Like if the user clicks on an email confirmation link, you can redirect to a confirmation page, by skipping login in the beforeLogin event if a url parameter is used. You can do the skipping login by really logging in as an anon user with no rights, which may change if the user later chooses to log in. 1 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.