Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Popping form in and out of a panel - Windows Server 2016 issue
Hi all.
I've been running into an issue with some of our code that is working on Windows 2012 but doesn't seem to be working properly on Windows 2016.
What we have is a screen with a few panels on it which we load an OI form into each. There are setting that affect how many panels are seen on this screen, but it can be up to 3 panels separated with SRP.Splitters.
We added a button on our screen to "pop out" one of those panels (use RemoveForm with destroy set to 0 to remove the form added originally via setform) and make that screen maximized. When the user is finished, they close that maximized screen and we intercept the close to instead put that form back into the panel using setform again.
This has been working fine on Windows Server 2012, but when we used it on Windows Server 2016 we are having the panel act unlike we were seeing before. The panel doesn't want to update as changes are made anymore. In that if the sliders are moved, the resizing causes background colours and controls. I have attached a file of the panel in question before popping out and being re-inserted, and one after.
Before:
After:
I have tried a number of things to try and get the panel to refresh properly including firing size events, redraw on and off for the panel and the window, completely recreating my form before using setform and a number of other small things.
Is there anything else people can think of to try to solve this?
I've been running into an issue with some of our code that is working on Windows 2012 but doesn't seem to be working properly on Windows 2016.
What we have is a screen with a few panels on it which we load an OI form into each. There are setting that affect how many panels are seen on this screen, but it can be up to 3 panels separated with SRP.Splitters.
We added a button on our screen to "pop out" one of those panels (use RemoveForm with destroy set to 0 to remove the form added originally via setform) and make that screen maximized. When the user is finished, they close that maximized screen and we intercept the close to instead put that form back into the panel using setform again.
This has been working fine on Windows Server 2012, but when we used it on Windows Server 2016 we are having the panel act unlike we were seeing before. The panel doesn't want to update as changes are made anymore. In that if the sliders are moved, the resizing causes background colours and controls. I have attached a file of the panel in question before popping out and being re-inserted, and one after.
Before:
After:
I have tried a number of things to try and get the panel to refresh properly including firing size events, redraw on and off for the panel and the window, completely recreating my form before using setform and a number of other small things.
Is there anything else people can think of to try to solve this?
Comments
1. A copy of your OI system with steps to recreate.
2. An RDK of a SYSPROG form that has no dependencies on your application that recreates the issue.
If you are open to one of these options, email me at kfournier@srpcs.com.
We changed 3 things:
1 - we stopped setting redraw of the control or window to 0 and back to 1 after putting the control back
2 - we changed the FitWidth command from true to false
3 - We changed the splitter bar logic resize on our main window to resize the control manually rather than letting the control handle it itself.
These solved our issue.
I appreciate the offer to help, but it seems changing these three things solved our issue so we're just going to move on to whatever is next.
Thanks!
https://www.fusioncharts.com/charts
We've been using this suite for making small charts on our html O4W pages and within our DirectLine pages and started using it for more with analytics on our home page.
I had intended to ask the same question you did but just hadn't got around to it yet. Probably because I would get unnecessarily distracted following it up.
fusioncharts you say? Hhhmmm thanks @bhaughn
and how do you do that?
dotNetHandle = StartDotNet(DotNetCtrl)
dotNetDir = CheckDotNet("4.0"):"\"
dlls = ""
dlls<-1> = dotNetDir:"System.Windows.Forms.dll"
rslt = Set_Property.net(dotNetHandle, "AssemblyName", dlls)
If Get_Status(errs) Then
Gosub handleError
End
* Create the control
ourClass = "System.Windows.Forms.WebBrowser"
hndlIE = create_class.net(DotNetHandle, ourClass)
If Get_Status(errs) Then
Gosub handleError
End
*retval = Set_property.net(hndlIE, "IsWebBrowserContextMenuEnabled", "False")
retval = Set_property.net(hndlIE, "IsWebBrowserContextMenuEnabled", "True")
retval = Set_property.net(hndlIE, "WebBrowserShortcutsEnabled", "False")
retval = Set_property.net(hndlIE, "ScriptErrorsSuppressed", "True")
* Save handle
Call Set_Property(DotNetCtrl,'@HNDLIE',hndlIE)
Call Set_Property(DotNetCtrl,'@HNDLDOTNET',dotNetHandle)
ourClass = "System.Uri"
hndlUri = create_class.net(dotNetHandle, ourClass, 0, "about:blank", "System.String")
If Get_Status(errs) Then
Gosub handleError
End
retval = send_message.net(hndlIE, "Navigate", hndlUri, "RevDotNet", 0)
loop
rs = Get_property.net(hndlIE, "ReadyState",0)
while ( rs _NEC READYSTATE_COMPLETE$ )
call yield()
repeat
Free_class.net(hndlUri)
We then load our html into it after that