|
In the solution explorer, go to the cursor file's properties and set Copy to output directory to Copy if newer .
Cheers,
Vikram.
"I will put my new found knolage to good use" - Captain See Sharp.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed." - Gary Wheeler.
|
|
|
|
|
It does NOT work.. Thanks for your reply.
|
|
|
|
|
I got the answer.
http://www.codeprof.com/dev-archive/37/9-31-373566.shtm
Thank you.
|
|
|
|
|
Anybody know if I can connect a C#.NET application to MYOB accounting software to view and update data?
Thanks.
|
|
|
|
|
hey there
i hav a lil problem with a toolStripButton
the following code is in my app
<br />
private void BtnSave_Click(object sender, EventArgs e)<br />
{<br />
method();<br />
}<br />
<br />
private void dataGridView_CellEndEdit(object sender, DataGridViewCellEventArgs e)<br />
{<br />
save = true;<br />
}<br />
<br />
private void FrmTimeCategories_FormClosing(object sender, FormClosingEventArgs e)<br />
{<br />
if (save)<br />
{<br />
string option = MessageBox.Show("Would You Like To Save The Changes?", "Question", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question).ToString();<br />
<br />
if (option == "Yes")<br />
{<br />
method();<br />
}<br />
else if (option == "No")<br />
{<br />
MessageBox.Show("Changes Will Be Lost");<br />
}<br />
else if (option == "Cancel")<br />
{<br />
e.Cancel = true;<br />
}<br />
}<br />
save = false;<br />
}<br />
<br />
private void btnDeleteRow_Click(object sender, EventArgs e)<br />
{<br />
foreach (DataGridViewRow row in dataGridView.SelectedRows)<br />
{<br />
TimeCatTable.Rows[row.Index].Delete();<br />
}<br />
<br />
TimeCatTable.AcceptChanges();<br />
SqlCommandBuilder sqlBuilder = new SqlCommandBuilder(dataAdapter);<br />
dataAdapter.Update(dataSet, "TimeCat");<br />
}<br />
<br />
public void method()<br />
{<br />
SqlCommandBuilder sqlBuilder = new SqlCommandBuilder(dataAdapter);<br />
dataAdapter.Update(dataSet, "TimeCat");<br />
<br />
save = false;<br />
}<br />
now the problem is this... the call to method() doens work in the toolstripbutton (btnSave) click handler. the program defenetly goes into it (i put a messagebox in to test that) but its doesnt save the changes to my database, but the method() in the formClosing handler does save it!
i put a normal button on the form aswell just to see and that worked too... im confused with this.
can anyone plz tell me why this happens?
Think big and kick ass
|
|
|
|
|
HarveySaayman,
Are you getting any exceptions? Put a try{} catch{} around "method()".
Also, It might be a good idea to go through the "dataSet" rows in the "method()" and print out the values that you are about to update to actually check, the value which you want is in there.
Regards,
Gareth.
|
|
|
|
|
i tried the try catch block, no exceptions. if i call method() from the btnSaveClick messageboxes will show and variables do change but these two lines wont do what they are supposed to
<br />
SqlCommandBuilder sqlBuilder = new SqlCommandBuilder(dataAdapter);<br />
dataAdapter.Update(dataSet, "TimeCat");<br />
if a put a normal button on the form and call method() with that it works perfectly and also if the form closes and the dialog asks if u want to save. its just the btnSave (toolStripButton) that wont do it
thanx
Harvey Saayman
Think big and kick ass
|
|
|
|
|
Dear all
Regards!
I am developing a Drawing Editor in C# and OpenGL like Autocad,I am using the Viewport having a Canvas, the editor can import the DXF files and drawing on the Canvas. now i have to include the facility of editing that 's "Move Drawing" and "Copy Drawing".
Kindly help me, using C#.
Regards
David
david
|
|
|
|
|
Hi,
I want to execute a dos command without using .bat files in C#.net application.plz reply....
Thanks in advance
Smithakrishnan
|
|
|
|
|
try this :
<br />
Process dosapp= new Process();<br />
<br />
dosapp.StartInfo.FileName = "dosapp.exe";
dosapp.StartInfo.Arguments = "/?";
<br />
dosapp.Start();<br />
|
|
|
|
|
When I'm trying to debug the sorce code downloaded from the following site, I got the exception, "An error occurred: Cross-thread operation not valid: Control 'stbMessage' accessed from a thread other than the thread it was created on."
"http://www.codeproject.com/KB/game/tictactoenetwork.aspx",
When I made exe to the solution, its working very fine.
Please guide me to debug the code.
Thanks and Regards,
Lalitha.
|
|
|
|
|
Winforms controls are not thread safe. If you must update a control from another thread of execution, you should use a delegate and then call this.Invoke() from the form.
Cheers,
Vikram.
"I will put my new found knolage to good use" - Captain See Sharp.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed." - Gary Wheeler.
|
|
|
|
|
Can any one help how to validate system's user name and password?
|
|
|
|
|
Hi: can anyone tell me how to set up an input class for XNA that works? I thought I've done it right, but when it checks input, nothing happens. (So far, it's only supposed to exit) I just want the basic idea o how I would go about doing this, even though it's simple. (I have Game1 class and Input class)
Thanks in advance.
- I love D-flat!
|
|
|
|
|
|
Hi all,
I have write a service to automate a server application. To start the application I need some IPs which are stored in a database. I read the database and get required IPs on my service and run the server.
Up to now everything is ok.
Now I want to check that there is multiple instance are available. Because I can start only one server at a time. To do this I try to use MUTEX, as in C++(my server is written on C++). Can you guys give me a help. I don't know that higher concepts to handle in C#.
Thanks a lot.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Eranga Thennakoon wrote: Now I want to check that there is multiple instance are available.
Multiple instance of what? I don't think you can have multiple instances of a Windows service anyway. If it's a regular app that you only want one instance of, C# has a Mutex in System.Threading which fits the bill. Google is your friend[^]
Cheers,
Vikram.
"I will put my new found knolage to good use" - Captain See Sharp.
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed." - Gary Wheeler.
|
|
|
|
|
hello,
my web app use DirectoryServices to query Active Directory. On customer side i'm getting following error:
The time limit for this request was exceeded.
This error appears ~2 minutes (~120 s) after method FindAll() had been launched. Google this error description i found:
Active directory queies can take a bit of time to process so you may have to extend the time available from the default. You can do this by adding a <httpruntime> section to the web.config file with an executionTimeout attribute. Take a look at
<a href="http://msdn2.microsoft.com/en-us/library/e1f13641.aspx">http:
default value for executionTimeout attribute is 110 seconds. So it seems my error appears because of timeout.
BUT customer says - other LDAP tools didn't produce such error, and find objects quickly.
So, why is my search too sloooooooow?
thanks,
max
|
|
|
|
|
What OS? When I wrote some LDAP code on Windows 2000 using COM a while ago it was blazing. Then I executing the same thing on XP and it would take about 10 minutes. I never did figure out the problem.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I don't know exactly but I suppose Win 2003
thanks,
max
|
|
|
|
|
Dear All,
I have a treeview with several parent and child node. If I click on a parent, I want to invoke a method. If I click on a child , I want to invoke another method. The same method for the parents , and the same method for the childs.
+ Parent Node 1
- Child node 1
- Child node 1
+ Parent Node 2
- Child node 1
This is the code I dreamed to achieve this. But .. for some reason it doesn't work. If I click on the child, it works .. however, the parent method is not fired when I click on the parent. Can somebody point me in the right direction with whatever it is that I'm doing wrong ?
private void treeView_AfterSelect(object sender, TreeViewEventArgs e)<br />
{<br />
if (e.Node.Parent.IsSelected)<br />
{<br />
MessageBox.Show("This is the parent node");<br />
}<br />
<br />
else<br />
{<br />
MessageBox.Show("This is a child node");<br />
}<br />
}
Thanks
|
|
|
|
|
Do you mean the after select event is not fired, or do you mean that the wrong message box shows ?
I'd probably set the tree view items up with tags so you can tell what level they are on. Or check if the node has children, if the tree is only ever one level.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian,
Thank you for replying so quickly. The Afterselect is actually being called, and the second Messagebox ( when selecting a child ) comes up correctly .. but the first one isn't. Selecting a child with my code works fine, but not the parent. To me , that doesn't make sense, as it really checks if the parent is selected or not, or else it wouldn't make it to the else section and show the child messagebox.
Rick
|
|
|
|
|
Obviously this means the check is not doing what you expect it to. So, set a break point and look at the properties of the event args. As I said, I think that checking if the selected node has children looks like the easiest way to do what you're after.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian ,
I guess your right. I changed a bit in my code , and now it works fine :"
private void treeView_AfterSelect(object sender, TreeViewEventArgs e)<br />
{<br />
if (e.Node.Level == 0)<br />
ClearAll();<br />
else<br />
FillDaTree();<br />
}
I'm very curious to know what the diff is between e.Node.Parent.IsSelected and e.Node.Level == 0
Cheers,
Rick
|
|
|
|