|
I tried using the Settings classes autogenerated by the IDE and it worked fine. I found that the changed settings are not reflected in the exe.config file, instead, it's stored in the user's profile directory (C:\Documents and Settings\<UserName>\Local Settings\Application Data\....\WindowsApplication1.exe_Url_ivvf3kg5nf2omiqzptjeklawxynwvil5\1.0.0.0\user.config). The code I used to read and modify the values is pretty plain
MessageBox.Show(Properties.Settings.Default.TestSetting);
Properties.Settings.Default.TestSetting = "ItWorks";
Properties.Settings.Default.Save(); Hope this helps.
|
|
|
|
|
OK - how did you get that far ? I've added settings and they are NOT available to by via that sort of code, that's exactly what I tried.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Nothing special, I created a new WinForms project, double clicked Settings.settings on Solution Explorer, added my custom setting (TestSetting ). Built the project and that was it, I got Intellisense recognizing the TestSetting property on Properties.Settings.Default . FWIW, I'm using the Express Edition, not VS .NET 2005.
|
|
|
|
|
How do i record the sound from the microphone?
Any links or code will be appreciated.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Hey Everybody!
I'm trying to send a file through a network using TCP client.
for small files I had no problem, but when I got to bigger files I had to find a solution to the buffer problem.
To do that I "cut" the file into chunks, and sending each time a chunk at size 65000. now, everything is going well and the file does go through, but the problem is that the file gets to the other computer corrupted. The file size on the two computers is identical, but its still corrupted.
any ideas anyone????
Thanks!
|
|
|
|
|
If you have writen seperate sender and receiver, there may be some difference in sending and receving variable data type I mean the size may differ.
Mujtaba
|
|
|
|
|
TCP does not preserve message boundaries. You must pay attention to the return value of GetStream().Read - this will tell you how much data was returned in a particular call. The remaining bytes in the buffer passed to Read will have the same value as they had before the call was made.
Remember that network streams deal in bytes. If you're sending a text file and reading it as text into string variables, ensure that you use the same Encoding on both ends to convert to and from byte[] buffers.
|
|
|
|
|
Could please someone tell me what are the pre requsites for a C++ dll to be used in C#. I am having problem in using C++ dll in my C# code.
Mujtaba
|
|
|
|
|
It needs to export something, either as a normal dll, or through COM or .NET. Perhaps if you gave us some details ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I want to use a normal dll that contains a simple class and I want to create an object of that class in my C# code.
Mujtaba
|
|
|
|
|
I'm not sure if you can do that, because I don't believe you can use p/invoke to export a class from a C++ dll.
Why don't you want to use managed C++ ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I am not having detailed concept of that but now I am starting managed C++. Could you give me any links about it?
Mujtaba
|
|
|
|
|
Nish has written heaps of articles about it, and has a blog as well, I'd read those.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
OK Thanx very much.
So nice of you.
Mujtaba
|
|
|
|
|
Hi,
How do you add a new line to a textbox like in the following:-
<br />
textBoxMemberNotes.Text = File.ReadAllText(filename) &CrLf +now;<br />
Glen Harvy
|
|
|
|
|
textBoxMemberNotes.Text = File.ReadAllText(filename) + Environment.NewLine + now;
---
b { font-weight: normal; }
|
|
|
|
|
I just new it would be easy BUT do you think I could find a reference to that anywhere on the net
Thank you
Glen Harvy
|
|
|
|
|
|
Ah yes - but if you know what terminology to search for then you probably don't need to search for it
Glen Harvy
|
|
|
|
|
first set the multiline property of your text box to true.
Then try this:
<code>textBoxMemberNotes.Text = File.ReadAllText(filename) + "\r\n";</code>
Hopefully, this should work.;)
'Tilewa
|
|
|
|
|
how can i get a childnode value in a treeview into c# winprogramming.i want to get the child node value in a particular treeview
dcjoshi2
|
|
|
|
|
Here's a simple example to get you started:
TreeNode selectedNodesFirstChild = this.treeView.SelectedNode.Nodes[0];
Just Google it.
Failing that try phoning
|
|
|
|
|
Hi,
If I have some unnecessary Using Statements at the top of my cs code file, will that increase the size of assembly ?
|
|
|
|
|
No, they are ignored by the compiler.
|
|
|
|
|
No, they "only" allow you to use the types from a namespace without the need to specify the whole namespace. So for example you can write FileInfo instead of System.IO.FileInfo .
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|