Solved

Application Windows sizing and positioning

Posted on 1999-01-14
3
170 Views
Last Modified: 2013-11-20
I am using MS access 8.0 and want to write a function that will help the forms to be sized irregardless of the windows resolution setup.
ex. If the form is developed in 640 X 480 then it is OK to be used in 800 x 600 but will be smaller. The reverse case would show that form outside the monitor screen size.!!
So according to the resolution all the forms should stretch in size based upon the resolution.
Thanks.
0
Comment
Question by:devtha
3 Comments
 
LVL 2

Accepted Solution

by:
MelissaC earned 50 total points
Comment Utility
Hi devtha,
I don't know if you're working with MFC, but I suppose so if you post it in this section. Im MFC you can say in the InitInstance of the application class:

// The main window has been initialized, so show and update it.
//
m_pMainWnd->MoveWindow( 0,
                        0,
                        ::GetSystemMetrics(SM_CXSCREEN),
                        ::GetSystemMetrics(SM_CYSCREEN) );
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();


But if you're working with Visual Basic with Access, you first have to declare the function:

Public Declare Function GetSystemMetrics Lib "user32" Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long

If you resize the window, keep in mind that the controls on the window won't resize. You need an extra function to do that.

Hope this helps.
Melissa


0
 
LVL 4

Expert Comment

by:piano_boxer
Comment Utility
Take a look at the ITCLib free class library at http://devcentral.iftech.com/

The ITCFormManager class can dynamicly move and size controls when the parent dialog is resized.
0
 
LVL 6

Author Comment

by:devtha
Comment Utility
Melissa Do you have the function for Access and or VB for forms and controls within.?
Thanks
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

11 Experts available now in Live!

Get 1:1 Help Now