Expand popup form as image grows (1 Viewer)

oxicottin

Learning by pecking away....
Local time
Today, 13:02
Joined
Jun 26, 2007
Messages
851
Hello, I been trying to figure out a way to expand a popup form as you dbl click inside on the larger image to make it grow in size. If you open form Form1 and select an image then a popup comes up displaying a larger image. I want to take it a step further and as your double clicking the image will get larger "Which it already does" I want the form to grow with the image. How can I do this?

Oh there is a Test image folder it has to be with your accdb file because images are getting pulled from there.
 

Attachments

  • ImageExpand_v1.zip
    175.3 KB · Views: 131

theDBguy

I’m here to help
Staff member
Local time
Today, 10:02
Joined
Oct 29, 2018
Messages
21,358
Hi. Try to look up Move or MoveSize method.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 13:02
Joined
May 21, 2018
Messages
8,463
I would look at some of @isladogs stuff.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:02
Joined
May 7, 2009
Messages
19,169
here is you imageExpand.
 

Attachments

  • ImageExpand_v1.zip
    141 KB · Views: 141

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:02
Joined
May 7, 2009
Messages
19,169
You're welcome.
Check also the "anchor" property of the image. I resize the form not the image. The image just resize with the form. Also i added an invisible command butto in front of the image. So the "id" changes when the cmdbutton is click. Clicking the image on any record will always return 1 as the "id" of the table.
 
Last edited:

oxicottin

Learning by pecking away....
Local time
Today, 13:02
Joined
Jun 26, 2007
Messages
851
You're welcome.
Check also the "anchor" property of the image. I resize the form not the image. The image just resize with the form. Also i added an invisible command butto in front of the image. So the "id" changes when the cmdbutton is click. Clicking the image on any record will always return 1 as the "id" of the table.

Arnelgp, What do you mean "Anchor" property? I did see the cmd button and I noticed the image stays the same size just the visual of it changes. I put a print button incase the user wanted to print the image thinking the image will be the same as what they blew up to see but it prints out the actual saved image size. How could I print it at the zoomed and larger size? I was thinking each time you zoomed it would show you the image size in the header.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:02
Joined
May 7, 2009
Messages
19,169
it's about the Image's Horizontal/Vertical Anchor property.

I have seen your code and you have there to Resize the image file.
the question is after making it bigger, when we close the image viewer form, should you revert
the image again to it's original size? if you don't do that, when you click it again in the main form
it is already zoomed. and just keep on zooming.
 

oxicottin

Learning by pecking away....
Local time
Today, 13:02
Joined
Jun 26, 2007
Messages
851
Sorry for the delay.... I would like to keep it at the original size after printing, This keeps the images folder small. Is there a way as the image gets zoomed its creating a temp image and lets say the form gets closed or after you print the image it kills/deletes the temp and you don't even mess with the original.
 

oxicottin

Learning by pecking away....
Local time
Today, 13:02
Joined
Jun 26, 2007
Messages
851

In this example v2, when you click on the image to open the zoom form It creates a copy of the image in the image folder with a last name .Zoomed.jpg. This is so we can enlarge the image to print it (Which I haven't figured out) then on the zoomed forms unload it deletes the temp image so we don't even interfere with the original.

The question is how do I enlarge the image with each click of the enlarge/zoom button on the image and how can I get the images size (width and height) in a textbox on the form so I know how large it will print out?

Thanks,
 

Attachments

  • ImageExpand_v2.zip
    180.9 KB · Views: 152

June7

AWF VIP
Local time
Today, 09:02
Joined
Mar 9, 2014
Messages
5,423
Consider code at end of mdEnlargeJobStep_Click()

Debug.Print "Height: " & currHeight & " | Width: " & currWidth

Instead of Debug.Print you can set variables or populate textboxes.
 

oxicottin

Learning by pecking away....
Local time
Today, 13:02
Joined
Jun 26, 2007
Messages
851
Wouldn't that just show the size of the form? Also what is that in I would need pixels

Height: 8874 | Width: 6936
 

June7

AWF VIP
Local time
Today, 09:02
Joined
Mar 9, 2014
Messages
5,423
I think it is TWIPS. DB has functions to convert pixels to TWIPS as well as reverse. The code to enlarge uses ConvertPixelsToTwips so probably just need to use other function.
 
Last edited:

oxicottin

Learning by pecking away....
Local time
Today, 13:02
Joined
Jun 26, 2007
Messages
851
I got it working ill upload a working copy tomorrow after I clean it up.... The only thing I cant get working is when I print it still prints the original image.
 

June7

AWF VIP
Local time
Today, 09:02
Joined
Mar 9, 2014
Messages
5,423
I am not getting a saved imaged named zoomed.jpg. Code just opens printer dialog to select destination printer. I printed to PDF and it doesn't matter how enlarged the form is, all outputs are the same size.
 

oxicottin

Learning by pecking away....
Local time
Today, 13:02
Joined
Jun 26, 2007
Messages
851
I am not getting a saved imaged named zoomed.jpg. Code just opens printer dialog to select destination printer. I printed to PDF and it doesn't matter how enlarged the form is, all outputs are the same size.

that image get created in the images folder with the other images and when you close the popup form it deletes it. I think I might have fixed the issue with not printing the correct image. I think (haven't tested have no printer to waste paper at home :)) What it was doing was grabbing the original image size from Form1 instead of using the path on the popup form that changes.

anyways, im off so Ill check it out better tomorrow but I think its OK. Any idea on how to retrieve the file size using WIA? I cant find any info on that and wanted to add it to the mod_GetImageInformation module.
 

Attachments

  • ImageExpand_v3.zip
    193.8 KB · Views: 134

abdo20

New member
Local time
Today, 19:02
Joined
Jul 15, 2020
Messages
10
Hello, my name is Abdel Alim Arabi
Please understand what I want. I liked this example and thank the example from ImageExpand_v3 who worked on it, but is it possible to have a simple example? I want to divide the images in each folder with a name similar to the example attached to the name abdo1 Is this possible
How many other requests indicate a saved folder?
Photos divided into folders for access

1603993229240.png
 

Attachments

  • ImageExpand_v3a.zip
    1 MB · Views: 130
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 10:02
Joined
Oct 29, 2018
Messages
21,358
مرحبا اسمي عبد العليم عربي
يرجى فهم ما أريد. أعجبني هذا المثال و وأشكر المثال من عمل عليه ImageExpand_v3 ، لكن هل من الممكن الحصول على مثال بسيط؟ اريد تقسيم الصور في كل مجلد باسم مشابه لمثال مرفق بالاسم abdo1 هل هذا ممكن
كم عدد الطلبات الأخرى التي تشير إلى وجود مجلد محفوظ؟
صور مقسمة إلى مجلدات للوصول
Hi @abdo20. Welcome to AWF!

I just translated your post using Bing to help others help you.
Hello, my name is Abdel Alim Arabi.
Please understand what I want. I like this example and I thank the example of who worked on it ImageExpand_v3, but is it possible to get a simple example? I want to divide the images in each folder with a name similar to an example attached to the name abdo1 is this possible
How many other requests indicate a saved folder?
 

June7

AWF VIP
Local time
Today, 09:02
Joined
Mar 9, 2014
Messages
5,423
@oxicottin, don't see way to get file size from WIA. Use FSO. https://docs.microsoft.com/en-us/of...ce-help/size-property-filesystemobject-object
Code:
Sub ShowFolderSize(filespec)
    Dim fs, f, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFolder(filespec)
    s = UCase(f.Name) & " uses " & f.size & " bytes."
    MsgBox s, 0, "Folder Size Info"
End Sub
@abdo20, you should start your own thread instead of hijacking existing. Post your question in English. Not clear to me what you mean by "divide images".
 

abdo20

New member
Local time
Today, 19:02
Joined
Jul 15, 2020
Messages
10
Sorry, I can't speak english, use google translate
I mean by dividing pictures, i.e. putting each name in a folder with the name of its pictures, any groups
I am working on an inbound and outbound archiving program
 

Attachments

  • Screenshot_2.png
    Screenshot_2.png
    54.2 KB · Views: 92

Users who are viewing this thread

Top Bottom