Robert Meek wrote: > So next I tried using another approach suggested by someone here: > "if GetAsyncKeyState(VK_SHIFT) = 0 then begin end else begin end;", and > though this solved some of the problems it also introduced new ones!
Most of the time, the function you really want is GetKeyState. That function reflects the state of the thread's input queue. That state gets updated as the OS processes wm_KeyDown and wm_KeyUp messages. If you receive a wm_Click message before you release the Shift key, then the wm_Click is sooner in the queue than the wm_KeyUp message, so when you call GetKeyState in the wm_Click handler, the Shift key will appear to still be down, even if the user has already let go. -- Rob _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

