473,320 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

setting height of main area of form (excluding titlebar)

p s
hi
can someone tell me how to ensure the height of my window is always exact?
(excluding titlebar) in VB6

e.g. if i set the form to 300 pixels, then the total height of the form
takes into account the title bar, however i want to use a specific
background graphic in the main form background.... visual styles, and themes
and so on make this an impossiblilty! if the title bar is big (a la windows
xp) then i lose some pixels at the bottom, and vice versa

cheers
pete
Jul 17 '05 #1
3 6072
One method is to calculate the 'overhead' from the difference between
Form.Height and Form.ScaleHeight

On Tue, 23 Sep 2003 14:38:13 GMT, "p s" <pe***********@hotmail.com>
wrote:
hi
can someone tell me how to ensure the height of my window is always exact?
(excluding titlebar) in VB6

e.g. if i set the form to 300 pixels, then the total height of the form
takes into account the title bar, however i want to use a specific
background graphic in the main form background.... visual styles, and themes
and so on make this an impossiblilty! if the title bar is big (a la windows
xp) then i lose some pixels at the bottom, and vice versa

cheers
pete


Jul 17 '05 #2
You nmight want to try setting the
Form1.ScaleHeight
Form1.ScaleWidth properties instead of the height and width.
--
Stéphane Richard
"Ada World" Webmaster
http://www.adaworld.com
"p s" <pe***********@hotmail.com> wrote in message
news:pV*********************@news-text.cableinet.net...
hi
can someone tell me how to ensure the height of my window is always exact?
(excluding titlebar) in VB6

e.g. if i set the form to 300 pixels, then the total height of the form
takes into account the title bar, however i want to use a specific
background graphic in the main form background.... visual styles, and themes and so on make this an impossiblilty! if the title bar is big (a la windows xp) then i lose some pixels at the bottom, and vice versa

cheers
pete

Jul 17 '05 #3
On Tue, 23 Sep 2003 15:18:46 GMT, "Stephane Richard"
<st**************@verizon.net> wrote:
You nmight want to try setting the
Form1.ScaleHeight
Form1.ScaleWidth properties instead of the height and width.


If you set those directly you just change the ScaleMode
- not the physical height/width
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: delerious | last post by:
I need to determine an element's width and height in pixels (not including padding, border, and margin) in Javascript. The element will not have width or height styles specified. In Mozilla, I...
0
by: Linda Antonsson | last post by:
Hi, I am trying to put together a CSS-based layout consisting of a header, a sidebar and a main content area. Page: http://www.westeros.org/ASoWS/ CSS:...
2
by: Marek Mänd | last post by:
I have simple structure like: <div> <h3 style="text-align:center;"> <span style="float:right;">input type="image"/></span> <span style="float:left;">input type="image"/></span> boxes titlebar...
2
by: Ridge Burner | last post by:
I have a 3 column table with the main content of the page in the center column, pretty basic. I have a DIV in the right column that holds links, and which is nearly always taller than the content...
4
by: Marcin Grzêbski | last post by:
Hi All, How to get height of TitleBar in Window Form? (the form caption place) Marcin
7
by: Danielb | last post by:
I want my application to run most of the time as just an notify icon visible in the system tray, with some dialogs windows that open if the user selects an option from the context menu on the tray...
4
by: Sam Marrocco | last post by:
Is it possible to place controls such as a checkbox or button in the titlebar of a form? -- ================================================================== Sam J. Marrocco Sr. Visual...
8
by: Andrus | last post by:
..NET 2 Winforms application. How to create new setting and set it default value in userSettings section of app.config file or overwrite existing setting value ? I found code below in this list...
4
by: AAaron123 | last post by:
<body runat="server" id="MainBody"> <form id="form1" runat="server" style="background-color:green; width: 100%; height: 100%"> <br /> Table1" runat="server" Style="background-color:Yellow;...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.