I have a application(not mine) that uses AxXtremeDockingPane by CodeJock to add dockable panels to the application.
AxXtremeDockingPane has a method called AttachToWindow(int handle) which when called will create a docking manger into the window with the handle supplied, which can be any application.
I was wondering if there are any other free/cheaper docking controls that will let you do the same thing?
What I am trying to do is, the main application(not mine) creates a docking manager in it's main window when the application runs but they made access to the AxXtremeDockingPane private meaning that I can not add my own panels to the main application window. The problem is if you try and make a new AxXtremeDockingPane and call AttachToWindow(int handle) using the handle to the main application or any child windows it throws a MemoryAccessViolation because there is already a docking manager there.
I would like to find another suite that can do the same thing, so I can create a new docking manager into the main window, so have AxXtremeDockingPane and {other control} in the main window.
Sorry bit hard to explain.
Does anyone know how I can do this, or know any tools that do.
I've never used it, but there is an open-source DockPanel suite on SourceForge here:
http://dockpanelsuite.com
It looks exactly like Visual Studio's DockPanel stuff based on the screenshots.
Related
I'm using SDL2 (specifically, a C# wrapper of SDL2 (SDL2-CS) but it has all the same features and functionality) and am trying to make a game editor with it. Everything's going really well, but there's one piece of functionality I'd really like. That's to make one specific window always appear on top of its parent window, while making the parent window inaccessible. When the window is minimized and you open it, it opens and focuses on the child window. When you try to access the parent window, it flickers and you hear a windows error message.
I know how to manually focus on a window, but I don't know how to make a sort of "link" like that between two windows, where window A is inaccessible until window B is closed.
I know the Windows Forms equivalent is Form.ShowDialog(). That's what I want, but currently the way it works is like Form.Show(). To clarify, I'm not using Windows Forms or any other library/framework. I'm using pure SDL2; this was just an example.
I'm looking to implement this using pure SDL2.
How can I open a child window and keep the parent window active. I am using Silverlight 5 with the latest version of the toolkit.
I understand that playing with the brushes can help to have the background look normal but the parent window is still disabled.
I am trying to implement a find feature similar to a control F. I want the user to search in a child window and the matches would be displayed on the main display.
Thank you for your help,
ChildWindow is made for modal (disables the parent) use.
It uses a overlay window to make the background appear disabled as you've discovered, however it also marks the Application.Current.RootVisual's IsEnabled to false, which it then restores when the ChildWindow is closed.
This prevents any interaction to the controls of the 'parent' window. The only way around this to make your own style ChildWindow control but leave out this behavior.
FloatableWindow is a codeplex project from Tim Heuer's work, which is a nice quick way to solve your problem. Altho it appears as tho the project hasn't been updated in a while so compatibilty with the latest silverlight version might be in questionable.
DevExpress has a DXDialog control which includes Show and ShowDialog functions for modal and non-modal behavior. I'm sure other silverlight toolkit companies provide similar alternatives, this is just one I'm familar with.
If you don't mind making a custom control you could follow something like Tim Heuer's blog post on the subject to adapt your own control or use a tool like Reflector to reverse engineer the ChildWindow from silverlight itself and remove the parts you don't want.
I have an interesting case to solve:
I have a native (winapi) application, which uses MDI. This application allows me to extend itself with a simple scripting language. The scripts are launched on different thread than UI thread (although I can get the UI thread ID with appropriate functions). The scripting language also allow me to launch any c++ code (through LoadLibrary).
What I would like to achieve is to create a new window inside this application, which could host WPF and "attach it" as a MDI child window to MDI client (mdi area). Also, I would like this window to properly "talk" to MDI area, for example update list of windows in mdi menu.
So far, my first guess was to just create a WinForms window, host WPF inside, and then try to make it mdi child window by setting MDI client as it's parent (because my hosting application is not written in c#, I only have a handle, so I did this with User32.SetParent() P/Invoke). This worked almost well, after I attached my script thread to GUI thread, but I had few problems with it: the MDI menu with active windows did not update, the window did not interact correctly (it stayed on stop when it shouldn't etc.).
Then, I tried to set flags (style, exStyles) with SetWindowLongPtr. It changed my window's behavior a bit, but that was still not it.
Now I'm considering using CreateMDIWindow function, or doing it by SendMessage, according to docs sending message should create a window, even if I send it from different thread. The problem is, that this way would give me a native handle only, and I could not find (yet) any way of hosting WinForms / WPF inside it.
I'm curious if anyone tried to do something similar and had any results with it? Which way would be the best - trying to create a WinForms window and add it to MDI client, or create a native window and try to host WinForms in it (any particular way of doing that)?
Most answers for this question I have found are dealing with situation where hosting application is managed, so you can just set .MDIParent property, which won't work in this case I'm afraid.
I have one big existing application using .Net - MDI C#,
Now I am going to change some looks for application, so it looks better for client.
But I a, facing a lot of issues when I try to add more than 2 images on the Parent MDI Form.
How to create Header, Content, Side Bar and Footer Section in MDI (For. Ref. find attach screenshot for application layout.)? Also can anyone tell me which tips like which control I used for this type layout?
You have been a member for 6 months, asked questions, but never answered a question,never commented on a question, and never even accepted an answer.
But if everyone in this community acted the same way, if everyone else was just a user, where would you be then? There would be no community, no resource, you would never get an answer or have any information to search. Think about it. Then think about actually joining the community and stop using it.
Now to answer your question, the Winforms MDI container does not natively support the functionality you are describing, however it does support siting UserControls directly on the MDI container. This makes emulating the functionality you describe very easy. Just create a UserControl that provides the graphical surface and controls you need and then use the docking properties to force the MDI container to place child forms correctly in the open client area instead of on top of a UserControl.
For example, to create a logo and then a menu bar underneath create a UserControl with the logo and menu bar. Create events and wire them up as needed to allow the MDI form to subscribe to events that pass any menu clicks back that the MDI form needs to handle. Finally site the UserControl directly on the MDI form and set it's docking property to top. Then any child forms will display correctly in the remaining client area underneath the menu bar on the UserControl.
I have a legacy app written in C that consists of a main window and several mdi children opened from menu options. To allow new mdi children to be written in C# I have created a C++ COM interop layer that is called by the C code and in turn calls the C# code. I then use the SetParent API to set the C main window as the new parent of any C# window opened. This seems to work - the C# window behaves like an MDI child of the main window. BUT, the child window does not paint properly and only gets worse if you move other windows over it or move it to the edges of the main window - it gets painted with parts of the other windows or leaves bits of itself lying around as it moves. In addition the screen doesn't respond very well eg you cannot tab from one textbox to another.
Please don't question the architecture of my solution (believe me, this is the only way), but if you've ever seen a problem like this with a child created by SetParent I'd love to hear if you managed to fix it.
Try these things:
Add Application.DoEvents inside a processing loop that is normally running when things go bad.
Try refreshing the MDI forms from within the main form's paint event.
I don't totally understand how SetParent() works; that being said, here's some more things to consider:
In the MSDN community content of the SetParent documentation, Chango V. from Microsoft added that you: "need to call SetWindowPos(SWP_FRAMECHANGED) when changing between null and non-null parent."
Also, are you sure you are actually running the .NET Form message loop? Did you call Application.Run(yourManagedForm), or are you running your own message loop in the C code? If you're running your own message loop, you may need to forward messages to the WndProc method on your managed form after filtering it through PreProcessMessage. You would need to expose an interface to these as they are protected. I don't know how valid this is, though.