I often run into situations where I’d like to undo all the work I’ve done in a file. Some applications refer to this as Revert-to-saved. Visual Studio 2005 does not seem to have a function to do this. So, I’ve written a couple macros to do this. The first, RevertToSaved simply calls Undo until it can’t undo anymore. This is much faster than holding the Ctrl-Z key down, and keeps your undo buffer. Sub RevertToSaved() While DTE.ActiveDocument.Undo() = True End While End Sub The second, RevertToSaved2, is a little more brute force–it simply … Continue reading Visual Studio Revert-to-saved macros
Raymond Chen blogged recently about a disclaimers for a particular prize and it got me thinking about how inane some of these disclaimers are or how inane the circumstances are. Some disclaimers make sense and should be there: “professional driver on closed course” and “don’t try this at home”. Some examples of the inane disclaimers or circumstances: “Simulated Image” So, you’re expecting us to accept that your product is so poor that a simulated image on your product (TV, cell phone, etc) in the commercial was necessary? “Results not typical” Really, you’re bending the truth and concentrating only on the positive … Continue reading Thoughts on Some Legal Disclaimers
I’ve got a Windows 2000 Server running Routing and Remote Access with the NAT functionality to route my Internet connection through a computer running a firewall, etc. This works well, I can share my Internet amongst my local network while offering a bit more security. The problem is, Routing and Remote Access often gets confused and can’t perform DNS lookups and therefore blows Internet connection sharing out of the water. This seems to occur if the radio/modem loses power. Until recently, the only way I found that rectified the problem (sometimes) is by rebooting the server. As you might understand, this is … Continue reading Routing and Remote Access, NAT, and Internet connection sharing.
Abhinaba Basu made a recent post on his blog regarding a brilliant pipe utility for use in the Command Prompt. Clip.exe, from various Windows Resource Kits allows you to pipe data (as text) to the clipboard!
Paragraph Style 1 Application.EnableVisualStyles();Application.SetCompatibleTextRenderingDefault(false);Application.Run(new Form1());
I was throwing together some demo code that involved creating a control at runtime, that I wanted docked in a certain way on the parent Form. I could have pre-created the control in the designer and hidden it–to be made visible instead of creating it–but, that’s not the situation I was in. Simply creating the control and setting the Dock property (in this case to DockStyle.Fill) isn’t enough to dock it properly if there are any existing docked controls. If you’ve ever created a control and runtime and attempted to change the Dock property, you’ve probably noticed it doesn’t dock the way … Continue reading Docking With Run-Time-Created Controls
On 1-jul-06 I was awarded MVP Visual Development – C#. Microsoft has been so kind as to offer blog space here on msmvps.com; and, I’ve been looking for a better blog, so I’ll be moving my blog here. I should be a little more prolific with by blog from here on in. Welcome to my new blog.