|
addendum:
Use capitals only when forced to by the bloody framework and never make clear in 5 lines that which can be in-lined in one
Welcome to the C# club.
------------------------------------------------
I'm largely language agnostic -
After a while they all bug me
------------------------------------------------
|
|
|
|
|
Starting out with C++ by Tony Gaddis ISBN 9780321409393
This is what we used in college and has nothing about .NET and such (at least the older version anyhow. We used the 3rd edition but I know there has been at least one more edition since then.)
This is a great book for anyone who has little to no programming experience.
______________________
stuff + cats = awesome
|
|
|
|
|
|
Programming C#, 3rd Edition by Jesse Liberty (ISBN: 0-596-00489-3)
Windows Forms Programming in C# by Chris Sells (ISBN: 0-321-11620-8)
Pragmatic ADO.NET: Data Access for the Internet World by Shawn Wildermuth (ISBN: 0-201-74568-2)
Hope this books will be very much Helpful for you.
Regards,
Satips.
|
|
|
|
|
What I can say is "Dont even bother with C# Bible[^]"
It is a good example of what you don't want. It has a lot to say on OOP and the .NET Framework but very little on Socket Comms and doesn't even mention Marshalling.
I've found CodeProject to be of more help than this book.
|
|
|
|
|
Hello,
I have the following to do:
1) Windows Service which should provide some data to other applications...
2) application which handles this messages.
It is not so important that all messages comes to the applications...For that I thought about the possibility to use an udp socket.
What do you think about that? Is there a better possibility to send this messages in dotnet?
Best regards
Hansjörg
|
|
|
|
|
Hi!
Your service could publish a remoting server. That way it's really easy for the application to communicate with the service.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
have you some good links about that topic?
Best regards
Hansjörg
|
|
|
|
|
Sure!
Here you go[^]
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hello,
If anyone can help me with this it would be great. Maybe someone can even write a tutorial.
I am trying to create a simple user control. It doesn't really matter what kind of control it is, the key thing is, this control cannot be resized through code or designer. For example, the height of the textbox control cannot be changed. I am trying to get similar results, except that width cannot be changed as well.
Sincerely,
Michael Korin
|
|
|
|
|
Try writing a (private?) bool property named Resizable. Then you can ask at some point (OnResizing event or something alike) if it can be resized, if not return the size to its initial value.
|
|
|
|
|
Thanks for the reply, but this is not what I am looking for.
You are telling me a workaround. You can do it even better by overwriting the size method
[Browsable(false),
EditorBrowsable(EditorBrowsableState.Never)]
public new Size Size
{
get {return new Size(20,20);}
set {}
}
But when you place this element in the designer, it still shows 9 squares around it appearing to be resizable (Even though when you try to resize, it will move it instead keeping the size). I want my control to look somehow like textbox where you can't resize it in the editor. Further I want to remove the SizeChanged and Resize even handlers so that they are not accessible through designer or code.
Thank you for your suggestion though.
Mike
|
|
|
|
|
Hello,
Maybe the "Locked" property helps you a little more.
All the best,
Martin
|
|
|
|
|
i have a database object which retrieves all the data.
and i have the xml file(excel format) in textwriter mode. how can i attach dtaset to xml file and i want to transform that using xsl file
can any body know this pls help me
thanks
satya
|
|
|
|
|
I have a utility that adds carriage returns and line feeds into text files. What i want to do is gather an arry of those text files, and pass them one by one into this executable. All seems to be working fine, but when I try to do a Process.Start() I keep getting an arguments exception. Does anyone have any insight? Here is a code snippet..
string strCRLFArgs = string.Empty;
string strCRLFLoc = string.Empty;
strCRLFLoc = string.Format(@"{0}\crlf.exe", (string)m_config.GetSetting("CRLFDir"));
System.IO.DirectoryInfo di = new System.IO.DirectoryInfo((string)m_config.USPSGetSetting("ImportDir"));
FileInfo[] fi = di.GetFiles("*.TXT", SearchOption.TopDirectoryOnly);
for (int i = 0; i < fi.Length; i++)
{
FileInfo fiTemp = fi[i];
strCRLFArgs = string.Format(@"CRLF {0}\{1} 182", (string)m_config.GetSetting("ImportDir"), fiTemp);
crlfProcess.StartInfo.FileName = strCRLFLoc;
crlfProcess.StartInfo.Arguments = strCRLFArgs;
crlfProcess.StartInfo.UseShellExecute = false;
crlfProcess.StartInfo.CreateNoWindow = true;
crlfProcess.StartInfo.RedirectStandardOutput = true;
crlfProcess.Start();
The arguments for running it as a regular command line utility are CRLF ImportDirectory\TXT#.txt 182. Would this stay the same if I'm setting the process to that executable. Any insight would be great. Thanks =)
-- modified at 13:47 Wednesday 13th June, 2007 - Didn't use
sorry =)
|
|
|
|
|
Hi,
you seem to reuse the same crlfProcess object for all files; I dont think this is OK,
especially since Process.Start() does not wait for the process to terminate, so you
would end up with one process object representing a bunch of processes...
|
|
|
|
|
Luc Pattyn wrote: you seem to reuse the same crlfProcess object for all files; I dont think this is OK,
especially since Process.Start() does not wait for the process to terminate, so you
would end up with one process object representing a bunch of processes...
If I use crlfProcess.WaitForExit() it will wait for the process to end before moving onto the next item, no?
|
|
|
|
|
Hi,
yes, but even then I am not sure you can simply reuse the process object for another process without taking special precautions.
For one there is a Process.Dispose() method; furthermore have a look at
Process.Refresh() which indicates things get cached...
Did you ever try with one Process object per file ?
|
|
|
|
|
Hello everyone,
I am working on an Windows Application which runs process that may take sometimes for it to be completed such as connecting to a remote DataBase server.
I wish to keep the user informed when they are communicating with the remote server. I have realised if I use a TextBox to tell the user what is happening it works fine but when I write the same text in toolStripStatusLabel the the text is NOT displayed till the process is finished. The same thing happens when I use a ProgressBar to show there are things happening and the user needs to wait for the complition of the process.
Can someone tell me how I can solve this problem?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
You should use multithreading. Have a look at BackGroundWorker component, MSDN has got quite a good and useful example
|
|
|
|
|
You'll need to use theading for this, perhaps the easiest would be it you look a look at the BackgroundWorker component. This allows you to start the database connection off in a background thread and then you can immediately move onto updated the toolstrip etc. The component also has the capability to notify the parent thread of it's progress so that you can maintain a view of this for the user.
|
|
|
|
|
In your method that updates the progress bar add Application.DoEvents(); to force a redraw of the control. I had that same problem before and considered multithreading, but just adding that worked just fine.
|
|
|
|
|
I have an existing console application that I want to extend with an optional GUI front end. I would like for this to all exist in a single executable rather than writing two separate versions (a console app and a windows app). If the user runs the executable normally, I want the application to run in a command window. If the user runs the executable with a specific parameter, say:
program.exe -visual
I want the program to run at the command line, but open a windows form where it spits out various output (different output than that going to stdout, so I'm not looking for a redirect solution).
My first instinct was to have the console application start up the GUI and then update a textbox via a delegate function. Of course, for the GUI to update itself, and for the console app to continue its work, the GUI would need to be in its own thread.
What is the best way of going about this? Should the console app spawn a thread which then calls Application.Run(...)? What then is the best way for the console app to send data over for the GUI to display?
I'm open to all suggestions. Thanks.
|
|
|
|
|
You can simply add forms to a console program, if you detect the -visual argument you can simply call Application.Run rather than processing the command line.
|
|
|
|
|
Create a common data class, have it implement INotifyPropertyChanged and code the GUI (and possibly the Console class) to handle the event.
At least thats how I'd do it.
------------------------------------------------
I'm largely language agnostic -
After a while they all bug me
------------------------------------------------
|
|
|
|