Solved

Center a form and open modal dialog box in VB.net Application

Posted on 2016-11-14
2
20 Views
Last Modified: 2016-11-14
I have a VB.net windows application which has menu  items on the main form.

Each item of the menu (when clicked) opens another form.

I want each of this forms to be centered and also be a modal form.

How can I ensure this.
0
Comment
Question by:Member_2_7967119
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 

Accepted Solution

by:
Member_2_7967119 earned 0 total points
ID: 41885934
I am closing this question as I found the solution.

The solution is

  Me.StartPosition = FormStartPosition.CenterParent
           
 frmName.ShowDialog()
0
 

Author Closing Comment

by:Member_2_7967119
ID: 41885935
I found the solution to center a modal form.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question