|
Ahsan-AhsanS wrote: I am doing a project for PDA.i want to read a Xml file from drive c.
but when ever i deploy the project it says that the file is not located.check the path.this error is generated on run time.
i am using the following code.
That's because your PDA does not have a "Drive C"
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
than how can i give it the path to my c drive.i want it to read the file from my pc's c drive.plzzzzz help me out.
Ahsan Ullah
|
|
|
|
|
Hi,
This is how you give up the path:
"xmldata.xml" Without the 'c' and the '\\'.
|
|
|
|
|
Hello
Can any one give me a hint how to upload excel sheet in database sql/access with C#...
any help will be appreciated.
|
|
|
|
|
hint: use odbc or oledb.
protected internal static readonly ... and I wish the list could continue ...
|
|
|
|
|
Dear all, i am designing a testing tool, which will test the teststeps that is being implemented as functions in a dll.
User has options to pause/resume/abort the test execution. for pause i know i have to stop the execution after executing current teststep(function). i don't know how to implement abort functionality. if we kill the thread that is handling the execution then the state would be unstable.(coz it might read/write to some files). Is there any way to abort the test execution without having instability?
If you come across these kinda of situations plz share ur thoughts
Thanks
srini
|
|
|
|
|
I can give you some thoughts based on my experience. A thread can be terminated in three ways:
1) The thread functio returns. (Recommended)
2) The thread kills itself. (Avoid)
3) Somebody else kills this thread. (Avoid)
You should always design your thread functions so that they returns when you want the thread to terminate. This way, you can clean up things, e.g., closing read/write files. In practice, use some thread synchronization objects, such as event, mutex or semaphore. When the calling thread wants your testing thread to terminate/abort, send a signal through one of these sychronization objects. This design is pretty mature and should resolve your stability issue.
Hope this answers your questions.
- It's easier to make than to correct a mistake.
|
|
|
|
|
Hello,
How do I specify what DialogResult value my dialog box is supposed to return to the caller? This assumes the caller called ShowDialog() to show my dialog box.
Thank you
|
|
|
|
|
what about:
this.DialogResult = DialogResult.Cancel ?
hard, hey?!
|
|
|
|
|
Thanks, Mr. Lloyd! It's hard when you don't know it!
|
|
|
|
|
Glad you thank me! That's good behavior!
Certainly the experience help and being a beginner is always difficult.
That makes me think to an additional advice:
Download the documentation!
Then ... mhh ...
Open the index tab, in the "Look for:" text box type: "DialogResult"
You will see!
The documentation is a great source of knowledge!
Ans so is http://www.google.com/[^]
|
|
|
|
|
how can i connect to database by ip not server name
MD_NADA
|
|
|
|
|
By writing the ip number instead of the server name.
(Curious to why you didn't try that before posting a qustion...)
---
b { font-weight: normal; }
|
|
|
|
|
Hi
This is my first experiment with c#. I am making an application that must have two threads. One should handle the main dialog and it's message loop. I am starting the other thread in main method and this thread creates another independent dialog(which is an animated tasbar notification). But I should also be able to handle events(button clicks for example) in this second dialog. But my second thread is taking control immediately after showing the dialog and I cannot find a way to transfer control to the message loop of the second dialog. The following code snippet makes clear of what I am talking of.
<br />
public static void NotificationThreadProc()<br />
{<br />
Console.WriteLine("Inside notification thread");<br />
Notification n = new Notification();<br />
n.showNotification("Hello");<br />
<br />
Thread.Sleep(2000);<br />
n.hideNotification();<br />
n.Close();<br />
return;<br />
}<br />
NotificationThreadProc is the procedure name I passed as a parameter to ThreadStart(). Notification is my second dialog. Show notification simply runs a for loop resulting in animating the dialog to look like a taskbar notification. I need a button inside this notification and I need an event handler to be invoked when I press this button. But since the thread that created this control is busy sleeping. How can I make this Notification thread listen to events from inside the Notification dialog? Please help..Any small clue is highly appreciated.
Thanks in Advance,
venkat.
|
|
|
|
|
Hi
Im a beginner and need some help
How do i write to a text file that already has data in it. I basically want to insert the values i put in my textboxes as a new record in my txtfile. It must not create a new file or delete the existing records.
Also, i know i should put all the textbox values into an array, but how do i write this array seperated by commas to my txtfile?
ie. textfile looks like this:
John,15,motorbike,20,12
Luke,12,car,24,11
Please could someone help me out
|
|
|
|
|
Use the System.IO.File.AppendText method to open the file for appending.
You can use the string.Join method to join the values in an array into a single string.
---
b { font-weight: normal; }
|
|
|
|
|
Hello,
I want to change the BackColor property, for instance, of a control belonging to the main form from a seconday form.
How can I do that?
Please help. Thanks.
|
|
|
|
|
see the MVC Pattern[^]
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
Threre are two ways.
1. you could pass the mainform reference to secondary form in the secorndaryform's contructor and use reference to change backcolor property.
mainFrm.BackColor=value;
or
2. Create an event in the secondary form which the mainform should register. when ever you want to change mainform backcolor just trigger the event from secondary form. The mainform's event handler should do this.BackColor=value;
Hope this helps.
Thanks and Regards,
Srini
|
|
|
|
|
Can you please tell me how can I 'pass the mainform reference to secondary form in the secorndaryform's contructor'?
I mean what's the exact code I should to the secondary form contructor?
Thank you very much.
|
|
|
|
|
public class SecondaryForm <br />
{<br />
public MainForm mainFrmObj=null; <br />
public void SecondaryForm(MainForm mainFrm)
{<br />
mainFrmObj=mainFrm;<br />
mainFrm.BackColor=colorvalue;<br />
<br />
}
|
|
|
|
|
does the object locked get unlocked? Is there some "guidance" on that in MSDN or somewhere?
Marc
Pensieve
Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson
-- modified at 13:25 Saturday 10th June, 2006
|
|
|
|
|
Marc Clifton wrote: does the object locked get unlocked?
I'm almost certain this is true, which is why using lock() is preferred over manually locking an object (and unlocking it in a finally clause).
[edit]
See this[^] MSDN article.
[/edit]
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
What is the format of the data you are trying to parse?
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
The format is yyyyMMdd
|
|
|
|