Anda di halaman 1dari 2

201752 FormulrioRedimencionvel,independentedaBorda(Delphi)|DicasesoluesparaProgramaoDelphi,JAVA,VB.

NeteLinguagemC

Formulrio Redimencionvel, independente 0


da Borda(Delphi)
Posted:08/01/2011byAlexandreDeCarliinDicasparaDelphi
Tags:Delphi,Formulrio,Janela

Olamigos,estivepesquisandoporqueumformulriocomoEstilodaBorda(BorderStyle)quandoestavacomosvalores:

bsNone,bsSingle,bsToolWindowebsDialognoeramredimencionveis.

Poisentoeufuiprocurarprimeiramenteoprocedimento:onResizenosancestraisdoTForm,eencontreivriasentradasao

procedimento:CreateParams,ondeoStyledajanela

recebia:WS_EX_CLIENTEDGE,WS_EX_APPWINDOW,WS_EX_TOPMOST,WS_HSCROLL,WS_VSCROLL,WS_DLGFRAMEetc

CrieiumprocedimentonomeuFormulrioherdandoesseprocedimentodoancestral,paratestarassociandoessascontantesno

StyledoForm.Comosomuitos,fuiprocurarnainternetquaisseriamosapropriadosparaestecaso.

EntoeuencontreiumqueResolveoproblema.

FaamoSeguinte:

1 type
2 TForm1=class(TForm)
3 private
4 {Privatedeclarations}
5 public
6 {Publicdeclarations}
7
8 //Crieotipodemtodosprotected
9 protected
10 {Protecteddeclarations}
11 procedureCreateParams(varParams:TCreateParams);override;
12 end;
13
14 implementation
15
16 {$R*.dfm}
17
18 {TForm1}
19
20 //PodetrocaroBorderStyleparaqualqueroutrodesuapreferncia
21
22 procedureTForm1.CreateParams(varParams:TCreateParams);
23 begin
24 BorderStyle:=bsNone;
25 inherited;//Muitoimportantedeixareleherdarocomportamentopadropeloinherited;
26 Params.ExStyle:=Params.ExStyleorWS_EX_STATICEDGE;
27 Params.Style:=Params.StyleorWS_SIZEBOX;
28 end;

Esperoqueeutenhaajudado,agoravocsjsabemcomofazer,experimentemmudaroWS_SIZEBOXparaoutroevejamo

resultado

https://extremeprogramming.wordpress.com/2011/01/08/formularioredimencionavelindependentedaborda/ 1/2
201752 FormulrioRedimencionvel,independentedaBorda(Delphi)|DicasesoluesparaProgramaoDelphi,JAVA,VB.NeteLinguagemC

https://extremeprogramming.wordpress.com/2011/01/08/formularioredimencionavelindependentedaborda/ 2/2

Anda mungkin juga menyukai