Solved

Centering the Modal from in the application window

Posted on 1998-10-08
2
149 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
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now