clement Posted December 6, 2016 Share Posted December 6, 2016 HI, I have two UniGUI windows services (winA and winB). the winB cannot open from winA in the browser, is it the trial version limitation? Thank You. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted December 6, 2016 Administrators Share Posted December 6, 2016 Hi Sorry i did not fully realize it. Can you explain a bit more? Link to comment Share on other sites More sharing options...
clement Posted December 7, 2016 Author Share Posted December 7, 2016 Hi Sorry i did not fully realize it. Can you explain a bit more? I have one main application and one sub application. Both are created in windows service application, and installed in PC's service. In main application has one button to open the Sub application in a new tab by using the below code: ShellExecute(Handle, 'open', PChar(vLocation), nil, nil, SW_ShowNormal); However, there is no reaction after I click the button (but it works if I run both application in debug mode) Is it because I am using the trial version? thanks. Link to comment Share on other sites More sharing options...
Sherzod Posted December 7, 2016 Share Posted December 7, 2016 Hi, Try this: http://forums.unigui.com/index.php?/topic/5806-opening-url/&do=findComment&comment=29754 Best regards. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted December 7, 2016 Administrators Share Posted December 7, 2016 Hi, No it is not related to trial mode. It is about the way Service apps are implemented. A Windows Service can be run only from Windows service manager. It can't be run by ShellExecute. Link to comment Share on other sites More sharing options...
clement Posted December 8, 2016 Author Share Posted December 8, 2016 Hi, No it is not related to trial mode. It is about the way Service apps are implemented. A Windows Service can be run only from Windows service manager. It can't be run by ShellExecute. Sorry for my poor explanation. Let me try to give another example. Due to the trial version cannot allow to change the Port Number, I use two PCs to test it. In the 1st PC, the UniGUI main application is installed and run in PC's windows service manager. In the 2nd PC, the UniGUI Sub application is installed and run in PC's windows service manager. I use the browser (localhost:8077) to open the main application, then I click the link in the main application for opening the sub application by: ShellExecute(Handle, 'open', PChar('IP_Address:8077'), nil, nil, SW_ShowNormal); it should open the sub application in a new tab of the same browser, but it can't. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted December 8, 2016 Administrators Share Posted December 8, 2016 ShellExecute will only work on Server PC. You can't use it on any other PC. Each time you press a button in your web app, ShellExecute method is executed on server PC not on the client PC, so basically using this method is flawed. Link to comment Share on other sites More sharing options...
clement Posted December 8, 2016 Author Share Posted December 8, 2016 Thanks. It works by using UrlRedirect/BrowserWindow. But how can I open it in a new tab? Link to comment Share on other sites More sharing options...
irigsoft Posted December 8, 2016 Share Posted December 8, 2016 Hi, try with AddJs ('window.open (url)'); "just make sure you use _blank, Without it, it opens in a new tab. For a empty window: window.open('', '_blank', 'toolbar=0,location=0,menubar=0');" from some forums. Real : AddJs ('window.open("Your_URL", "", "toolbar=0,location=0,menubar=0");'); Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted December 8, 2016 Administrators Share Posted December 8, 2016 Thanks. It works by using UrlRedirect/BrowserWindow. But how can I open it in a new tab? BrowserWindow(AUrl: string; Width, Height: Integer; ATarget: string=''; AOptions:TUniBrowserWindowOptions = [bwResizable, bwStatus]) Use a different target. 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