Solved

Application Windows sizing and positioning

Posted on 1999-01-14
3
172 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
ID: 1327711
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
ID: 1327712
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
ID: 1327713
Melissa Do you have the function for Access and or VB for forms and controls within.?
Thanks
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Use of condition with 'serial' in ansible 2 58
Unix Command -- Challenging  question 7 88
How to convert MFC::CString to UTF8 wchar_t* 10 205
Message not shown 5 49
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 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