473,657 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Urgent help required: The object is currently in use elsewhere

JJ
When I run my form prog, if I maximise, then minimise (i..i. force the GUI
to redraw) I get the following error:

"The object is currently in use elsewhere"

At this line:

e.Graphics.Draw String(MenuText .Substring(0, 1), underLinedFont, FontBrush,
textLayoutRecta ngle, sf)

(An ownerdraw menu)

This only happens when I have Microsoft Word open in the background and have
a graphic placed in the word document.

I have just reinstalled all Visual Studio and Sourcesafe and I still cannot
get rid of the error.

What have I done wrong?

Mar 13 '06 #1
4 5705
JJ
I should add that this problem arose after I replaced the hard disk on my PC
and reinstalled the OS etc.
I can still boot to the old disk and the forms app runs fine there.

Even if I copy that exact version of the program to my new disk, boot from
that disk and run it, the problem wtill occurrs.

I've tried deleting then adding all me references. What on earth could be
wrong here?

Please help if you can
"JJ" <ab*@xyz.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
When I run my form prog, if I maximise, then minimise (i..i. force the GUI
to redraw) I get the following error:

"The object is currently in use elsewhere"

At this line:

e.Graphics.Draw String(MenuText .Substring(0, 1), underLinedFont, FontBrush,
textLayoutRecta ngle, sf)

(An ownerdraw menu)

This only happens when I have Microsoft Word open in the background and
have a graphic placed in the word document.

I have just reinstalled all Visual Studio and Sourcesafe and I still
cannot get rid of the error.

What have I done wrong?

Mar 13 '06 #2
JJ
Weird. I got rid of a dispose a few lines later and all seems well:

underLinedFont. Dispose()

Why this made a difference when I'd replaced my hard disk I do not know.
Hopefully not disposing of this font won't cause any memory/recource
problems.


"JJ" <ab*@xyz.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
When I run my form prog, if I maximise, then minimise (i..i. force the GUI
to redraw) I get the following error:

"The object is currently in use elsewhere"

At this line:

e.Graphics.Draw String(MenuText .Substring(0, 1), underLinedFont, FontBrush,
textLayoutRecta ngle, sf)

(An ownerdraw menu)

This only happens when I have Microsoft Word open in the background and
have a graphic placed in the word document.

I have just reinstalled all Visual Studio and Sourcesafe and I still
cannot get rid of the error.

What have I done wrong?

Mar 13 '06 #3
JJ
No it didn't - error is still there.

Anyone come across this?
"JJ" <ab*@xyz.com> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Weird. I got rid of a dispose a few lines later and all seems well:

underLinedFont. Dispose()

Why this made a difference when I'd replaced my hard disk I do not know.
Hopefully not disposing of this font won't cause any memory/recource
problems.


"JJ" <ab*@xyz.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
When I run my form prog, if I maximise, then minimise (i..i. force the
GUI to redraw) I get the following error:

"The object is currently in use elsewhere"

At this line:

e.Graphics.Draw String(MenuText .Substring(0, 1), underLinedFont,
FontBrush, textLayoutRecta ngle, sf)

(An ownerdraw menu)

This only happens when I have Microsoft Word open in the background and
have a graphic placed in the word document.

I have just reinstalled all Visual Studio and Sourcesafe and I still
cannot get rid of the error.

What have I done wrong?


Mar 13 '06 #4
JJ
For anyone else experiencing this problem:

Description:
Upon reinstalling your OS, your Visual Studio forms application crashes
itself (even in debugging mode), or crashes other programs displaying
graphics, when refreshing, and in particular when carrying out drawstring
commands. You may get the error "The object is currently in use elsewhere"
when carrying out Drawstring commands.

Solution:
Update your graphics drivers!!

I am using an ATi Radeon X850 XT. The driver that caused the faults was
version 6.14.10.6525 released 29/3/2005. This version is still being
supplied by Dell, as far as I know, as this is where I got it.
Renew it for the latest version on ATi's web site. I am now using version
8.231.0.0, released 21/02/2006 and all errors have gone.

To Reiterate:
This is not a problem with Visual Studio, Sourcesafe, Net framework 1.1, but
appears to be a fault with the older ATI video driver.
I will continue to test, but at the moment all is looking good.

Hope this helps someone.

J

"JJ" <ab*@xyz.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
When I run my form prog, if I maximise, then minimise (i..i. force the GUI
to redraw) I get the following error:

"The object is currently in use elsewhere"

At this line:

e.Graphics.Draw String(MenuText .Substring(0, 1), underLinedFont, FontBrush,
textLayoutRecta ngle, sf)

(An ownerdraw menu)

This only happens when I have Microsoft Word open in the background and
have a graphic placed in the word document.

I have just reinstalled all Visual Studio and Sourcesafe and I still
cannot get rid of the error.

What have I done wrong?

Mar 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4935
by: Doolittle | last post by:
Hi, I'm a relatively new VBA programmer but have been given the task of repairing a database that currently appears with "3146 ODBC--call failed." This happens when various criteria are input into a form (called InvCredit), and then cmdProcess is clicked. Then we are asked if we can "Confirm you want to process?" and when Yes is clicked the error appears. Following is the code. I have found that the break appears at the .Update point...
9
11099
by: talljames | last post by:
Has anyone come across this exception before when dealing with C# graphics? Have come across some answers that point to the accelleration control under the screen's properties/settings/advanced/troubleshooting. ie the graphics driver. Other answers include disposing, revalidate. Any suggestions would be appreciated.
4
5016
by: 6tc1 | last post by:
Hi all, I have just finished debugging a windows application and have solved the problem - however, I want to be sure that I understand the problem before I move on. Before I detail the problem, this problem requires some understanding of threading concepts. Basically, the class contained both a PictureBox object as well as a corresponding Image object (they both had a copy of the same picture). The following was used to access the...
1
3222
by: Hadar | last post by:
Hi, I'm getting "object is currently in use elsewhere" when I use System.Drawing.Graphics.MesureString. This is what I do: My controls use a utility class the helps it to mesure strings. To get the best performance for the utility class, its members, as well as the System.Drawing.Graphics object, are static:
16
2927
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In: http://www.mywebsite.org/WebResource.axd?d=5WvLfhnJp5Lc8WhQSD4gdA2&t=632614619884218750 -------------------------------------------------------------------------------- System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed. at...
1
2400
by: kCura | last post by:
First off, I'm sorry if this isn't the write thread to post this message but I couldn't find one dedicated to System.Drawing. I'm developing an intranet application in VB.NET that uses a Hosted Windows Form (HWF) dedicated to image manipulation. This HWF is also supposed to allow the user to print an image to their default printer. I'm using a System.Drawing.Printing.PrintDocument object to initiate printing, and everything works locally...
77
3851
by: Hans Schneider | last post by:
1. in the prg bellow what vars are stored on stack, heap, data segment? int i; void main() { int j; int *k = (void *)malloc(1); }
4
2286
by: =?Utf-8?B?Qm9uaQ==?= | last post by:
Hi, I got this problem. I'm implementing a pluggable winform program. My plugins are usercontrol and I load them in my program through a interface. Now if I close my application an error occurs: "Object is currently in use elsewhere". If I comment the line where a I use the Activator.CreateInstance it doesn't happen. I tried to disposed the object created but nothing but If I do a simple new of my object without using reflection it...
0
2320
by: para15000 | last post by:
Hello I have a C# desktop application in which one thread that I create continously gets an image from a source(it's a digital camera actually) and puts it on a panel(panel.Image = img) in the GUI(which must be another thread as it is the code-behind of a control. The application works but on some machines I get the following error at random time
0
8395
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6166
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.