Solved

Centering the Modal from in the application window

Posted on 1998-10-08
2
151 Views
Last Modified: 2010-04-30
I am working on MDI application. In which I want to make use of modal froms in the place of messgae boxes as I shouldn't use message boxes in my application. Problem is I will be using dual monitor systems, When I call the form it is diplayed some where else when the application is on other screen. how can I make the form to be visible in the application window only, means in the centre of the child form which called it.
0
Comment
Question by:lesa
2 Comments
 
LVL 3

Accepted Solution

by:
vmano earned 10 total points
ID: 1438834
set this property called "StartUpPosition : 2- centerscreen"
(i am not sure which version of VB are you using, if you can't find it let me know)

vmano
0
 
LVL 2

Expert Comment

by:shchuka
ID: 1438835
What version of VB are you using?  If it's version 5 or 6, you can use StartUpPosition property of the form.  Set it to 1 (CenterOwner), then display the form with

    frmModal.show vbModal, frmMdiChild.hwnd

If you're in VB version 3 or 4, you need to get the coordinates of the child window withing the mdi form, translate them into screen coordinates and then figure out the position for your modal form.

0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

803 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