|
I have noticed furthermore the following: The first thread that gets halted by the debugger does not respond anymore. The remaining threads can be halted and executed stepwise. No problem. It is only the first time a thread gets halted, that this thread does not work anymore. As there seems to be no one with that problem (besides me), I assume that there must be a problem with the configuration of my machine.
I have two machines with VC#8 and both have this behaviour. On both machines is installed:
- Windows XP SP2
- VisualC++ 6 Enterprise
- VisualC# Express
- WindowsXP SP2 SDK
Do I have to be member of a special group (Windows User Group) for the debugger to work correctly?
Anyone any other idea???
|
|
|
|
|
Hi,
I have found the reason for this behaviour (although I think that it is a bug). The problem is the "Locals" window in the debugger. It shows the local variables of the current context and "this". And this is the problem. If I switch to the window "Überwachung" (maybe "Watch" in english?), the problem is not there. If I put "this" in the watch window, the problem is there again.
Summary: If we set a breakpoint in our application inside thread code and the "local" window is open when the thread reaches the breakpoint so that execution stops, the halted thread is dead from now on.
I am still wondering that no one else had this problem...
|
|
|
|
|
I created a table that the first column is "ID",Fname,Lname.
the "ID" is set to be primary.
when i am doing the insert command: "insert into table (Fname,Lname) values (y,t)"
i get and error that says that ID can not get NULL, i thought that it should be increased automatically.
the error:
Cannot insert the value NULL into column 'ID', table 'RTQ.dbo.Users'; column does not allow nulls. INSERT fails.
The statement has been terminated.
I do not want there NULL, i created it "int" so it could put nubers there.
what am i doing wrong???
Thanks
|
|
|
|
|
First this is the C# board and not the SQL board. Posting on the right board will get you answers faster.
What you need to do is have the ID field set up as an identity field so that it will increment automatically.
Steve Maier, MCSD MCAD
|
|
|
|
|
hi guys,
I have a picBox and a list of pictures. These pictures are displayed in ordered by 2 button ( previous and next ) in the picBox. When clicking buttonDelete, I want to delete the picture which is being displayed in picBox at present and then,another pic is displayed in picBox. But,if any pictures were displayed in the past, it couldn't be deleted. (error: ... because it is being used by another process.)
F1 - help me . thanks !!!
-- modified at 13:53 Monday 27th February, 2006
|
|
|
|
|
Hi!
How are you trying to delete the image displayed in the PictureBox ? To get an empty PictureBox you can simply assign null to the Image property.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
I only want to delete the picture displaying on PictureBox,and then the pictureBox will display next( or previous) picture in my list Picture.
-- modified at 21:26 Monday 27th February, 2006
|
|
|
|
|
Still not sure what you really want.
Are you trying to delete the file the picture has been loaded from or something else? Please be more clear.
And if you try something already and "it does not work", then the exact error message you get is essential for us to help you.
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
yes, i'm trying to delete the picture file has been loaded into PictureBox.
I think the picture that has been loaded into PictureBox is saved into a "temp" memory or something else,isn't it?
|
|
|
|
|
Ok, now that we know what your problem is, we can help you...
You have to make sure the image file isn't being used any more.
The most probable cause is that the image that has been assigned to the PictureBox hasn't been disposed of yet.
First, you'll have to make sure you don't let any old references hanging around when you load an image into your PictureBox. For example, when setting an image to display you could write
if (pictureBox1.Image != null)
{
pictureBox1.Image.Dispose();
pictureBox1.Image = null;
}
pictureBox1.Image = newImageToShow; That way, only the image currently shown in the PictureBox is used.
Before you can delete the file, you'll also have to remove any references, for example:
private void buttonDelete_Pressed(object sender, EventArgs e)
{
pictureBox1.Image.Dispose();
pictureBox1.Image = null;
File.Delete(pathToCurrentImage);
}
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
oh, pictureBox1.Image.Dispose(); thanks !
Then,can i ask you about form size?
I have an user control added into a form. I used the following code in both Form_load() and Form_SizeChanged but the usc size wasn't changed:
uscImage_NEW.UserControl1 usc=new uscImage_NEW.UserControl1();
private void Form1_SizeChanged(object sender, System.EventArgs e)
{
usc.Left=0;
usc.Top=0;
usc.Width=this.Width;
usc.Height=this.Height;
}
how to solve this problem?
|
|
|
|
|
Why don't you just anchor or dock the UC?
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
I did with another objects such as one button, one lable or anything else in another project... its size was changed. In usc project, i tried but the usc size was unchanged.
|
|
|
|
|
Hi
After deploying ASP.net 1.1 application, when a user hits a page first time, it takes lot of time to load because MSIL code needs to be translated to native format. But, if we have several pages in application, it can give bad impression that the site is slow.
Is there a way after deploying, I can automatically turn all the pages from MSIL to native format for fast loading?
Please advice.
Thanks
Pankaj
|
|
|
|
|
Hi!
You'd want to start reading on a tool called ngen (part of the framework sdk).
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
pankazmittal wrote: it takes lot of time to load because MSIL code needs to be translated to native format.
Sorry, that is not correct. ASP.NET takes time to compile the aspx ascx pages into C# assemblies. You can make this load faster by moving most of your code to the code-behind class.
|
|
|
|
|
|
Hi, Im developing a console application in visual studio and I just want my project to produce a .exe like in C. Is this possible? I can run it from the start..debugging thing but I want the exe. Also how do you run from VS and pass in command Arguements? Thanks in advance
|
|
|
|
|
For VS 2005, for existing application, in solution explorer, right click on the project and choose "Properties", you will see Properties Tabs Windows. Select "Application" Tab and there is a combobox called "Output Type", select "Console Application", you will get Console Application like C.(for new apps, choose Console Application in start up.) For Command Line Arguments, don't close properties tabs windows. Select "Debug". You will see "Start Options", there you can set "Command Line Arguments" and "Working directory" as well.
For VS 2003, in solution explorer, right click on the project and choose "Properties", you will see Property Pages Dialog. On left window, you will see "common Properties" and "Configuration Properties". Expand "Configiration Properties", you will see "Debugging". On the right side, you will see "Start Options", expand this. You see "Command Line Arguments" and "Working Directory".
Enjoy!
|
|
|
|
|
The .exe is in your projects 'bin\Debug' folder.
Wacky waving inflateable arm flailing tube man!
- Family Guy
|
|
|
|
|
hi guys,
in my client/server application, i have a list in my server of connected clients. if the physical connection of the network is dropped, i would like to start a timer in the server app that will count up to lets say 2 minutes and by that time if the client still did not respond i would like to remove that client from the list. how will i create multiple timers to monitor each of my clients?
or if you can suggest a better way of doing this, i accept suggestions. thnx
|
|
|
|
|
You don't need multiple timers.
Just use one set it's interval to one second...
Then have a list of connected users with a property that stores the time of last action, you then go trough that list comparing current time with that time every time the timer ticks and do your logic there...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
How i can get position of mouse when hold tap and the contextmenu show? Thanks
Nothing
|
|
|
|
|
hi pmasknguyen!
honestly, i'm confused with your question... but if you mean to get the mouse position,
you can use the MousePosition property of the control. but this is in screen coordinates.
if you want to convert it to control coordinate, use PointToClient method and pass the MousePosition value as a parameter.
and also you can override OnMouseDown method if you are inheritng a control and if not, you can use MouseDown event instead.
hope that's what you want.
microsoc
|
|
|
|
|
I have used OnMouseDown but it's just update mouse position when tap on the screent. But when hold-tap the contextmenu will show out and the Event will not occur. How to catch this and get position.
Nothing
|
|
|
|