Change the alignment of all the menus of Windows  

Send By: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Date: 27/07/99

Tip accessed 470 times

 


If you want that the PopUp menus joins to the right or the left of the Item from which spreads.

To Set it:


 procedure TForm1.Button4Click(Sender: TObject);
 var
   Donde:integer;
 begin
   Donde:=0; {0=Izquierda/left  1=Derecha/Right}
   SystemParametersInfo(SPI_SetMenuDropAlignment,1,NIL,SPIF_SENDWININICHANGE);
 end;






To know their actual state:


 procedure TForm1.Button5Click(Sender: TObject);
 var
    Dato: integer;
 begin
   SystemParametersInfo(SPI_GetMenuDropAlignment,0,@Dato,0);
   If Dato =0 then ShowMessage('Izquierda/Left')
              else ShowMessage('Derecha/Right');
 end;



Ah!, with SPIF_SENDWININICHANGE the change makes it without recording it in the user's current configuration. If you want that the change is permanent, put SPIF_UpdateIniFile. If you want both: SPIF_SENDWININICHANGE+SPIF_UpdateIniFile.