Visual Basic.NET - Ayuda con Threads

 
Vista:

Ayuda con Threads

Publicado por HAF (178 intervenciones) el 23/10/2006 21:25:51
Hola amigos del foro:

En un formulario tengo un picturebox (gif animado)* en picturebox1.visible=false y deseo que cuando efectúe un proceso en el formulario le digo picturebox1.visible=true la cual lo programo dentro de un trhead y me da el siguiente error:

excepción no controlada del tipo 'System.OutOfMemoryException' en system.drawing.dll

Información adicional: Memoria insuficiente.

¿Que puedo Hacer?

El código es el siguiente :

Imports System.Drawing
Imports System.Threading

Inherits System.Windows.Forms.Form
Private trd As Thread

Private Sub presentagif()
Me.PictureBox1.Visible = True
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
trd = New Thread(AddressOf presentagif)
trd.Start()
End Sub

NOTA : * El .GIF es una imagen en movimiento transfiriendo archivos.
Le he quitado el imports del system.drawing y sigue el error
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder