Okay first off all Hi! all.
Okay My question is how can i create for example a Progressbar from a Image Pattern.
I know that you can't yet understand what i mean as my english is pretty poor but let me try to explain
for example i don't not load big progressbar images into my application to create a progressbar so i want use this little image here
(http://img202.imageshack.us/img202/2544/loadingj.png)
and set it's length but i don't want to lose quality of the image by streching it so how is it possible to copy and past it over and over again until i get my disired length.
I hope i understand what i mean to say thx for any help
First Save the picture as .bmp (if you like 1 pixels Width) then...
put in the form one picturebox and one HScroll1
Option Explicit
Dim oPicProgress As StdPicture
Private Sub Form_Load()
Set oPicProgress = LoadPicture("C:\cache.bmp")
Picture1.Height = ScaleY(oPicProgress.Height, vbHimetric, vbTwips)
Picture1.AutoRedraw = True
HScroll1.Max = 100
End Sub
Private Sub RenderProgress(ByVal lPercent As Long)
Picture1.Cls
If lPercent = 0 Then Exit Sub
Picture1.PaintPicture oPicProgress, 0, 0, Picture1.ScaleWidth * lPercent / 100
Picture1.Refresh
End Sub
Private Sub HScroll1_Scroll()
RenderProgress HScroll1.Value
End Sub
[code]
Saludos.
[/code]
Hey thank you a lot Leandro one more question how would have this done using API as i know your really good at GDI.
Thanks a lot again