Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Wang Thumbnail Control

Posted on 2000-02-21
11
Medium Priority
?
658 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 4

Accepted Solution

by:
wqw earned 800 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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 …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Suggested Courses

916 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