Solved

Wang Thumbnail Control

Posted on 2000-02-21
11
642 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
[X]
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
  • 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

732 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