473,778 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The object is currently in use elsewhere

Building and running a VB or C# graphics application within VisStudio is fine.
Running the .exe outside VisStudio on the same machine is fine.
But trying to run the .exe on another machine produces this error.

Anyone have any clues?
Jul 21 '05 #1
4 1901
any idea what object it is talking about? Do you have try-catch blocks that
identify the location in the code, or which log themselves, so that you can
figure out where the error is occuring?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"KevinBradl y" <Ke*********@di scussions.micro soft.com> wrote in message
news:9A******** *************** ***********@mic rosoft.com...
Building and running a VB or C# graphics application within VisStudio is
fine.
Running the .exe outside VisStudio on the same machine is fine.
But trying to run the .exe on another machine produces this error.

Anyone have any clues?

Jul 21 '05 #2
Not really and I don't have any try-catch blocks.
I have since discovered the following though:

When we install our software on a development machine, we add some DLL's
into the GAC. If I add the same DLL's into the GAC on the machine I am
trying to run the app. on (it happens to be running XP-Pro and has .NET
installed), all is now OK.
So, what do I do on machines that don't have .NET or the FrameworkSDK
installed?

Kevin

"Nick Malik [Microsoft]" wrote:
any idea what object it is talking about? Do you have try-catch blocks that
identify the location in the code, or which log themselves, so that you can
figure out where the error is occuring?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"KevinBradl y" <Ke*********@di scussions.micro soft.com> wrote in message
news:9A******** *************** ***********@mic rosoft.com...
Building and running a VB or C# graphics application within VisStudio is
fine.
Running the .exe outside VisStudio on the same machine is fine.
But trying to run the .exe on another machine produces this error.

Anyone have any clues?


Jul 21 '05 #3
If your app requires a dll, it has to be on the target machine. You can
make a setup kit for your app that will install the dll for you. It often
doesn't need to be in the GAC. (depends on the app... most apps don't need
the dlls to be in the GAC).

You will ALWAYS require the .Net framework. You shouldn't need the SDK.

Oh, and use try - catch blocks.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"KevinBradl y" <Ke*********@di scussions.micro soft.com> wrote in message
news:CE******** *************** ***********@mic rosoft.com...
Not really and I don't have any try-catch blocks.
I have since discovered the following though:

When we install our software on a development machine, we add some DLL's
into the GAC. If I add the same DLL's into the GAC on the machine I am
trying to run the app. on (it happens to be running XP-Pro and has .NET
installed), all is now OK.
So, what do I do on machines that don't have .NET or the FrameworkSDK
installed?

Kevin

"Nick Malik [Microsoft]" wrote:
any idea what object it is talking about? Do you have try-catch blocks
that
identify the location in the code, or which log themselves, so that you
can
figure out where the error is occuring?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"KevinBradl y" <Ke*********@di scussions.micro soft.com> wrote in message
news:9A******** *************** ***********@mic rosoft.com...
> Building and running a VB or C# graphics application within VisStudio
> is
> fine.
> Running the .exe outside VisStudio on the same machine is fine.
> But trying to run the .exe on another machine produces this error.
>
> Anyone have any clues?


Jul 21 '05 #4
Thanks for your help Nick.
I'll look into making a setup kit that can install the DLL's, or
alternatively look into changing our app so that the DLL's don't have to be
GAC'ed. Any hints or links to reading material on that?

Kevin

"Nick Malik [Microsoft]" wrote:
If your app requires a dll, it has to be on the target machine. You can
make a setup kit for your app that will install the dll for you. It often
doesn't need to be in the GAC. (depends on the app... most apps don't need
the dlls to be in the GAC).

You will ALWAYS require the .Net framework. You shouldn't need the SDK.

Oh, and use try - catch blocks.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"KevinBradl y" <Ke*********@di scussions.micro soft.com> wrote in message
news:CE******** *************** ***********@mic rosoft.com...
Not really and I don't have any try-catch blocks.
I have since discovered the following though:

When we install our software on a development machine, we add some DLL's
into the GAC. If I add the same DLL's into the GAC on the machine I am
trying to run the app. on (it happens to be running XP-Pro and has .NET
installed), all is now OK.
So, what do I do on machines that don't have .NET or the FrameworkSDK
installed?

Kevin

"Nick Malik [Microsoft]" wrote:
any idea what object it is talking about? Do you have try-catch blocks
that
identify the location in the code, or which log themselves, so that you
can
figure out where the error is occuring?

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"KevinBradl y" <Ke*********@di scussions.micro soft.com> wrote in message
news:9A******** *************** ***********@mic rosoft.com...
> Building and running a VB or C# graphics application within VisStudio
> is
> fine.
> Running the .exe outside VisStudio on the same machine is fine.
> But trying to run the .exe on another machine produces this error.
>
> Anyone have any clues?


Jul 21 '05 #5

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

Similar topics

9
11109
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
5021
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...
0
2182
by: Sam Barham | last post by:
I have a ListView control, for which I have overwritten the WndProc method to gain access to the WM_PAINT message and generate my own OnPaint and OnPaintBackground messages, in order to colour the columns of the listview to my liking. When a row of the listview is selected, some controls are displayed on that row of the listview (so sort of like a property list thingy). In order to get the controls (specifically buttons) to display how I...
1
3235
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:
1
2409
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...
4
10366
by: Jos Lavrijsen | last post by:
When i try to re-use brushes or pens over multiple threads, i often get an InvalidOperationException with the message 'object is currently in use elsewhere'. I also tried this by re-using fonts but no problems there. So, it looks like brushes and pens cannot be used in different threads simultaneously. Looks like a dotnet bug to me. This exception is easily reproducible with the following code, both on single
4
5709
by: JJ | last post by:
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)
4
7793
by: Mau Kae Horng | last post by:
Hello, I have a C# Windows Forms application for machine. Due to some unknown reasons, the application face problems with unexpected exceptions happening, resulting in two red lines forming a red cross across a certain control (the entire form, labels and so on). I get the following message in MessageBox.
4
2294
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
2329
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
9628
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...
1
10061
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,...
0
8954
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7471
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
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5368
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5497
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
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
3
2860
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.