Thursday, April 15, 2004

Windows Form Handle Changing

I wrote an application recently that installs a Windows Form as an application bar with the Windows shell.  It was working all right until the client asked for some functionality that would minimize it to an icon.  At that point all hell broke loose.  It appeared after doing some tracing in the WndProc that at a certain point in time the window receives a WM_DESTROY and then at some point a WM_CREATE.  This was weird since I wasn't really ever destroying the window.  Took me a good day to figure out that when I was minimizing I was also doing a this.ShowInTaskBar=true;  Then when restoring I was doing a this.ShowInTaskBar=false;  Guess what?  This property essentially changes the WS_EX_APPWINDOW extended window style and to do this it creates and destroys the window!  This was wreaking havoc with my registration with the shell.

A side effect of this is that when it happens OnHandleCreated() and OnHandleDestroyed aren't called!  Seems totally counterintuitive since a handle was just destroyed and recreated.  The only way I could figure to track this was to wait for the WM_CREATE message in the WndProc.

Footnote: Some have asked what an application bar is.  It is something very similar to the windows taskbar yet application specific.

Thursday, April 15, 2004 12:26:01 PM (Pacific Standard Time, UTC-08:00)   #      Comments [1]  
 

  Thursday, April 08, 2004

Tablet PCs and Imagine Cup

Wow! I think this is a record.  Three posts in one day.

Robert was talking about the Tablet PC today in a post. I must admit I am one of those that "don't get it."  My wife does.  We picked up a Portege M205 for her and she loves it.  She uses it in her counseling practice and loves it. This amazes me as she has always been a bit computer phobic.

My second data point was my judging of the Imagine Cup on Wednesday.  I was suprised to see that 2 out of the 3 teams were using Tablet PCs!  Again Portege M205s! Students clearly get it.

I suspect I am prejudiced against the devices based on the fact that my main applications that I use are VS.NET, Vault, and Outlook.

Thursday, April 08, 2004 10:22:20 PM (Pacific Standard Time, UTC-08:00)   #      Comments [2]  
 
Channel 9 Sighting

I was on campus in Building 5 today doing a Performance and Scalability web cast with PAG and ran into the channel 9 guys filming stuff.  It appears that Robert Scoble was interviewing Chris Sells which must be part of the MSDN contingent in Building 5.  I waved Hi and went about my way. Time to wait and see if I end up on the editing room floor or if they leave my ugly mug in the video.

Thursday, April 08, 2004 3:01:17 PM (Pacific Standard Time, UTC-08:00)   #      Comments [1]  
 
University of Washington Imagine Cup

I had a blast last night judging the local entries to the Imagine Cup.  The entries were all over the map but at least two teams I thought did a fairly good job of coming up iwith a plausible scenario.  One team, the winner, had a fully implemented and functional solution.  I couldn't believe the effort that went into it.  They ended up creating half a dozen new controls for the compact framework and demoed the application running on the smartphone emulator.  It was quite clever and they had clearly thought through the issues with making the application run on a small device with no keyboard. They wanted to demo on a real smartphone but ran into the same problems most US developers hit, lack of devices. 

Congratulations to the University of Washington winners and good luck at the national competition.

Thursday, April 08, 2004 8:47:58 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Wednesday, April 07, 2004

VSLive Orlando 2004

I have started planning for VSLive Orlando 2004.  I am responsible mainly for the ASP.NET track.

Several changes will be happening with this iteration of the conference. 

  1. I think this is the right timing to start ramping up on ASP.NET 2.0 content. I have no idea on release dates other than the Visual Studio 2005 name that was announced.  Since this conference will be happening in September the timing seems right that a beta will have shipped by this point and users will be starting to get on board.  That being said I think the majority of folks will be still developing with ASP.NET 1.x.  Some content needs to be maintained for them.  It will be a tricky balance given a total of 10 sessions to shoe horn the content into.
  2. I think existing .NET adoption falls into two camps based on technology.  I think the ASP.NET guys tend to be a bit ahead of the curve based on shorter development cycles, the fact that they don't require any client side installs, etc.  Hence most developers have already made the move.  Whereas I think many Windows Forms developer types are just starting to make the move or have made it recently. Based on this my thought is that all ASP.NET 1.x content should move squarely into the Intermediate-Advanced realm while the ASP.NET 2.0 content is more Intro-Intermediate.  Does this make sense?

What are peoples thoughts on the split?  50/50?  60/40?

In addition I have a mission in mind to get more new speakers involved.  This can be a two edged sword. Speakers that I have worked with in the past are a known quantity.  I know quite a bit about their speaking abilities as well as how audiences react to them.  A new speaker is always a crapshoot.  I firmly believe however that we need new blood. This new speaker thing is also complicated by the way speakers are compensated.  They are compensated per session and as a previous speaker I feel that I need to give each speaker at least two sessions.  This means that I have a grand total of 5 speakers for VSLive Orlando.  I wish I could have more but that isn't my choice.

So with all of that in mind I am interested in two additional things.  What do people want to see related to ASP.NET?  Give me both 1.x and 2.x topics. Which speakers do you want to see?  Help me figure out how to create a conference that you will want to attend.

Wednesday, April 07, 2004 2:24:22 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Tuesday, April 06, 2004

IEHost, Smart Client and DragDrop

A client of mine was working on adding drag and drop to a Windows Forms control hosted in Internet Explorer that we use.  They wanted to allow a user to drop a group of files, email messages, etc onto this control and then do something with the items that were dropped.  We got it all working great in a Windows Form but the same control hosted in Internet Explorer exhibited two strange behaviors:

  1. Whenever more than one file was dropped onto the control GetData(DataFormats.FileDrop) yielded only the first!  This was a weird one.  Come to find out this was the lack of System.Security.FileIOPermission!  Once we added this attribute: [FileIOPermission(SecurityAction.Assert, Unrestricted=true)] we started to receive more than one file.  According to PSS this is because there is a FileIOPermission demand in GetData() that fails silently after retrieving the first file.  Sounds like a bug to me!
  2. Second issue we ran into is that in the DragDrop handler we wanted to make a remoting call to our controller to have it launch a form. This failed only when we were in a DragDrop handler.  We never determined the root cause here but did determine that the source of the drop is blocked until the DragDrop completes.  Sure seems like I should be able call a method to indicate that is the case but instead you must return from the DragDrop event.  To get around this we did a this.Invoke() on a method containing the work. This allowed the DragDrop event to return and then for our form to be launched.
Tuesday, April 06, 2004 1:31:28 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Friday, April 02, 2004

HREF Exes in the Browser Oddity

If you have been reading my blog you realize that I do quite a bit with HREF exe style applications.

Well this past week I was working on a feature for a client with a co-worker and hit a bizarre problem.  We are modifying our application to act as a drop target.  This works great when the control we are using for the drop target is hosted in a windows form.  When the control is hosted in Internet Explorer dropping multiple files on the target results in only the first dropped file showing up!  Sure seems like a bug and turns out to be very problematic for us.  Anyone else ever hit this issue?

Friday, April 02, 2004 7:29:21 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Monday, March 29, 2004

Outlook Drag and Drop with .NET

Has anyone figure out how to get this to work?  I see dozens of messages inquiring about it but all answers seem to take the lame approach of looking at the current selection in Outlook instead of looking at the FileGroupDescriptor and using IStorage and IMessage to parse out the actual items.

However no one seems to have posted anything!  Any solutions out there someone is willing to send me?

Monday, March 29, 2004 5:36:22 PM (Pacific Standard Time, UTC-08:00)   #      Comments [4]  
 

  Friday, March 26, 2004

A SAN for the Rest Of Us

Ever since I started reading about iSCSI I have wanted to pick up some iSCSI devices and build my own SAN that will allow me to share storage resources amongst the multiple boxes in my office.  FC has always been way, way to expensive.

Along comes SANMelody. It isn't exactly free but at $1178 for their low end version it is the most cost effective way that I have found to build a SAN.  Just ordered some hardware today so I can give it a try.

Stay tuned for whether or not it is as cool as it looks.

Friday, March 26, 2004 4:06:49 PM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 

  Thursday, March 18, 2004

Debugging Tip

Paul posted this great NUnit tip on his blog.  Of course this also works great for ASP.NET.  Just attach to the w3wp.exe process on IIS6 or the aspnet_wp.exe process on IIS 5.X.  How do you debug something however that is part of your startup code?  This is especially tough when wanting to debug the constructor of a HREF EXE or WinForms control in the browser. Use System.Diagnostics.Debugger.Break().  This will cause a debugger prompt to pop up when the line is hit allowing you to start a new VS.NET instance or select an existing instance to debug the running application.

Thursday, March 18, 2004 9:47:16 AM (Pacific Standard Time, UTC-08:00)   #      Comments [0]  
 


Administration
Sign In