[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Centering the Modal from in the application window

Posted on 1998-10-08
2
Medium Priority
?
157 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
[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 Comments
 
LVL 3

Accepted Solution

by:
vmano earned 40 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

649 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