Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
SRP_Show_Window
Does the AdjustMDIClient or Adjust property allow MDI child windows under Windows 10 to show the Windows 10 theme?
Comments
I want the window underneath to look like the one on top.
As Kevin noted, MDI is considered passe but I don't think this has given way to pure SDI either. Productivity applications seem to favor a hybrid approach. Look at your browser or most IDEs: they are tabbed UIs. Each tab corresponds to a document (hence a quasi-MDI app). You can achieve something similar by maximizing your MDI Children and using a tab or vertical menu UI to navigate (the SRP Editor is a good example of this).
We've also built an application that makes use of the SRP Panel control to achieve even more impressive results. Instead of multiple MDI Children we just have one master MDI Child with SRP Panel controls. Then each SRP Panel control is loaded with a form. Here's an example of what this looks like:
I am in the process of seeing if I can custom draw the MDI child frames. While I'm at it, I'll support custom drawing of the MDI client as well.
Interesting, very interesting. Let me know how this goes.
I didn't even now the panel control existed. Thank you for all the information.
Here's all the info you need to use it, but I will start with the disclaimer that if something won't show up in the preview or doesn't display the way you want, there's nothing we can do about it.
ProgID: SRP.Preview.1
OLE.Background - Property to set the background color, just like other Background properties we support.
OLE.Border - Property to set the border style, just like other Border properties we support.
OLE.Font - Property to set the caption font, just like other Font properties we support.
OLE.Caption - Property to set the text caption of the Preview control when there is no document being previewed. Similar to the Picture control's Caption property.
OLE.Preview(Filename)- Method to tell the Preview control to preview a document. Pass in the path (relative or absolute) to a file.
OLE.Clear() - Method to clear the Preview control of any documents.
...I will start with the disclaimer that if something won't show up in the preview or doesn't display the way you want, there's nothing we can do about it.
I want to repeat the above comments. If it works for you then great, we are very happy that another feature of our toolset is making a difference. If it doesn't work, then we regret this fact but we'll have to politely decline or deescalate the priority of seeing if there is anything we can do about it.
thinkinghoping you had found a way around those issues we've also experienced.It seems you have not.
Actually kind of glad for this conversation just to know I'm not the only one experiencing those inconsistencies.
Why certainly.
For displaying pdfs, I use to use an ole control with an id of Acropdf or something along those lines and then do a send_message LoadImage or again, something like that. Memory is a bit rusty on it. I thought this worked quite well until at some point I rolled out a similar feature to another client and whilst it continued to work nicely on my laptop, too many of their users had no such luck. For many, just nothing would happen. I couldn't find a reliable way to get consistent results.
I changed to a browser type control and started loading them that way. This was a little more reliable but again inconsistent. For some like myself it would display the pdfs straight in the window, for others it would launch their default browser outside of OI and for others it would popup a message which whilst I can't remember exactly what it said, it was cryptic to users especially when the pdf was being loaded as a convenience and not their point of focus.
It was clearly a case of one size does not fit all and it's out of my realm to go from machine to machine to machine to try and fix it.
I see now though, why you asked for clarification.
To make it work, put a Subclass control on your frame window. Then subclass the MDICLIENT control like so:
Handle = Get_Property(@Window:".MDICLIENT", "HANDLE") Send_Message(@Window:".OLE_SUBCLASS", "OLE.Subclass", Handle, @Window:".MDICLIENT")
Make sure to subclass the MDICLIENT before starting any MDI child windows.
If you are using the SRP Ribbon Control, then you don't have to do anything else. The subclass control will apply the Ribbon's theme to the MDI children. If you are not using the SRP Ribbon Control, then you can set the theme like so:
Set_Property(@Window:".OLE_SUBCLASS", "OLE.MdiTheme[":@Window:";MDICLIENT]", "Windows10")
This version adds a theme called "Windows10" which mimics the look you are after, but it is not dynamic. It is only the white Windows 10 theme.
Consider this a beta release. Let me know if you have any questions or run into any problems.
BONUS FEATURE: when you subclass the MDICLIENT, then the double-click bug reported in your other thread goes away.
Wow, what a fantastic way to start the day. Thank you very very much. I owe you a few beers at the next conference.
What is that? I have a vague and distant memory of that word...
Don, I wonder how long it will before the next one?
It works. That looks so much better. Three lines of code. Brilliant.