-
Sep 21st, 2017, 02:21 AM
#1
Thread Starter
New Member
How to disable a MDIChild from going behind already open another MDIChild form?
Hi, I am working on a project in Visual Basic 6.0. To make it easier for readers to understand, I will explaining my issue this way:
I have two MDIChild forms. First MDIChild form shows the list of all customer bills in Datagrid (connected to MSAccess DB) and when a button is clicked on this form then Second MDIChild form shows the actual bill(print copy that is handed over to customers). So what I want is that when Second MDIChild form is loaded in front of First MDIChild form, then Second form should not go behind the first form when a click is performed anywhere on First MDIChild form. Second form should remain in front.
I hope my issue is easily understandable now.
Please help.
Thank you
-
Sep 21st, 2017, 02:24 AM
#2
Re: How to disable a MDIChild from going behind already open another MDIChild form?
In that case the 2nd form should be a normal form and show it modally.
-
Sep 21st, 2017, 02:34 AM
#3
Thread Starter
New Member
Re: How to disable a MDIChild from going behind already open another MDIChild form?
Thanks for replying Arnoutdv. I am not able to understand anything. Can you explain in detail?
-
Sep 21st, 2017, 03:30 AM
#4
Re: How to disable a MDIChild from going behind already open another MDIChild form?
The Second MDIChild form: Make it a normal form instead of a MDIChild.
When you click the button on the First MDIChild form show it as:
Code:
' Assume your form is named frmActualBill
frmActualBill.Show vbModal
-
Sep 21st, 2017, 03:50 AM
#5
Re: How to disable a MDIChild from going behind already open another MDIChild form?
or make the 2nd form a normal form (not an mdichild) , but owned by the mdiform
Code:
Form2.Show , MDIForm1
do not put off till tomorrow what you can put off forever
-
Sep 21st, 2017, 04:03 AM
#6
Re: How to disable a MDIChild from going behind already open another MDIChild form?
on second thought, i would just use 2 mdichildren, and let the user do what s/he wants
after all, the user can always move the 2nd form out of the way
even beyond the borders of the mdiform, wich then would show its scrollbars
do not put off till tomorrow what you can put off forever
-
Sep 21st, 2017, 04:31 AM
#7
Re: How to disable a MDIChild from going behind already open another MDIChild form?
In the first form you can put this code:
Code:
Private Sub Form_Activate()
SecondForm.ZOrder
End Sub
The problem is that the user won't be able to do much in the first form doing that, specially with the keyboard.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|