Kees Baltus 0 Newbie Poster

I was allready successfull to resize pictures to place them with the right relations in a picturebox (I have to present 16 pictures - just like thumbnails - on a form; the original imagesizes can go up to 6 MB).
Problem: it takes too much time.

My procedure:
Load picture in SpecialPicturebox
Estimate the Height and Width
If Height>Width then Calculate scalingfactor1 else Calculate scalingfactor2
load picture in Picturebox1 with proper scalingfactor

(Imagebox with autostreching gives deformed pictures!)

Remark:
Previewing 16 pictures in my solution can take 10 sec, previewing them in Windows explorer will take only 0,1 sec (estimate).
Who has a faster solution?

Kees Baltus 0 Newbie Poster

img.LoadFile "C:\Yvonne.jpg"
If img.Properties.Exists("36867") Then
Set f = fs.GetFile("c:\Yvonne.jpg")
MsgBox "Date of original = " & img.Properties("36867").Value
MsgBox img.FileExtension
MsgBox img.FrameCount
Else
Set f = fs.GetFile("c:\Yvonne.jpg")
MsgBox "Datecreated = " & f.DateCreated
End If

Kees Baltus 0 Newbie Poster

I need to read "Title tag" and "original date"of pictures.
I installed WIAaut.dll and put Commondialog on form.
:'( I can read all items from the Img.Properties with a loop.


SOLUTION:
Set Img = CreateObject("WIA.ImageFile")
Set IP = CreateObject("WIA.ImageProcess")
Set fs = CreateObject("Scripting.FileSystemObject")

Img.LoadFile "C:\Yvonne.jpg"
Set f = fs.GetFile("c:\Yvonne.jpg")

:) If Img.Properties.Exists("36867") Then
MsgBox "Date of original = " & Img.Properties("36867").Value
Else
MsgBox "Datecreated = " & f.DateCreated
End If

Kees Baltus 0 Newbie Poster

I need to read "Title tag" and "original date"of pictures.
I installed WIAaut.dll and put Commondialog on form.
:'( I can read all items from the Img.Properties with a loop.


SOLUTION:
Set Img = CreateObject("WIA.ImageFile")
Set IP = CreateObject("WIA.ImageProcess")
Set fs = CreateObject("Scripting.FileSystemObject")

Img.LoadFile "C:\Yvonne.jpg"
Set f = fs.GetFile("c:\Yvonne.jpg")

:) If Img.Properties.Exists("36867") Then
MsgBox "Date of original = " & Img.Properties("36867").Value
Else
MsgBox "Datecreated = " & f.DateCreated
End If

Kees Baltus 0 Newbie Poster

I need to read "Title tag" and "original date"of pictures.
I installed WIAaut.dll and put Commondialog on form.
:'( I can read all items from the Img.Properties with a loop.

It is difficult to find out how to get only the "Title tag" and "DateTimeOriginal".

Kees Baltus 0 Newbie Poster

Forgot to mention that I found a solution for my problem

Kees Baltus 0 Newbie Poster

Windows Explorer gives extended information of pictures such as Width, Height, Manufacturer, Cameramodel, Exposuretime, Picture made on, Date created, Date changed and so on.

How to get access to these parameters in VB6.0?

Thanks in advance
Kees Baltus

Keywords:
EXIF Exchangeble Image File Format
IPTC Interantional Press Telecommunications Council
WIA Windows Image Acquisition
Information sites:
http://msdn2.microsoft.com/en-us/library/ms630818.aspx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wiaaut/wia/wiax/overviews/sharedsamples.asp

Solution:
1. Download "WIAaut.dll" (see http://www.ilixis.com/developer/wia.html)
2. Register wiaaut.dll
3. Project-References Microsoft Windows Image Acquisition Library v2.0
4. Put Commondialog Tool on form
5. Add the next code
Dim Img 'As ImageFile
Dim IP 'As ImageProcess
Dim v 'As Vector
Dim p 'As Property
Dim i 'As Integer
Set Img = CreateObject("WIA.ImageFile")
Set IP = CreateObject("WIA.ImageProcess")
Set v = CreateObject("WIA.Vector")
Img.LoadFile "C:\135_3501.jpg"
For Each p In Img.Properties
Dim s 'As String
s = p.Name & "(" & p.PropertyID & ") = "
If p.IsVector Then
s = s & "[vector data not emitted]"
ElseIf p.Type = RationalImagePropertyType Then
s = s & p.value.Numerator & "/" & p.value.Denominator
ElseIf p.Type = StringImagePropertyType Then
s = s & """" & p.value & """"
Else
s = s & p.value
End If

Kees Baltus 0 Newbie Poster

Keywords:
EXIF Exchangeble Image File Format
IPTC Interantional Press Telecommunications Council
WIA Windows Image Acquisition
Information sites:
http://msdn2.microsoft.com/en-us/library/ms630818.aspx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wiaaut/wia/wiax/overviews/sharedsamples.asp

Solution:
1. Download "WIAaut.dll" (see http://www.ilixis.com/developer/wia.html)
2. Register wiaaut.dll
3. Project-References Microsoft Windows Image Acquisition Library v2.0
4. Put Commondialog Tool on form
5. Add the next code
Dim Img 'As ImageFile
Dim IP 'As ImageProcess
Dim v 'As Vector
Dim p 'As Property
Dim i 'As Integer
Set Img = CreateObject("WIA.ImageFile")
Set IP = CreateObject("WIA.ImageProcess")
Set v = CreateObject("WIA.Vector")
Img.LoadFile "C:\135_3501.jpg"
For Each p In Img.Properties
Dim s 'As String
s = p.Name & "(" & p.PropertyID & ") = "
If p.IsVector Then
s = s & "[vector data not emitted]"
ElseIf p.Type = RationalImagePropertyType Then
s = s & p.value.Numerator & "/" & p.value.Denominator
ElseIf p.Type = StringImagePropertyType Then
s = s & """" & p.value & """"
Else
s = s & p.value
End If

Kees Baltus 0 Newbie Poster

How to get access to picture information, such as Width, Heigth, Manufacturer, Cameramodel, Exposuretime, Picture made on, Date created, Date changed and so on.
(just like in Windows Explorer)

Kees Baltus 0 Newbie Poster

Thanks. but this not what I was looking for. I am able to load the names onto the combo box when loading form. But, After loading, if I type the first letter of the name in the combo box, the drop down list should show all names starting with the letter I have typed. For eg,

If I type m, the combo box should show,

Mickey
Mke
Mariam

Any Ideas??

thanx
pkatt

You can use cboList_keyPress(KeyAscii As Integer) and use the pressed letter to assemble echt time a new list again.

Kees Baltus 0 Newbie Poster

Replace "ActiveWorkbook.Close savechanges = true "

by
"ActiveWorkbook.save
ActiveWorkbook.Close savechanges:=False"

Kees Baltus 0 Newbie Poster


Thnx for this code. This one is really upto the mark.
but still i face one problem in the last line
i.e.

ActiveWorkbook.Close savechanges = true
when i m trying above line, then no changes made in that file
but
ActiveWorkbook.Close savechanges
whn i m trying above line, then changes made, but the msg display that do u want to save changes to this file??

i dont want msg. directly it has to save the file.
if possible, please guid me.

again thanks for this help.:)

Kees Baltus 0 Newbie Poster

Hi,

I am using MS access database with ADO control in VB.

I want to display only those names in the combo box when I type a first letter in the combo box using visual basic.

For Eg, When I type letter 'm' , the combo box should give a list of those names starting with letter m. Similarrly if I type "k" , it should givethe list of names starting with letter k. The names are to be retrieved from access database using ado control.

How can I do this?

Can anyone help me.

thanks

pkatt

First of all:
If the combobox is exploded, and you press any letter you go automatically to to the first occurence of your list.
Another solution is to fill the content of the combobox every time again.
I use next example. Everytime I start a form, I fill the combobox again with a new query.

Set dbsFotodatabase = OpenDatabase "D:\Fotobeheer\Fotodatabase.mdb")
Set rstPlaats = dbsFotodatabase.OpenRecordset("select distinct plaats from Blad1")
If rstPlaats.RecordCount > 0 Then
rstPlaats.MoveFirst
frmPreview.cboPlaats.AddItem "Alle"
Do
If rstPlaats.Fields("plaats").Value <> "null" Then
frmPreview.cboPlaats.AddItem rstPlaats.Fields("plaats").Value
End If
rstPlaats.MoveNext
Loop Until rstPlaats.EOF
End If

Kees Baltus 0 Newbie Poster

Windows Explorer gives extended information of pictures such as Width, Height, Manufacturer, Cameramodel, Exposuretime, Picture made on, Date created, Date changed and so on.

How to get access to these parameters in VB6.0?

Thanks in advance
Kees Baltus

Kees Baltus 0 Newbie Poster

hello,

i have to open excel file from vb application. i want to update excel file from vb if i modify some value from vb application. but i dont want msg from excel that "Do you want to save changes in this file?"

please guide me

Thnaks n Regards
from
Pranav Varma

Public xlApp As New Excel.Application
Public xlBook As Excel.Workbook
Public xlSheet As Excel.Worksheet
xlApp.Workbooks.OpenText FileName:= "Text.xls"
cells(1,1)= "Test2"
ActiveWorkbook.Close savechanges:=True xlApp.Quit

Kees Baltus 0 Newbie Poster

Public xlApp As New Excel.Application
Public xlBook As Excel.Workbook
Public xlSheet As Excel.Worksheet
xlApp.Workbooks.OpenText FileName:= "Text.xls"
cells(1,1)= "Test2"
ActiveWorkbook.Close savechanges:=True xlApp.Quit