• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 239
  • Last Modified:

how to have a dialog form be the main focus over a midi form

My current application uses midi form contanier selected to yes. I want my dialog form to appear in front of my midi form container how can I do this?
0
cmdolcet
Asked:
cmdolcet
1 Solution
 
jpaulinoCommented:
You cannot you modal in MDI forms. The new form that you want to show, don't define as MDI parent and define it as modal/dialog.
0
 
jpaulinoCommented:
Typo .. I have pressed enter too soon
You cannot do modal foms in a MDI form
0
 
cmdolcetAuthor Commented:
wat do u mean?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jpaulinoCommented:
You have a MDI main window (parent) and you want one of the child windows to be modal ?
0
 
cmdolcetAuthor Commented:
u are correct i do have a midi main parent. however when i launch my program the dialog box that i created is being hidden behind the midi main parent window form....How can i have my dialog box be displayed in front of my midi parent???
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
WHERE/WHEN are you creating the dialog form?...

Can we see some code?
0
 
Éric MoreauSenior .Net ConsultantCommented:
Are you calling .Show or .ShowDialog?

I agree with Idle_Mind, we need code.
0
 
cmdolcetAuthor Commented:
ElseIf _masterSettings.MasterSerialInfo.MasterEnableAutoRunUserDefinePartfile = True Then
                trmPartfileLoaded.Enabled = True
                Dim showSerialInput As New dlgSerialCommandInput
                showSerialInput.Show()
            End If
0
 
cmdolcetAuthor Commented:
Ok i found my answer. If i use  the  showSerialInput.TopMost = True then it sets the dialog form over the top of the midi form however how can I get my textbox to be the main focus?
0
 
jpaulinoCommented:
Why don't you use showSerialInput.ShowDialog() for a modal form ?
 
0
 
cmdolcetAuthor Commented:
Ok i did that and now the dialog box is in focus however the textbox is not the where the cursor is
0
 
jpaulinoCommented:
You want to place the cursor in a specific textbox ? You can set the tabindex of that textbox to 0 or set the focus for that textbox in the form load event.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now