Thumbnail component

(where's everyone been?)

Page 1 of 1

7 Replies - 6267 Views - Last Post: 29 June 2002 - 01:30 PM Rate Topic: -----

#1 WebDevTool  Icon User is offline


Reputation: 0
  • View blog
  • Posts: -8,388,608
  • Joined: 27-February 02

Thumbnail component

Posted 22 April 2002 - 09:14 AM

I was GOING to ask if anyone knew how to make thumbs in vb, but this board is DEAD!!! Guess I'll go wander aimlessly around the coffee lounge...
Is This A Good Question/Topic? 0
  • +

Replies To: Thumbnail component

#2 MarkoDaGeek  Icon User is offline

  • Dirty Technophile
  • member icon

Reputation: 11
  • View blog
  • Posts: 11,158
  • Joined: 13-October 01

Re: Thumbnail component

Posted 22 April 2002 - 09:49 AM

the boards are ushally dead tillthe evening , then ive seen it avrage about 1 post per 30 seconds , everyone is at work , school ect right now ....
Was This Post Helpful? 0
  • +
  • -

#3 WebDevTool  Icon User is offline


Reputation: 0
  • View blog
  • Posts: -8,388,608
  • Joined: 27-February 02

Re: Thumbnail component

Posted 22 April 2002 - 01:00 PM

Nah, I didn't mean the WHOLE DIC forum, just the VB board... seems no one's been in here in a while...
Was This Post Helpful? 0
  • +
  • -

#4 IndieGuru  Icon User is offline

  • D.I.C Regular

Reputation: 0
  • View blog
  • Posts: 349
  • Joined: 25-March 02

Re: Thumbnail component

Posted 22 April 2002 - 01:31 PM

For real.  When the #### is anyone going to answer my problem?
Was This Post Helpful? 0
  • +
  • -

#5 xilica  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 28-May 02

Re: Thumbnail component

Posted 29 May 2002 - 07:19 AM

When you mean Thumbnail do you mean ClipBoard. Both of those are the copy and paste commands. You might want to try searching google.com for help using it.
Was This Post Helpful? 0
  • +
  • -

#6 DestroyerOfWorlds  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 55
  • Joined: 11-October 01

Re: Thumbnail component

Posted 18 June 2002 - 01:39 AM

yes what exactly do you mean by thumbs in VB, do you mean like thumbnailed pictures like in explorer?
Was This Post Helpful? 0
  • +
  • -

#7 Techni  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 29-June 02

Re: Thumbnail component

Posted 29 June 2002 - 01:26 PM

This handles the filesize error, but not invalid images. I save this code into a module

Option Explicit
Public imgsize As String
Const meglimit = 2

Public Function thumbnail(filename As String, width As Integer, height As Integer, destination As PictureBox)
destination.Cls
'Const ratio As Double = 26.4516129032258
If filename <> Empty Then
If FileLen(filename) < 1048576 * meglimit Then
Const ratio = 26.4516129032258
Dim picwidth As Integer
Dim picheight As Integer
picwidth = Round(LoadPicture(filename).width / ratio, 0) * 15
picheight = Round(LoadPicture(filename).height / ratio, 0) * 15
imgsize = picwidth / 15 & ", " & picheight / 15

Dim temp2 As Integer
If picwidth > width Then
temp2 = picwidth / width
picwidth = width
picheight = Round(picheight / temp2, 0)
End If
If picheight > height Then
picwidth = picwidth / (picheight / height)
picheight = picheight / (picheight / height)
End If
'MsgBox ("Before: (" & imgsize & "), After: (" & picwidth / 15 & ", " & picheight / 15 & ")")
destination.Cls
destination.PaintPicture LoadPicture(filename), width / 2 - picwidth / 2, height / 2 - picheight / 2, picwidth, picheight
DoEvents
thumbnail = 0
Else
thumbnail = 1
End If
End If
End Function
Was This Post Helpful? 0
  • +
  • -

#8 Techni  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 29-June 02

Re: Thumbnail component

Posted 29 June 2002 - 01:30 PM

oh, to make it work in pixels and not twips, remove the *15
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1