|
-
Dec 4th, 2000, 10:37 AM
#1
Thread Starter
Member
I have created some kind of calendar program. It seemed to work fine, until... I tried it with another computer. I found out that the cause was fonts.
My program works fine with large fonts (Panel -> screen -> Large/Small fonts) but when I try it with small fonts all fields, whose place I have set with code (textbox.top...) comes to different places than those, I have just (drag and drop) moved on the screen.
I use pixels in giving objects their places... OK?
What should I do? Make all locations with code? (I mean .top and .left...) Too many objects for that...
(Sorry my bad english)
-
Dec 5th, 2000, 02:33 PM
#2
Thread Starter
Member
Nobody answers...
Does this mean that nobody has made program that works with large and small fonts and uses both setting objects (textbox, label...) on the form and uses .top and .left in the code?
If somebody knows, I really need this information!
-
Dec 7th, 2000, 01:59 PM
#3
New Member
use something like:
Private Const SM_CXFULLSCREEN = 16
Private Const SM_CYFULLSCREEN = 17
Public Sub CenterForm(frm As Form)
Dim Left As Long, Top As Long
Left = Screen.TwipsPerPixelX _
* (GetSystemMetrics(SM_CXFULLSCREEN) / 2) - _
(frm.Width / 2)
Top = Screen.TwipsPerPixelY _
* (GetSystemMetrics(SM_CYFULLSCREEN) / 2) - _
(frm.Height / 2)
frm.Move Left, Top
End Sub
this should place, say a msgbox in the center of the screen
-
Dec 7th, 2000, 02:48 PM
#4
Addicted Member
i think it's better if you make the program in small font.....i think u have less chances of getting screwed when you'll install to a computer with large font......but why would you use large font anywayz??
*Rudy^
Visual Studio 6 Ent. SP5
Windows 2000 SP4
Windows XP SP1a
-
Dec 8th, 2000, 11:43 AM
#5
Thread Starter
Member
I am using large fonts. But all of users aren't... I'll try these. I will inform you if I can't get them work, but thank you for now!
-
Dec 9th, 2000, 05:08 AM
#6
Thread Starter
Member
I tried this script two ways. First i made new module and called this code with
call centerform()
Yeah, it does need argument. what? When my mainform is named to "base", I tried to call it
call centerform(base)
That wasn't better. Then I tried to just copy this code to form_load(). It said me that can't find GetSystemMetrics() sub...
You know, I am a newbie...
-
Dec 9th, 2000, 10:15 AM
#7
New Member
When you change your system to use large fonts, it should have told you that some programs may look strange. That is probaby what is causing the problem. It's recommended not to use large fonts, unless you find it hard to see.
Sorry, i forgot to put in the system metrics code. I'll post it on monday for you. I'm not on my computer right now and that's where i have the code at. later
-
Dec 10th, 2000, 05:34 AM
#8
Thread Starter
Member
I am using 1024x768 resolution with 17inch screen. This means that small fonts look VERY small.
And... I am not making this program for myself. I created it for one team. Some of them do have large and some small fonts =(
So how to make that code to work out?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|