Friday, May 14, 2010

Prevent a form from closing

Override canClose method of that form, and call winAPI::minimizeWindow, when
the form cannot be closed.
This is the sample code, but require new checkBox control (named
"okToClose") with "autoDeclare" property is "Yes":


public boolean canClose()
{
boolean ret;
ret = super();
if (okToClose.value() == NoYes::Yes)
{
ret = true;
}
else
{
ret = false;
WinAPI::minimizeWindow(element.hWnd());
}
return ret;
}

1 comment:

  1. What has your government done to help save you from your financial instability? you strive to survive and yet you hear stories of how your leaders have become terror in your entities... is time to make a different. for will have made money, and we have also come to help you out from your long time of financial suffering. clearing of credit card is made available, software for hacking ATM machines, bank to bank hacking and transfer, change your school grade and become something useful in the society. we also have other form of services such as Facebook hack, whats-app hack, twitter hack, i cloud hack, tracking of smart phones, hacking CCTV, installation of software on desktop and PC, snap-chat hack, Skype hack, wire wire, bitcoin account hack, erase your criminal record and be free for ever. database hack and many more. e-mail: cyberhackingcompany@gmail.com for your genuine hacking services and we shock we your findings.  

    ReplyDelete