?
Solved

form size

Posted on 2003-03-24
7
Medium Priority
?
143 Views
Last Modified: 2010-04-07
I want my form to be 1152x864, in design time, how do i do that?????

(my running resolution is that also) i want this to be exactly that size and not use a maximise option.

b
0
Comment
Question by:bolox
[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
7 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 8194577
Hi bolox,

Set

Form.Width = 1152 * Screen.TwipsPerPixelX
Form.Height = 864 * Screen.TwipsPerPixelY

That should do it.

Tim Cottee MCSD, MCDBA, CPIM
http://www.timcottee.tk 

Brainbench MVP for Visual Basic
http://www.brainbench.com

Experts-Exchange Advisory Board Member
0
 
LVL 9

Accepted Solution

by:
GivenRandy earned 200 total points
ID: 8194578
Open the Properties screen (select View and then Properties Window). Click on the Form. Then in the Properties window, enter 17280 in the width and 12960 in the height (it uses 15 twips per pixel, hence the multiplication by 15).
0
 
LVL 5

Expert Comment

by:Cimperiali
ID: 8194579
in design mode?
Then see form properties (press F4 if you do not see the panel), and change form Width and form Height at deisgn time...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 26

Expert Comment

by:EDDYKT
ID: 8194702
The following will set the form size on your resoultion without setting maximise option

Option Explicit
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Const SPI_GETWORKAREA = 48

Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type

Private rc As RECT

Private Sub Form_Load()
SystemParametersInfo SPI_GETWORKAREA, vbNull, rc, 0
    Me.Move rc.Left * Screen.TwipsPerPixelX, rc.Top * _
            Screen.TwipsPerPixelY, rc.Right * _
            Screen.TwipsPerPixelX, rc.Bottom * _
            Screen.TwipsPerPixelY
End Sub
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 8201110
On Properties, enter 17280 for width and 12960 for height. In case your screen resolution is the same, then you can also try simply stretching the form horizontally and vertically as long as it keeps getting stretched.

To remove the maximising option, again go to Proerties and set Border Style to 1 - Fixed Single.

Hope that helps!

Mayank.
0
 
LVL 1

Author Comment

by:bolox
ID: 8201586
excellent, i did not know about the multiplication rate. that will save me in the future too.

Thanx

B
0
 

Expert Comment

by:statto
ID: 8212029
An 1152x864 may not be compatible with other versions so you may need to test for the user's resolution to make sure he's running 1152x864 or greater.

Don't have the code on me now, if you want it just post again.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

752 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