|
Here are a few possibilities:
1. your Font is defective; while trying to display a comma, it actually contains a period for that particular size. Try a different font family.
2. maybe you need to go and see an ophthalmologist.
|
|
|
|
|
Spectacles are just a couple of months old, so I thought I'd try a few more ideas.
Knocked up a form with two columns of 10 comboboxes. Left 10 at 10pt, right 10 at 11pt, each pair with a different typeface.
Microsoft Sans Serif and Haettenschweiler both turned commas to dots at 10pt on an XP machine
Ran the prog on a new Win 7 laptop, exactly the same result. The same thing does NOT happen in a Word doc.
Not sure I have the time or the patience to repeat for lots more fonts, but this is interesting (to me at least)
Rich
modified on Wednesday, June 16, 2010 5:22 AM
|
|
|
|
|
I did a little test myself, all looked normal.
I used Windows Vista, .NET 2.0, WinForms, fonts Courier New and Arial, sizes 10 to 13.
Can you:
- provide pictures
- confirm it is a WinApp (not a web site)
- explain what is a "page" (OP)
- specify your system
- clarify where it goes wrong: drop down list, textbox part of comobobox
- confirm characters with descenders look alright
- see it go wrong with constant data, i.e. no database code at all
|
|
|
|
|
I suspect the problem might be related to .net 3.5 - which is (I think) on both machines. I never noticed the problem before when still on .net 2, which I see you are using. Maybe try it with Microsoft Sans Serif and see what happens.
Yes, it's a Win App as is the test app I did this morning and tried on the two machines.
Goes wromg in both sections of the combo box.
Other descenders look fine, there seems to be room to display the commas, they just turn to what look like dots.
The test app used constant data and simply put a series of test strings into each combobox.
Zooming in on a screenshot, I notice that when comparing the pixels on what is visible of the top of the 10pt comma looks quite different to the top of the 11pt comma which displays properly although I guess this could just be down to the size difference.
Regards,
Rich
|
|
|
|
|
So I switched to .NET 3.5, added 8 and 9 point and Microsoft Sans Serif.
Then replaced comboboxes by simple text painting, so I could see all at once.
This is my code:
public void Run() {
Form form=new Form();
form.Bounds=new Rectangle(100, 100, 600, 600);
form.BackColor=Color.White;
form.Paint+=new PaintEventHandler(form_Paint);
form.Show();
}
void form_Paint(object sender, PaintEventArgs e) {
Graphics g=e.Graphics;
int y=20;
for (int i=8; i<14; i++) {
Font font=new Font("Microsoft Sans Serif", i);
string s="abc,.,ghi (MS Sans Serif "+i+" pt)";
g.DrawString(s, font, Brushes.Black, 20, y);
y+=30;
font.Dispose();
}
g.ScaleTransform(2, 2);
y=y/2;
for (int i=8; i<14; i++) {
Font font=new Font("Microsoft Sans Serif", i);
string s="abc,.,ghi (MS Sans Serif "+i+" pt; scale 2)";
g.DrawString(s, font, Brushes.Black, 40, y);
y+=30;
font.Dispose();
}
}
I see what you see: on small Sans Serif, a period is a single pixel; a comma is a rectangle, width 1, height 2, easily mistaken for a period; on larger Sans Serif, a comma is really comma-shaped.
Nothing wrong here.
|
|
|
|
|
Well, to my mind, a typeface is a typeface is a typeface. If it looks one way in Word, the same font should look the same in VS or in a running Win App or Excel or wherever!
9 pt in Word seems okay to me.
Just out of interest, did you also run this under .net 2 and if so, what was the result?
Regards,
Rich
|
|
|
|
|
AFAICT 9pt SansSerif looks the same everywhere.
You have my code, you can experiment freely.
|
|
|
|
|
How to x^2+y^2+z^2=g^2 if x^2+y^2=a^2 and x^2+z^2=b^2 and y^2+z^2=c^2 in VB.NET?
Thanks.cheers!!
|
|
|
|
|
choose a single forum and stick to it!
|
|
|
|
|
By writing code...
What? You thought we were going to do your homework for you?
Project Euler has a couple of problems that are similar. You start by narrowing down the sets of numbers you have to work with.
|
|
|
|
|
Dave Kreskowiak wrote: Project Euler has a couple of problems that are similar.
Indeed. As well as much harder ones. I'm off going to tackle some more of them
|
|
|
|
|
Yeah, they are cool. I've done the first 75 of them in the last couple months, but haven't had time to look at them in the last few weeks.
|
|
|
|
|
I started last year, did almost 100 of them (using C#), created a little article[^], and decided to wait for .NET 4.0 (i.e. BigInteger); I really should start a second stint now.
|
|
|
|
|
hi guys, i have a projetec on vb.net, this project is seted to use .net framework 3.5, but i have to install this application in a windows 2000, this windows cant install .net framework 3.5, so i have to change my project, and that is the problem, a have no ideia, how it is done? thank you very much
|
|
|
|
|
This should have been thought before even starting with the development.
What kind of application is it? Is it using anything new that was introduced in .Net 3.5? If not, just set the target framework to 2.0 and see if application works fine.
|
|
|
|
|
i just used webbrowser, System.Data.OleDb and Npgsql... where can i change this target? thanks
|
|
|
|
|
look for "project properties", there are a couple of ways to get there.
|
|
|
|
|
Well, i tried, but no sucess, it is asking for .net framework 3.5 to be installed
|
|
|
|
|
1. when you change the target setting, you have to rebuild.
2. when you also create an installer, you'd have to modify that one too. Don't ask for details, I don't have them.
|
|
|
|
|
Ok, thank you anyway, i will try again here... hugs
|
|
|
|
|
As Luc told, change the target framework from the project properties. MSDN would help on how to do that.
Also, you can very well use new "compiler features" available with .Net 3.5. Your code will still run fine on a computer with .Net framework 2.0.
|
|
|
|
|
i need help on usb drive. when a user inserts a usb drive, auto run starts and diplays some of the options to select from. what i want is to add my applications exe to the list of auto run when usb drive is inserted in usb port, so that i can select my application and do some aftermath. please help. simply i want usb drive to run my application when i insert it into my computer.
|
|
|
|
|
Please do not cross-post (put the same question in more than one forum). Very very rude!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
Why do programmers often confuse Halloween and Christmas? - Because 31 Oct = 25 Dec.
Business Myths of the Geek #4 'What you think matters.'
|
|
|
|
|
you should pick one forum to ask your question.
|
|
|
|
|
This[^] should get you started.
|
|
|
|