Bonjour,
J ai concu un petit code reduisant une fenetre si cette derniere est placee au dessus d un certain seuil de l ecran..
voila mon code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 GetWindowRect (Hwnd,rect);
  width:=rect.Right-rect.Left; //width of the window
  height:=rect.bottom-rect.top; //height of the window
  if texttmp='InfoRecei' then exit; {test the beginning of the name of the window (
  just the beginning because there is a difference between winXP and Win2000 windows name }
 
  if rect.top<30 then //do something just for windows which are not under the Information bar
    begin
       rect.Top:=fixheight;
       if height>screen.Height-55
       then  //reduction of the size of the window if it is too 'big'
         height:=height-fixheight;
         movewindow(hwnd,rect.Left,rect.Top,width,height,true);
       end;
Tout marche bien , la reduction de la taille et de la position est bien effectuee..
Mais le probleme : Si ma fenetre est en mode " taille max" et prend tout l ecran, le programme la met a la bonne taille certes, mais ensuite il n est plus possible de l agrandir, le systeme considerant que la taille max est la tailel courante..
J aimerai en fait pouvoir mettre la fenetre en mode normal avant de changer la tailel courante afin de pouvoir la remettre en plein ecran apres ma modif...
Si quelqu un a une idee n hesitez surtout pas
merci d avance