home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My Films
AMC Updater v0.7.3 Now Available!
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="jamieo" data-source="post: 298149" data-attributes="member: 53052"><p>I guess it's the dll then - weird it only happens to me though? Let me know if you want any testing done. It's no big deal - just makes it hard to find the folders I do want! <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p></p><p>Ah yes, .net is a bit funny about cross threaded stuff to the gui - although you can use Control.Invoke and friends but that should be overkill for this. You have to set the <a href="http://msdn.microsoft.com/en-us/library/system.windows.window.owner.aspx" target="_blank">Owner</a> property of a modal form manually (else I imagine it assumes the desktop?) so if you haven't already perhaps that's why it doesn't act the way it should? If that does it then it may also remove the extra taskbar button for you else you can set ShowInTaskbar to false.</p><p></p><p>Otherwise you can manually emulate the modal behaviour by setting the z-orders (without setting focus) within the activated events of both windows so clicking either one also sets the activation of the other. ie, Within the Activated event of the main form set the z-order of lookup dialog to the top, while the activated event of the lookup dialog sets the main dialog's z-order immediately behind itself. </p><p></p><p>I've also done this for log windows like your own (thanks for the fix btw), in which case for both windows you would set the z-order of the other window to be immediately behind itself (just in case of overlap - otherwise just setting it to the top will do). </p><p></p><p>With the WinAPI I'd use <a href="http://msdn.microsoft.com/en-us/library/ms633545(VS.85).aspx" target="_blank">SetWindowPos</a>, I did look for a .net equivalent but don't have msdn installed and trying to search it online is hopeless. I found <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.controlcollection.setchildindex.aspx" target="_blank">SetChildIndex</a> which looks ideal except it may be for controls only - if all else fails then the 'hacky' way would be to set <a href="http://msdn.microsoft.com/en-us/library/system.windows.window.topmost.aspx" target="_blank">Window.Topmost</a> properties within the Activated event of both forms in the correct order (lookup dialog always last so it's on top) but I'm unsure if this just activates (good) or makes it always on top (bad)...</p><p></p><p>Jamie</p></blockquote><p></p>
[QUOTE="jamieo, post: 298149, member: 53052"] I guess it's the dll then - weird it only happens to me though? Let me know if you want any testing done. It's no big deal - just makes it hard to find the folders I do want! :) Ah yes, .net is a bit funny about cross threaded stuff to the gui - although you can use Control.Invoke and friends but that should be overkill for this. You have to set the [URL="http://msdn.microsoft.com/en-us/library/system.windows.window.owner.aspx"]Owner[/URL] property of a modal form manually (else I imagine it assumes the desktop?) so if you haven't already perhaps that's why it doesn't act the way it should? If that does it then it may also remove the extra taskbar button for you else you can set ShowInTaskbar to false. Otherwise you can manually emulate the modal behaviour by setting the z-orders (without setting focus) within the activated events of both windows so clicking either one also sets the activation of the other. ie, Within the Activated event of the main form set the z-order of lookup dialog to the top, while the activated event of the lookup dialog sets the main dialog's z-order immediately behind itself. I've also done this for log windows like your own (thanks for the fix btw), in which case for both windows you would set the z-order of the other window to be immediately behind itself (just in case of overlap - otherwise just setting it to the top will do). With the WinAPI I'd use [URL="http://msdn.microsoft.com/en-us/library/ms633545(VS.85).aspx"]SetWindowPos[/URL], I did look for a .net equivalent but don't have msdn installed and trying to search it online is hopeless. I found [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.controlcollection.setchildindex.aspx"]SetChildIndex[/URL] which looks ideal except it may be for controls only - if all else fails then the 'hacky' way would be to set [URL="http://msdn.microsoft.com/en-us/library/system.windows.window.topmost.aspx"]Window.Topmost[/URL] properties within the Activated event of both forms in the correct order (lookup dialog always last so it's on top) but I'm unsure if this just activates (good) or makes it always on top (bad)... Jamie [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
My Films
AMC Updater v0.7.3 Now Available!
Contact us
RSS
Top
Bottom