Most days I love using .NET and the .NET Framework. Today is not one of those days.
First, I've spent a good portion of the last two evenings trying to decipher Drag & Drop so that I could drag a url from my app onto the desktop. Nothing I've tried worked, even though I mimiced what IE did. Then I found DataFormats.FileDrop, which should do exactly what I want, but it's not supported by Windows Forms. Argh!!!
Then, in trying to polish an app I've been working on, I'm trying to detect when a close event is cause by logout/shutdown, and I can't. I've got an app that has the close even wired up to confirm quit. Normally, it works great, but when you try to shutdown, it hangs the shutdown until the apps is closed or killed. Nothing I've tried seemed to work. Application.ApplicationExit doesn't fire till after the form is closed, Environment.HasShutdownStarted (V1.1) does not ever seem to return true, and SystemEvents.SessionEnding never seems to fire. (I can't quite figure out what SessionEnding/Ended is for unless it's broken)
So here I am with two problems in as many days that I just can't solve. (If any body has any ideas, they'd be appreciated)
Then, just to add insult to injury, dotnetweblogs.com errored out on my first attempt to post this, leading me to beleive .NET is out to get me. <grin>