clement Posted December 6, 2016 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. Quote
Administrators Farshad Mohajeri Posted December 6, 2016 Administrators Posted December 6, 2016 Hi Sorry i did not fully realize it. Can you explain a bit more? Quote
clement Posted December 7, 2016 Author 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. Quote
Sherzod Posted December 7, 2016 Posted December 7, 2016 Hi, Try this: http://forums.unigui.com/index.php?/topic/5806-opening-url/&do=findComment&comment=29754 Best regards. Quote
Administrators Farshad Mohajeri Posted December 7, 2016 Administrators 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. Quote
clement Posted December 8, 2016 Author 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. Quote
Administrators Farshad Mohajeri Posted December 8, 2016 Administrators 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. Quote
clement Posted December 8, 2016 Author Posted December 8, 2016 Thanks. It works by using UrlRedirect/BrowserWindow. But how can I open it in a new tab? Quote
irigsoft Posted December 8, 2016 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");'); Quote
Administrators Farshad Mohajeri Posted December 8, 2016 Administrators 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. Quote
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.