Jump to content

Recommended Posts

Posted

Eu abro uma imagem,e mostra em um textbox,a localização dela,ai como eu faço pra pegar tambem a largura e a altura,e mostrar isso em outros dois textbox ?

Tentei assim,mas só mostra o tamanho do arquivo,no total,e nao as dimensoes (altura e largura)

Dim information As System.IO.FileInfo
    information = My.Computer.FileSystem.GetFileInfo(TextBox1.Text)
    TextBox2.Text = (information.Length)
Posted
Dim imagem as new Bitmap("localização do ficheiro")
textbox1.text = imagem.Width
textbox2.text = imagem.Height

Oracle Certified Professional - AdministraçãoOracle Certified Professional - Pl/sqlMCPD - Microsoft Certified Professional DeveloperMCTS - Microsoft Certified Technology Specialist

Posted

valeu cara,muito obrigado mesmo. Olha,esse site tem me ajudado muito,todos aqui são muito inteligentes.

Eu so estava com um problema,quando tentei inserir esse código,pra colocar os valores em um numeric up,pois ele tinha um limite,era 100,ai fui mechendo e vi qe era so colocar NumeriUp.maximum = 200 ,ou quanto eu precisasse a mais,muito obrigado

Posted

Sim,obrigado,o código ficou assim :

OpenFileDialog1.ShowDialog()
 TextBox1.Text = OpenFileDialog1.FileName
 NumericUpDown1.Maximum = 1000
 NumericUpDown2.Maximum = 1000
 Dim imagem As New Bitmap(TextBox1.Text)
 NumericUpDown1.Value = imagem.Height
 NumericUpDown2.Value = imagem.Width

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.