473,231 Members | 1,796 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,231 software developers and data experts.

strange problem....

Hi there,
I am using Visual Studio 2003 and trying to write an windows
application in C#. Whenever i run my program , it runs normally and i
close it. Sometime later, i try to run the program with Ctrl+F5 and i
get following errors
i)-Could cope temporary files to the output directory.
ii)-The file 'TestApp.exe' can't be copied to the run directory. The
process can't access the file because it is being used by another
process.
iii)-The file 'TestApp.pdb' can't be copied to the run directory. The
process can't access the file because it is being used by anopther
process.

Now open my Windows Task Manager, and goto the process and i find
'TestApp.exe' in the process and i close it from there and then try to
run my applicatoin and it runs. However next time i run my application
i get same errors and i goto Task Manager and goto the process and
delete it from there and then run the application. I have been moving
in this loop for all day along. Is there a way around? What i am doing
wrong?
Please enlighten me...
-Erland

Nov 28 '05 #1
3 971
Erland wrote:
Hi there,
I am using Visual Studio 2003 and trying to write an windows
application in C#. Whenever i run my program , it runs normally and i
close it. Sometime later, i try to run the program with Ctrl+F5 and i
get following errors

<snip>

Do you have threads in your application which isn't marked as background
threads?

--
Lasse Vågsæther Karlsen
http://usinglvkblog.blogspot.com/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2
Nov 28 '05 #2
Nops im not using threads.
However, im creating a new form over a button in another form by using
following

this.Hide();
newform =new Form2();
newform.Show();
Thanks.

Nov 28 '05 #3
Erland wrote:
Nops im not using threads.
However, im creating a new form over a button in another form by using
following

this.Hide();
newform =new Form2();
newform.Show();
Thanks.


Ah, it's only when you close the "main form" that the program closes. If
you haven't found it by now, try adding an event handler on the Form2
that also closes the main form, something like this (before the .Show()
call):

newform.FormClosed += new FormClosedEventHandler(ChildFormClosed);

....

void ChildFormClosed(object sender, FormClosedEventArgs e)
{
Close();
}
--
Lasse Vågsæther Karlsen
http://usinglvkblog.blogspot.com/
mailto:la***@vkarlsen.no
PGP KeyID: 0x2A42A1C2
Nov 28 '05 #4

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

Similar topics

5
by: Rob Ristroph | last post by:
Hi, It's pretty unhelpful to post "I have a huge piece of code that crashes in strange places, what's the problem?" but that's basically my problem and I really am at my wit's end. The piece...
2
by: Paul Drummond | last post by:
Hi all, I am developing software for Linux Redhat9 and I have noticed some very strange behaviour when throwing exceptions within a shared library. All our exceptions are derived from...
25
by: Neil Ginsberg | last post by:
I have a strange situation with my Access 2000 database. I have code in the database which has worked fine for years, and now all of a sudden doesn't work fine on one or two of my client's...
2
by: TB | last post by:
I am seeing a very strange problem as follows... I have a loop where a fair amount of processing is going on and near the top of the loop I access a class that has only static helper functions...
1
by: Sam Kong | last post by:
Hello! Recently I had a strange problem with Visual C# 2005 beta 1. When I ran(F5 key) a program, <#if DEBUG> statement was not working. It ran as RELEASE mode. So I had to manually define...
8
by: Spam Trap | last post by:
I am getting strange resizing problems when using an inherited form. Controls are moving themselves seemingly randomly, but reproducibly. "frmBase" is my base class (a windows form), and...
11
by: Martin Joergensen | last post by:
Hi, I've encountered a really, *really*, REALLY strange error :-) I have a for-loop and after 8 runs I get strange results...... I mean: A really strange result.... I'm calculating...
12
by: StephQ | last post by:
I have a class Bounds with two constructors: class Bounds { private: list<SegmentupperLinearSpline; // Upper bound. list<SegmentlowerLinearSpline; // Lower bound. ....
8
by: Dox33 | last post by:
I ran into a very strange behaviour of raw_input(). I hope somebody can tell me how to fix this. (Or is this a problem in the python source?) I will explain the problem by using 3 examples....
5
by: ioni | last post by:
Good day, fellows! I have a strange problem – at my site there is a flash strip, that loads data dynamically. It works fine (grabs data from the remote server and presents it), however in IE7...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.