I have an MDI child window that pops open it's own tool windows. I would
like for the tool window to stay on top of that MDI child so that if
they open the MDI child back up they *have* to dismiss the tool window
to continue working.. I don't want this tool window to stay on top of
others, though, as it will have nothing to do with other parts of the
program.. Can I make the tool window a child of the MDI child window
somehow? I hope I'm not mixing up terms..
I hope you know what I mean (and how I might do it!).
Thanks!
--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com 5 4843
Hi
A MDI Child cannot be set as TopMost.
We need to add the tool window as a control of the main form (that's why the
TopLevel property is set to False) so that we can set this new form as
TopMost:
Dim f As New fUnlockBillet
f.TopLevel = False
Me.Controls.Add(f)
f.Parent = Me
f.TopMost = True
f.Show()
--
HTH
Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
( http://aspnet2.com/mvp.ashx?EricMoreau)
Conseiller Principal / Senior Consultant
Concept S2i inc. ( www.s2i.com)
"Mitchell Vincent" <mv******@newsgroup.nospam> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... I have an MDI child window that pops open it's own tool windows. I would like for the tool window to stay on top of that MDI child so that if they open the MDI child back up they *have* to dismiss the tool window to continue working.. I don't want this tool window to stay on top of others, though, as it will have nothing to do with other parts of the program.. Can I make the tool window a child of the MDI child window somehow? I hope I'm not mixing up terms..
I hope you know what I mean (and how I might do it!).
Thanks!
-- - Mitchell Vincent - kBilling - Invoices Made Easy! - http://www.k-billing.com
Eric Moreau wrote: Hi
A MDI Child cannot be set as TopMost.
We need to add the tool window as a control of the main form (that's why the TopLevel property is set to False) so that we can set this new form as TopMost:
Dim f As New fUnlockBillet f.TopLevel = False Me.Controls.Add(f) f.Parent = Me f.TopMost = True f.Show()
Thanks Eric! I really appreciate the pointer here.. However, this seems
to make the tool window always on top of the MDI container, not the
"parent" form. It always looks like the tool window doesn't have the
focus (it's grayed out) even though I can click on it and type in it's
form fields...
--
- Mitchell Vincent
- kBilling - Invoices Made Easy!
- http://www.k-billing.com
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,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
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
Hi
I think we can enumerate the form in the MdiChildren collection and use
activate method to make certain form focused.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim fm As Form
fm = New Form2
fm.MdiParent = Me
fm.Show()
fm = New Form3
fm.MdiParent = Me
fm.Show()
End Sub
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MenuItem1.Click
For Each fm As Form In Me.MdiChildren
If fm.Text = "Form2" Then
fm.Activate()
End If
Next
End Sub
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Caroline |
last post by:
I seem to always want to do this type of join, but I can never find
how to do this.
I am trying to join two tables. The parent table will always have one
row of data and the child may have 0 to...
|
by: Suzanne Vogel |
last post by:
Hi,
I've been trying to write a function to test whether one class is
derived from another class. I am given only id's of the two classes.
Therefore, direct use of template methods is not an...
|
by: Patient Guy |
last post by:
In my reading of the Strict and Transitional DTD for HTML 4.0, the table
row (TR) elements are contained within table section elements: THEAD,
TFOOT, and TBODY.
The table section elements are...
|
by: Fred |
last post by:
What is the easiest and most cost effective method of
converting a Widows Form output, within the programme, to
PDF format for sending by Email.
Code sample in C# would be appreciated.
...
|
by: VMI |
last post by:
In my MDI Widows app, how can I open a child Form X from within another
child Form Y so that X is still inside the parent MDI Form? I'm using this
code to open the Form from X (a child Form) but it...
|
by: Scott H. |
last post by:
I have an MDI parent form that creates mdi child forms each of which are
represented by a tab item. I use a third party control to generate the tabbed
MDI child forms.
Each tab or MDI child form...
|
by: Brett Romero |
last post by:
I set an MDI child form to Windowstate=maximized at design time. When
I new up and show the child form in the MDI parent, the child's title
is hidden since it's pushed to far up (below parent tool...
|
by: zacks |
last post by:
Forgive me if this has been already asked an answered, I did do a
search both here and in VS2005 Help, but I can't find the answer to my
question.
I am developing an MDI application that is a...
|
by: Buddha |
last post by:
Hello,
I posted this on two forums, without too much help .. and I am kinda
stuck in this.
I need to refresh the parent page from the second child window which
is opened by the first child and...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |