Here's a new twist to this... I'm using thread222-1043122 exactly as it is posted here. On any of the forms that are NOT the startup form, I can hook and unhook to my hearts content and have no problem. On the main form of the project, if I unhook directly in the Form_QueryUnload event, and then end the program with "End", it crashes the IDE. Whenever I execute the WheelHook, I'm tracking the hooked/unhooked state using a separate variable, so I KNOW I'm not trying to unhook twice.
If I make it unhook on the MSFlexgrid_LostFocus event and then put a silly command like Command9.SetFocus in my Form_QueryUnload (which then causes the flex grid to lose focus, thus firing the event), then initiate a Timer that then ends the program the crazy thing always works - it's like something else has to happen in the program before messaging is re-established after the un-hook. I don't understand why this hoop works, but it does. The program is pretty huge, so there is a lot of stuff going on at the time of Form_Terminate, this may have something to do with it.
Doing the WheelUnhook in the Form_QueryUnload just prior to an End statement always crashes the IDE, in my case. I tried it with a form with nothing in it and it loads/unloads fine, so I'd imagine that it's a size/timing issue. I discovered this behavior by clicking on a Command button (causing the MSFlexGrid_LostFocus event to fire), and then I closed the program... voila! I always use an End statement to make sure the program is shut down, otherwise about 50% of the time the IDE is sitting there paused.
Also it seems the simplest way to handle hooking and unhooking is to always unhook before showing a new form. If the flex grid on the main form has never recieved focus and your user opens a different window, then knowing if your form has been hooked is important, so you don't accidentally unhook it when showing the new form.
It might be nice to know the mechanics behind why this happens, but as long as it basically works, that's what I need.
Thank you to everyone! Merry Christmas!