Re: MDI child and tool widows - always on top?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Peter Huang [MSFT] wrote:
Hi

I think you may try to run the code in the Child Form's Form_Load event, then the embeded form will on the child form only.
Based on my research, the other floating windows, including the toolbar of VS.NET IDE will not have hightlight when we click on it.
the Form2 is a child form


Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim f As New Form3
f.TopLevel = False
Me.Controls.Add(f)
f.Parent = Me
f.TopMost = True
f.Show()
End Sub


Best regards,


Hi Peter! The problem is, however, that the form (Form3 in your example) isn't showing on top of the 'parent' MDI child at all. I could almost live with it not looking like it has focus, but it has to remain on top.


Perhaps the best way would be to loop through the MDI children and see if the contact window exists (I can make the title of the window correspond).

How do I loop through all open windows and apply focus to one (which would go in the parent form's focus event, I assume)?

Thanks!


-- - Mitchell Vincent - kBilling - Invoices Made Easy! - http://www.k-billing.com .



Relevant Pages

  • Re: Terminating a process tree
    ... >> I'm not sure how I would achieve this under Windows. ... >> I dont know how under windows to get the PID of an application using ... > stream in the parent process, effectively signalling EOF to the child. ... > the loop that feeds commands through a queue of objects to the other ...
    (comp.lang.java.programmer)
  • Re: Terminating a process tree
    ... > I'm not sure how I would achieve this under Windows. ... > I dont know how under windows to get the PID of an application using ... effectively signalling EOF to the child. ... The child could have a main loop that does nothing but this: ...
    (comp.lang.java.programmer)
  • Re: Lucky idiot killed idiot over a Taurus
    ... the idiot could still be charged with child endangerment. ... Sure, it's the law, but I'll bet you break several every day. ... How much liability do you think you'd be letting yourself open for if you choose the latter course of action? ... otherwise the windows will keep fogging up as fast ...
    (rec.autos.driving)
  • Re: MDI Child Window Problem
    ... each child forms windowstate when it is reselected from the menu. ... I am presuming you are selecting the childforms through a menu using a ... // Required for Windows Form Designer support ... private void InitializeComponent() ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Child Domain Setup Quiestion
    ... domain (windows server 2003) to point to the Windows 2000 domain controller. ... All the windows 2k pro clients cannot access the child domain. ... 1] Enterprise Admin - have admin previlages to all the domains in the ... The passport is the trust & the visa is the permission. ...
    (microsoft.public.windows.server.active_directory)