Solved

Getting image file attributes

Posted on 2003-10-31
4
204 Views
Last Modified: 2010-05-03
I want to get height and width of an image file in my vb program. Same value as shown when file is right clicked and properties are viewed in windows and it show hight and width in pixels.
0
Comment
Question by:vicksjaipur
  • 2
4 Comments
 

Expert Comment

by:James20000
Comment Utility
I have the same problem / question!   I need image width and height in pixels in VB.

See www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20783388.html
0
 
LVL 5

Expert Comment

by:fantasy1001
Comment Utility
Try this
    Dim Pic As StdPicture
    Dim PicWidth  As Long
    Dim PicHeight As Long
   
    Set Pic = LoadPicture("c:\windows\dell.bmp")
   
    PicWidth = ScaleX(Pic.Width, vbHimetric, vbPixels)
    PicHeight = ScaleY(Pic.Height, vbHimetric, vbPixels)

Thanks,
~ fantasy ~
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 100 total points
Comment Utility
Fantasy is right :)
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
c'mon!, what's the problem here? Fantasy solved the problem, not me.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now