473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.DrawString(MenuText.Substring(0, 1), underLinedFont, FontBrush,
textLayoutRectangle, 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 5690
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****************@TK2MSFTNGP14.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.DrawString(MenuText.Substring(0, 1), underLinedFont, FontBrush,
textLayoutRectangle, 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****************@TK2MSFTNGP14.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.DrawString(MenuText.Substring(0, 1), underLinedFont, FontBrush,
textLayoutRectangle, 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****************@TK2MSFTNGP09.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****************@TK2MSFTNGP14.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.DrawString(MenuText.Substring(0, 1), underLinedFont,
FontBrush, textLayoutRectangle, 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****************@TK2MSFTNGP14.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.DrawString(MenuText.Substring(0, 1), underLinedFont, FontBrush,
textLayoutRectangle, 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
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...
9
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...
4
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,...
1
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...
16
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:...
1
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...
77
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
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:...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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
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...

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.