Edu Posted October 2, 2014 Report Share Posted October 2, 2014 Bom dia amigos! Gostaria de saber se há um jeito de redimensionar um bitmap para colocar na coluna de um xBrowse, pois os arquivos de imagens podem estar com tamanhos diferentes e eu queria estabelecer um tamanho padrão. Quote Link to comment Share on other sites More sharing options...
william Posted October 2, 2014 Report Share Posted October 2, 2014 o:=ownd:obar:acontrols[1]:hbitmap if o<>0 hbmp:=ownd:obar:acontrols[1]:hbitmap nbmpwidth := nbmpwidth(hbmp) nbmpheight:= nbmpheight(hbmp) larg:=nbmpwidth*nfactorwitdh alt:=nbmpheight*nfactorheight o:=resizebmp(o,larg ,alt ) ownd:obar:acontrols[1]:hbitmap:=o endif olá Eduardo, existe a função interna do fivewin RESIZEBMP() Acima um exemplo de como eu uso para redimensionar o bitmap de uma buttonbar. creio que é só adaptar para o xbrowse. Att. William Adami Quote Link to comment Share on other sites More sharing options...
Edu Posted October 3, 2014 Author Report Share Posted October 3, 2014 Obrigado pela resposta amigo! Resolvido! Aproveitando a ocasião, procurei por esta função "resizebmp()" e descobri que se passar o quarto parametro = .t. a imagem não perde qualidade. Você pode implementar na sua função também. Syntax ResizeBmp( hBitmap, nWidth, nHeight, lMaxRes ) –> hResizedBitmap Parameters hBitmap -> The handle of the bitmap to resize nWidth, nHeight -> The new dimensions of the resized bitmap to create lMaxRes -> Resizes it using the max quality as possible Abraço. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.