菜鸟问大虾:为何我的show 与hide时灵时不灵?(祥见下)
I have defined two function to restore and hide my main form,and the form is located at the tray area,when I right click on the icon of it,it pops up a menu include "hide" and "show" just like that:
void __fastcall TForm1::Show1Click(TObject *Sender)
{ ::SendMessage(Form1->Handle,WM_SYSCOMMAND,SC_RESTORE,0);
}
void __fastcall TForm1::Hide1Click(TObject *Sender)
{::SendMessage(Form1->Handle,WM_SYSCOMMAND,SC_MINIMIZE,0);
}
the first time you run it ,the "show" and "hide" take effect,but when you repeat doing so,the form keep unchange in the desktop!
I wish I can get your help,give you my best thanks!!!