Solved

Wang Thumbnail Control

Posted on 2000-02-21
11
639 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: 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

Suggested Solutions

Title # Comments Views Activity
vb6 connector to mongodb 2 139
SLMGR Switches Are Not Working On KMS Host 3 139
Spell Check in VB6 13 135
Using an encrypted  value to decrypt and display contents in vb6 9 60
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

735 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