473,499 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GDI+ Error... Need Help...

1 New Member
Alright, I'm working on a project for class that I need to use both .gifs and .wavs. I've gotten the .wavs to work, but some of the gifs bring up a GDI+ error when I run the program. Here's the error message...

An unhandled exception of type 'System.Runtime.InteropServices.ExternalException' occurred in system.windows.forms.dll

Additional information: A generic error occurred in GDI+.


Here's a part of the code that's giving me a problem.

Private Sub lblThirstMagic_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lblThirstMagic.Click

' This plays an audio clip and changes the picturebox to the proper .GIF.
' Audio Clip Used: ThirstMagic.wav
' Animation Used: ThirstMagicAnim.gif

gintCurrentLength = 3
gstrCurrentAnim = "ThirstMagic"

tmrStopAnimation.Enabled = True

wmPlayer.URL = "ThirstMagic.wav"
pbxAnimation.Image = System.Drawing.Image.FromFile("ThirstMagicAnim.gif ")

End Sub


I know the line that's giving me trouble; it's the pbxAnimation part. The problem is, I don't know WHY it's doing it. Any help would be GREATLY appreciated. I'm running on VB.NET 2003.
Apr 12 '07 #1
0 933

Sign in to post your reply or Sign up for a free account.

Similar topics

4
48181
by: Michael Kennedy [UB] | last post by:
Hi Everyone, I have this multithreaded C# windows forms application which does a lot of image processing. Occasionally, I get the following error: A generic error occurred in GDI+....
5
2676
by: Pohihihi | last post by:
I am getting a generic GDI+ error on following code. Basically it is trying to capture screen image and save in a file. Is there a way to find more details on this error? Thanks for the help. ...
7
2928
by: | last post by:
We create VC++ programs that does some GDI drawing functionality. I discovered GDI+ and this seems to be a big step forward, and appears to be standard available in Windows XP and Windows Server...
2
22278
by: Alphonse Giambrone | last post by:
I am currently reading 'Programming The Web with Visual Basic .NET' and have so far found it to be excellent. Downloaded all the code from Apress and working in chapter 4, I get the error shown...
10
1611
by: Jim Hubbard | last post by:
Can you use VB.Net to set a system-wide hook to intercept all GDI calls from GDI to the system's hardware? I want to intercept all GDI instructions sent to the system's hardware layer. As I...
13
4628
by: lgbjr | last post by:
Hello All, I have some pictureboxes on a VB.NET form that are linked to an AccessDB. If the user wishes to open or edit an image, I need to save the image in the picturebox to a temp file, then...
15
5298
by: David Lozzi | last post by:
Howdy, I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders! Now I am making a public function that will take the...
0
3930
by: Robin van de Water [synthesiSFactory] | last post by:
Hi All, In one of my web applications, I intercepted the following error in the Application_Error part of the Global.Asax: GDI+ is not properly initialized (internal GDI+ error). The error...
14
4091
by: James Wong | last post by:
Hi everybody, I'm facing a serious trouble relating to GDI+ generic error. The error message is "A Generic error occured in GDI+" and the following information is stored in Excepton object:...
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5468
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.