Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bitmap
Message
From
24/07/2003 09:54:55
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Bitmap
Miscellaneous
Thread ID:
00813078
Message ID:
00813078
Views:
41
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.
Next
Reply
Map
View

Click here to load this message in the networking platform