blog.stevex.net
SteveX Compiled » Making a Windows Forms App Respond to System Shutdown
http://blog.stevex.net/making-a-windows-forms-app-respond-to-system-shutdown
Try out my new app: MealPlan. A simple weekly meal planning tool for the iPad. Making a Windows Forms App Respond to System Shutdown. This is how MSN Messenger works, for example, and many other applications. The problem here is that when Windows wants to shut down, it sends you the close message, but it looks exactly the same as when the Close button is clicked by the user. You hide your window, you don’t quit, and the system doesn’t shut down. So here’s what I ended up using:. Watch for WM QUERYENDSESS...
blog.stevex.net
SteveX Compiled » String Formatting in C#
http://blog.stevex.net/index.php/string-formatting-in-csharp
Try out my new app: MealPlan. A simple weekly meal planning tool for the iPad. String Formatting in C#. I couldn’t find a quick reference to .NET string formatting using the String.Format() function, so I created this one (which has also spawned this String Formatting FAQ. Sprintf(szError, “Error %d occurred. n”, nError);. Str “Error ” nError ” occurred.” endl;. Or something close to that. It’s type-safe, and more OO than sprintf, but not as easy to read and not as easy to localize. The NET framework han...
blog.stevex.net
SteveX Compiled » C# Code Snippet: Creating an md5 hash string.
http://blog.stevex.net/c-code-snippet-creating-an-md5-hash-string
Try out my new app: MealPlan. A simple weekly meal planning tool for the iPad. C# Code Snippet: Creating an md5 hash string. A full description of the MD5 algorithm is available in rfc1321. Using System.Text;. Using System.Security.Cryptography;. Create an md5 sum string of this string. Static public string GetMd5Sum(string str). First we need to convert the string into bytes, which. Means using a text encoder. Encoder enc = System.Text.Encoding.Unicode.GetEncoder();. For (int i=0;i result.Length;i ).
blog.stevex.net
SteveX Compiled » LitterMaid Cat Litter Box Review
http://blog.stevex.net/littermaid-cat-litter-box-review
Try out my new app: MealPlan. A simple weekly meal planning tool for the iPad. LitterMaid Cat Litter Box Review. Yes, this is a review of a kitty litter box. Normally my weblog. Mostly discusses software development, but I have two cats, and I hate cleaning litter boxes. I found something that works pretty well for me, and the other talk about it on the Web and Usenet that I’ve seen has been pretty negative, so I wanted to offer my experiences. Here’s how it works:. As the bar retracts, the door closes.
blog.stevex.net
SteveX Compiled » C# String Formatting FAQ
http://blog.stevex.net/c-string-formatting-faq
Try out my new app: MealPlan. A simple weekly meal planning tool for the iPad. C# String Formatting FAQ. My String Formatting in C#. Article has been one of the most popular on this site for the last two years, and it’s received dozens of comments. Many of these were additional formatting questions, or answers to those questions. This article is a round-up of those comments – all credit to the original commenters, whose comments are on the original article. Can I substitute a string for a value? Yes R...
blog.stevex.net
SteveX Compiled
http://blog.stevex.net/page/2
Apple Pay vs CurrentC. October 26th, 2014. Apple timed the introduction of Apple Pay exactly right for the US market. Retailers are just in the midst of a switch to NFC payments, and are making changes to their payment terminals. It’s hard to convince retailers it’s worth making a change, but they’ve been convinced that they need to change something by the uptick in fraud, and Apple’s token-based payment system is a great system for reducing fraud. But really, it’s about the cut that the credit card comp...
blog.stevex.net
SteveX Compiled » Data Access using TableAdapter
http://blog.stevex.net/data-access-using-tableadapter
Try out my new app: MealPlan. A simple weekly meal planning tool for the iPad. Data Access using TableAdapter. This could also have been called “Data Access without having to write the SQL yourself”. When I start coding a web application, I usually start with the database. Creating tables, defining columns, creating indexes. That’s the first step. Visual Studio 2005 can help here. A new addition to Visual Studio is the TableAdapter. Now you want to work with this data in your code. You could start cr...
blog.stevex.net
SteveX Compiled » Cool Unicode Glyphs
http://blog.stevex.net/cool-unicode-glyphs
Try out my new app: MealPlan. A simple weekly meal planning tool for the iPad. Writing somewhere and wish you could include some graphics, but you’re working in a medium that supports only text (like sending a mail message with Gmail)? Try copying and pasting images from this page into the message. Whether it works or not depends on the font you’re using, but it’s worth a shot. Mail (will not be published) (required). Software developer, occasional architect, guy who likes toys. Email Me.
blog.stevex.net
SteveX Compiled » Maintaining UI Responsiveness
http://blog.stevex.net/maintaining-ui-responsiveness
Try out my new app: MealPlan. A simple weekly meal planning tool for the iPad. This is a bit of a rant on something that constantly annoys me about using my computer. It’s the lack of predictability regarding latency of simple operations. Here’s an example: Click on the Start menu (assuming you’re running Windows). Did it appear instantly? Or did your computer spend 5 seconds digging around on the hard disk before drawing it? Here’s the thing: It frustrates users when something doesn’t work t...Delay loa...