Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bitmap
Message
De
24/07/2003 09:54:55
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Bitmap
Divers
Thread ID:
00813078
Message ID:
00813078
Vues:
42
Hello everybody. I am creating a richtext toolbar. When adding the images to the toolbar, I get an out of memory error. This happens on just the third image. The files are only 1KB a piece in size. I am sure there is a way this can be done and would appreciate any help you can give. Thanks and have a great day. Below is the code I use to load the bitmap. I have also tried the code without the btm.Dispose().

' Load Images
Dim imglstRichText As ImageList = New ImageList()
Dim img As Image
Dim btm As Bitmap

btm = img.FromFile(strDefaultPath & "bold.gif")
imglstRichText.Images.Add(btm)
btm.Dispose()

btm = img.FromFile(strDefaultPath & "italic.gif")
imglstRichText.Images.Add(btm)
btm.Dispose()

btm = img.FromFile(strDefaultPath & "underline.gif")
imglstRichText.Images.Add(btm)
btm.Dispose()

Me.tlbBIU.ImageList = imglstRichText
Me.btnBold.ImageIndex = 0
Me.btnItalics.ImageIndex = 1
Me.btnUnderLine.ImageIndex = 2

imglstRichText = Nothing
Randy Belcher
AFG Industries, Inc.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform