USUÁRIO:      SENHA:        SALVAR LOGIN ?    Adicione o VBWEB na sua lista de favoritos   Fale conosco 

 

  Fórum

  Visual Basic
Voltar
Autor Assunto:  Alterar foto para 300x400
Knight
GOIÂNIA
GO - BRASIL
Postada em 06/04/2005 19:31 hs         
Boa tarde.
Tenho uma foto aqui em 800x600 gostaria de fazer comq ela aparecece no sistema no tamanho 300x400. Não preciso aterar o tamanho do arquivo, so deverá ser aberta em uma picturebox ou image no tamanho 300x400.
 
Algeum pode me ajudar???
Agradeço desde já

Emoções Knight Emoções

http://host.csti.eti.br

CSTI WebHosting
Hospedando Idéias Emoções

     
Defende
JARINÚ
SP - BRASIL
ENUNCIADA !
Postada em 07/04/2005 10:12 hs            
Eu tenho esse codigo aqui que acho que pode te ajudar. Eh soh vc deixar o objeto image com as medidas que vc quiser e usar este codigo para carregar.
 
Public Function Redimencionar(img As Image, pict As PictureBox, Caminho As String)
Dim X As Integer, Y As Integer, z As Double
On Error Resume Next
img.Stretch = False
Set img.Picture = LoadPicture(Caminho)
img.Stretch = True
   X = img.Height - pict.ScaleHeight
   Y = img.Width - pict.ScaleWidth
  
   If X > Y Then
      z = img.Width / img.Height
      img.Height = img.Height - X
      img.Width = img.Width - (X * z)
    Else
      z = img.Height / img.Width
      img.Height = img.Height - (Y * z)
      img.Width = img.Width - Y
   End If
    X = pict.Height - img.Height
   Y = pict.Width - img.Width
  
   If X < Y Then
      img.Left = Y / 2
    Else
      img.Top = X / 2
   End If
img.Left = (pict.Width / 2) - (img.Width / 2)
img.Top = (pict.Height / 2) - (img.Height / 2)
If Err.Number <> 0 Then
    MsgBox "Tipo de figura inválido.", vbInformation, "Aviso."
    Exit Function
End If
On Error GoTo 0
End Function
 
Qualquer duvida posta ai
   
Knight
GOIÂNIA
GO - BRASIL
Postada em 07/04/2005 12:29 hs         
Valeu, erra isso mesmo q eu queria

Emoções Knight Emoções

http://host.csti.eti.br

CSTI WebHosting
Hospedando Idéias Emoções

     
Página(s): 1/1    


Seu Nome:

Seu eMail:

ALTERAR PARA MODO HTML
Mensagem:

[:)] = 
[:P] = 
[:(] = 
[;)] = 

HTML DESLIGADO

     
 VOLTAR

  



CyberWEB Network Ltda.    © Copyright 2000-2025   -   Todos os direitos reservados.
Powered by HostingZone - A melhor hospedagem para seu site
Topo da página