By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,184 Members | 1,368 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,184 IT Pros & Developers. It's quick & easy.

setting height of main area of form (excluding titlebar)

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.