There are many ways to pass data between form in .NET. This article, Passing Data Between Forms, at the Code Project is an excellent one that shows 4 ways to do it. My favorite way to do it is with delegates and events. However, very often you simply need a quick and dirty solution where… Continue reading Passing Information Between Winforms the Sneaky Way
Category: Solutions to Problems
MIME Type vs. Actual Type
A while back I posted Internet Explorer Download Problem: “Unable to open this Internet Site” about how Internet Explorer doesn’t behave properly if the MIME type is set properly. Shortly after I upgraded Firefox and discovered that they had changed the behaviour for Firefox and things broke. I was serving up an EXE with a… Continue reading MIME Type vs. Actual Type
Internet Explorer Download Problem: “Unable to open this Internet Site”
Internet Explorer 7/8 throws an error when you pop a download through a meta refresh or iframe. The error message looks like this (I’ve blurred the domain as it’s not public yet): Searching around didn’t reveal anything of any particular use. Most “solutions” were for clients, which when you’re running a server, doesn’t help much.… Continue reading Internet Explorer Download Problem: “Unable to open this Internet Site”
Some Praise for Internet Explorer
No. Really. I’ve found something very good in IE. Well, I didn’t find it, but while reading on computed CSS values, I came across this thread. One of the participants recommended Internet Explorer and its built-in development tools for tracing computed CSS values. I’d been trying to find out just WTF was going on with… Continue reading Some Praise for Internet Explorer
Copying Collapsed Rows/Columns in Excel Excludes Hidden Data
Excel doesn’t copy collapsed columns or rows, which can be excruciatingly painful to figure out. When copying Excel data into a text editor (or other program), if you have a collapsed row or column, the data will not paste properly. So, imagine you have 51 rows of data. That’s what Excel tells you anyways like… Continue reading Copying Collapsed Rows/Columns in Excel Excludes Hidden Data
How to Update ListViewItems in a Listview
Here are 2 ways to update values in a ListView with C#: You can download the project here: ListViewExample
.NET Controls Constructed Off-Screen Display Black
While working on Duplicate Photo Finder, I discovered a very odd thing: the ToolStripStatusLabel displays solid black if it is constructed off-screen, and it cannot be recovered. You can see in the upper-right screenshot how the labels are solid black. I suppose that it would be possible to entirely construct a new control then replace… Continue reading .NET Controls Constructed Off-Screen Display Black
Save As Dialog Disappears on Multiple Monitors
Occasionally when you add a new monitor, or shift them around, the Save As dialog (or other modal dialogs like Find & Replace) gets lost outside of the viewing port. It’s usually sitting just above your smallest monitor or something similar. To fix the situation in Windows, you can open up the Screen Resolution applet… Continue reading Save As Dialog Disappears on Multiple Monitors