473,327 Members | 1,896 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,327 software developers and data experts.

Bug: ShowDialog + Large Fonts

Yesterday was getting very fed up trying to run a program
which works fine on my desktop machine (XP Pro)
but as soon as I put it on a laptop, I was getting an Exception,
which killed the program.

The problem occured when showing a dialog box a second time.
The first time it was hidden when closed, and when ShowDialog was
called a second time an InvalidOperationException was thrown,
claiming that a dialog could not be shown if it was already visible
(Which it wasn't!).

The exe and dll's were being run straight of a memory
card so I was definitley running the same version.

I checked that both computers had the same build of the .NET Framework,
which they did.

I started suspecting cache problems, which after much searching
around.... it wasn't....

This morning I noticed that the dialog looked quite different on the
two machines, and suddenly realised that Large Fonts was enabled on the
Laptop, where as my desktop the fonts were set to Normal. (This is a
setting under Control Panel/ Display / Settings / Advanced / General)

By setting the fonts back to normal the exception did not occur!

A work around for this is to use dialogObject.visible = true;
as opposed to ShowDialog, and this seems to work for both normal and
large fonts.

Note that if the dialog is recreated instead of just being hidden then
this problem will not occur.

Hope that helps someone.
TheinvisibleGhost

Nov 17 '05 #1
0 1125

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

Similar topics

7
by: Neil Zanella | last post by:
Hello, I have posted the following message before but got no replies... I am trying to format an HTML definition list with CSS so that it appears as follows, but am having the following problem:...
0
by: Programatix | last post by:
Hi, I am working on the PrintDocument, PrintDialog, PageSetupDialog and PrintPreviewControl components of Visual Studio .NET 2003. My developement machine is running Windows XP. There are...
0
by: Programatix | last post by:
Hi, I am working on the PrintDocument, PrintDialog, PageSetupDialog and PrintPreviewControl components of Visual Studio .NET 2003. My developement machine is running Windows XP. There are...
25
by: | last post by:
Hi, The following code shows the FolderBrowserDialog = broken. FolderBrowserDialog folderDialog = new FolderBrowserDialog(); folderDialog.ShowNewFolderButton = false;...
2
by: Ron Sellers | last post by:
I have built a VB.Net app that runs fine when the Windows desktop resolution is set to normal (100%). When the Display Properties>Settings>Advanced>Display>Font Size is set to "Large Fonts"...
5
by: Alex Glass | last post by:
I have created a winforms application and I designed it with the normal display settings, (96DPI) however, when I set the font settings to 120 DPI, my application text labels look all messed up. ...
2
by: Luc | last post by:
I saw a few posts on this newsgroup about it but nothing to help me resolve this problem: We designed a window in .NET on a platform using small fonts (120 ppp). But this window will run on...
57
by: Chris Tomlinson | last post by:
Hi all, Hope someone is able to help. I notice when I design a basic HTML page, it is affected if a WinXP user has Large Fonts set in their Control Panel. However some pages, e.g....
8
by: Joe | last post by:
Hi trying to write some code to determine if user has large/small fonts set on PC thought this would work but it didn't Any suggestions??? Thanks Graphics g = Graphics.FromHwnd(this.Handle);
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: 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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.