Delphi Form button ashing disable

1. Make the minimize button gray:
setwindowlong(handle,gwl_style,getwindowlong(handle,gwl_style) and not ws_minimizebox);

2. Make the maximize button gray:
setwindowlong(handle,gwl_style,getwindowlong(handle,gwl_style) and not ws_maximizebox);

3. The close button turns gray

EnableMenuItem(GetSystemMenu (Handle, FALSE), SC_CLOSE, MF_BYCOMMAND or MF_GRAYED);

4 Disable ATL+F4

Using the message mechanism to handle the close event

In the tform class Write
procedure wmclose(var msg:tmessage);message wm_close;


..

Then write the specific process
procedure tform1.wmclose (var msg:tmessage)
begin
//
end;
What you want to do when he presses it, you can put it in this process, if you want to continue to close, use
inherited ;

This will block ALT+F4

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3166 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.