elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía actualizada para evitar que un ransomware ataque tu empresa


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  How to create Progressbar from Image Pattern
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: How to create Progressbar from Image Pattern  (Leído 1,808 veces)
Mi4night

Desconectado Desconectado

Mensajes: 12


The Art of Mind Fucking...


Ver Perfil
How to create Progressbar from Image Pattern
« en: 11 Agosto 2010, 20:03 pm »

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

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


En línea

LeandroA
Moderador
***
Desconectado Desconectado

Mensajes: 760


www.leandroascierto.com


Ver Perfil WWW
Re: How to create Progressbar from Image Pattern
« Respuesta #1 en: 12 Agosto 2010, 04:31 am »

First Save the picture as .bmp (if you like 1 pixels Width) then...

put in the form one picturebox and one HScroll1
Código
  1. Option Explicit
  2. Dim oPicProgress As StdPicture
  3.  
  4. Private Sub Form_Load()
  5.    Set oPicProgress = LoadPicture("C:\cache.bmp")
  6.    Picture1.Height = ScaleY(oPicProgress.Height, vbHimetric, vbTwips)
  7.    Picture1.AutoRedraw = True
  8.    HScroll1.Max = 100
  9. End Sub
  10.  
  11. Private Sub RenderProgress(ByVal lPercent As Long)
  12.    Picture1.Cls
  13.    If lPercent = 0 Then Exit Sub
  14.    Picture1.PaintPicture oPicProgress, 0, 0, Picture1.ScaleWidth * lPercent / 100
  15.    Picture1.Refresh
  16. End Sub
  17.  
  18. Private Sub HScroll1_Scroll()
  19.    RenderProgress HScroll1.Value
  20. End Sub
  21. [code]
  22.  
  23. Saludos.
[/code]


En línea

Mi4night

Desconectado Desconectado

Mensajes: 12


The Art of Mind Fucking...


Ver Perfil
Re: How to create Progressbar from Image Pattern
« Respuesta #2 en: 13 Agosto 2010, 00:25 am »

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
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Pattern Scanner
Programación C/C++
Karman 0 1,773 Último mensaje 6 Marzo 2011, 09:56 am
por Karman
OCR con pattern
.NET (C#, VB.NET, ASP)
arenoide 5 4,601 Último mensaje 18 Julio 2011, 13:35 pm
por arenoide
create threads en vb6
Programación Visual Basic
z_ane_666 1 2,932 Último mensaje 12 Diciembre 2011, 21:42 pm
por MCKSys Argentina
pattern html
Desarrollo Web
JS3 2 1,810 Último mensaje 23 Noviembre 2014, 17:54 pm
por JS3
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines