Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Wang Thumbnail Control

Posted on 2000-02-21
11
634 Views
Last Modified: 2011-09-20
I'm new in VB so please bear with me.
How can I populate Wang THumbnail Control? I can't seem to find the right PEM for it.

Thanks,
T50105
0
Comment
Question by:T50105
  • 3
  • 3
  • 3
  • +2
11 Comments
 
LVL 1

Expert Comment

by:georgeman
ID: 2543899
Just add Wang Thumbnail OCX control in your project from Project/Components/Wang Image Thumbnail Control

add line in form_load event:
ImgThumbnail1.Image = "C:\My.tif"
 and will all pages of my.tif file if it multiple page.

Good luck
George
0
 

Expert Comment

by:Geo24
ID: 2543935
0
 

Author Comment

by:T50105
ID: 2546058
I already have similar line in form load like:
thumbnail1.image = "vtools.bmp".
It works for that image but I have more than one image to display, How can I populate with more images in one page?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 4

Accepted Solution

by:
wqw earned 200 total points
ID: 2547585
Use Control Array. In your form select Wang Control and find property Index. Type 0. Set Visible to false.

Sub Form_Load()
    Dim i as long, aNames() as String
    'populate aNames e.g. Dir("*.bmp")
    For i = 0 to 25
        Load WangControl(i+1)
        With WangControl(i+1)
            .Move 500*Fix(i/5), 500*(i Mod 5)
            .Image = aImages(i)
            .Visible = True
        End With
    Next
End Sub

This way you get 25 images on your form. Experiment further with placement, etc!

</wqw>
0
 
LVL 4

Expert Comment

by:wqw
ID: 2547590
ooops,
shoud be:

            .Move 500*Fix(i/5), 500*(i Mod 5), 500, 500

to resize it properly

</wqw>
0
 
LVL 4

Expert Comment

by:wqw
ID: 2547632
ooops,
shoud be:

            .Move 500*Fix(i/5), 500*(i Mod 5), 500, 500

to resize it properly

</wqw>
0
 
LVL 1

Expert Comment

by:georgeman
ID: 2548054
T50105
I tested this code.
Just create new project, add form1, add ImgEdit1, ImgAdmin1, ImgThumbnail1, Command1 controls, place code below in Command1_Click event.
You can populate so many different type of images in Thumbnail control as you need.
Good luck
George

Private Sub Command1_Click()
'
'Load first image
 ImgEdit1.Image = App.Path & "\beany.bmp"
 ImgEdit1.Display
 
'Save 1st image as tiff file so it can be used for multiple image storage
 ImgEdit1.SaveAs App.Path & "\beany.tif", 1

'open saved tiff file
 ImgAdmin1.Image = App.Path & "\beany.tif"
 
'add new image
 ImgAdmin1.Insert App.Path & "\bell.bmp", 1, 1, 1

'add new image how many you need
 ImgAdmin1.Insert App.Path & "\balloon.bmp", 1, 1, 1
' ImgAdmin1.Insert App.Path & "\new1.bmp", 1, 1, 1
' ImgAdmin1.Insert App.Path & "\new2.bmp", 1, 1, 1
' etc.

'show multiple image in thumbnails control
 ImgThumbnail1.Image = ImgAdmin1.Image
'
End Sub


0
 

Author Comment

by:T50105
ID: 2554350
Adjusted points to 200
0
 

Author Comment

by:T50105
ID: 2554351
georgeman.
Thank you for your time.
0
 

Expert Comment

by:GETTYD
ID: 2634240
Georgeman got it right!

You can only show about 40 thumbnails using wqw's method before you run out of memory on a 400MHz, 64Mb machine.

(wqw's method is much faster though, for only a few images)

Any response?
0
 
LVL 1

Expert Comment

by:georgeman
ID: 2634266
Thanks GETTYD
You are exactly right
Regards
George
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

861 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