Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Application Windows sizing and positioning

Posted on 1999-01-14
3
Medium Priority
?
179 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
[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
3 Comments
 
LVL 2

Accepted Solution

by:
MelissaC earned 100 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

688 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