<div dir="ltr">This program works (at least on windows XP) but <span id="result_box" class="" lang="en"><span class="">must be</span> <span class="">changed</span> <span class="">according to your</span> <span class="">language :<br>
<br></span></span>program consprg;<br><br>{$mode objfpc}{$H+}<br><br>uses<br>  Classes, Crt, windows;<br><br>const<br>  CloseItemString = '&Fermer';  // '&Fermer' : french  <br>                                             // probably '&Close' in english<br>
<br>function GetConsoleWindow : HWND; external 'kernel32' name 'GetConsoleWindow';<br><br>var<br>  H: HWND;<br>  SM: HMENU;<br>  C, I, J: LongInt;<br>  Buf : array [0..255] of Char;<br>  Close : Boolean;<br>
begin<br>  H := GetConsoleWindow;<br>  SM := GetSystemMenu(H, false);<br>  C := GetMenuItemCount(SM);<br><br>  J := -1;<br>  for I := 0 to C - 1 do<br>  begin<br>    GetMenuString(SM, I, Buf, 255, MF_BYPOSITION);<br>    if Buf = CloseItemString then<br>
    begin<br>      J := I;<br>      Break;<br>    end;<br>  end;<br><br>  if J > 0 then<br>    RemoveMenu(SM, J, MF_BYPOSITION);<br><br>  ClrScr;<br>  WriteLn('press ESC to quit');<br>  GotoXY(10, 10);<br>  WriteLn('Hello');<br>
<br>  Close := false;<br>  while not Close do<br>  begin<br>    Delay(10);<br>    if KeyPressed then<br>      Close := (ReadKey = #27);<br>  end;<br>end.<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-06-03 14:36 GMT+02:00 mokashe.ram <span dir="ltr"><<a href="mailto:mokashe.ram@gmail.com" target="_blank">mokashe.ram@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Everyone,<br>
<br>
 could anyone help me on disabling the MIN,MAX,Close icon of EXE in free<br>
pascal.<br>
<br>
Thanks,<br>
sudarshan<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://free-pascal-general.1045716.n5.nabble.com/Disabling-the-MIN-MAX-Close-icon-of-EXE-in-free-pascal-tp5719494.html" target="_blank">http://free-pascal-general.1045716.n5.nabble.com/Disabling-the-MIN-MAX-Close-icon-of-EXE-in-free-pascal-tp5719494.html</a><br>

Sent from the Free Pascal - General mailing list archive at Nabble.com.<br>
_______________________________________________<br>
fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a><br>
</blockquote></div><br></div>