4,439 Posted Topics
Re: Do you also need some ideas about which partner you are going to choose to share your life with, or is that something you can do for yourself? | |
| |
Re: ShowDialog shows the form as a modal dialog. I think you better use the Show method here. | |
Re: Use the StringBuilder class to convert a zero terminated char array to a C# string. | |
Re: Can't read your zip file, but perhaps a look at this snippet may help: [url]http://www.daniweb.com/code/snippet335171.html[/url] | |
Re: It is useless to ask such question. If you would have tried to do this conversion yourself and you got stuck somewhere in the middle, you could have a chance for an answer. Now it will be more like Bob Dylan singing: "The answer my friend is blowing in the … | |
Re: An array is in fact a constant pointer pointing to a block of memory. So char message [] = { 'H', 'e', 'l', 'l', 'o', '\0' }; char message [] = "Hello"; is valid : [B]initialisation[/B] message = { 'H', 'e', 'l', 'l', 'o', '\0' }; message = "Hello"; or … | |
Re: Depends, here you may use it freely or not.The word refers to the Pawn object. It is sometimes needed to avoid name conflicts with other equily named variables. But best is to use a property here: [CODE=c#]class Pawn : Pieces { string name; public Pawn(string piece) { this.name = piece; … | |
Re: Call the Grade function as proposed by Singlem in your while loop. Declare it as [B]public static void Grade(int mark)[/B] etc. Succes! | |
Re: [url]http://www.daniweb.com/code/snippet244162.html[/url] | |
Re: Hi get2afzal, welcome here! An application is anything that lets a "microprocessor" and other hardware, do things. This might be a traffic light control system, a game on a console etc. Because such microprocessor systems only understand the meaning of 0 and 1 (on and off) it is hard for … | |
Re: Please don't post threads twice! Use the sender object, perhaps like this: [CODE=c#]public void Manage_Another_Account_frm_MouseHover(object sender, EventArgs e) { //pnl_new_[count].BackColor = Color.Green; Panel hoveredoverPnl = sender as Panel; //you know it is a Panel right? hoveredoverPnl.BackColor = Color.Green; }[/CODE] | |
Re: You need to swap bytes. You can find info on that here: [url]http://msdn.microsoft.com/en-us/library/aa288465(v=vs.71).aspx[/url] | |
Re: IMO you better use properties, something like: [CODE= C#]public bool active{ get; set; }[/CODE] instead of [CODE=C#]public void inActive (bool input) //if they are active or on leave { active = input; }[/CODE]in your constructor this would give: [CODE=C#]public Employee (bool active, string ID, string name, string DOB, int age, … | |
Re: Perhaps this thread? [url]http://www.daniweb.com/forums/thread211352.html[/url] You could have found it yourself ;) | |
Re: Use the Compare method: [url]http://msdn.microsoft.com/en-us/library/84787k22.aspx[/url] | |
Re: If I interpret your question right, I think this causes your confusion: The upper left coordinates of a form are (0,0) If you have a PictureBox in it at say (50,50), and you draw in the PictureBox, the upper left coordinates of the PictureBox are (0,0). | |
Re: This gave me the output you wanted: [CODE=C#]class Program { static void Main(string[] args) { //Console.WriteLine("Input start date:"); DateTime st = new DateTime(2011,1,1); //st = Convert.ToDateTime(Console.ReadLine()); Console.WriteLine("Input number of months:"); int nm = Convert.ToInt32(Console.ReadLine()); // Hey, no error checking here! You normally should. for (int i = 0; i < … | |
Re: You could do things like this: [CODE=C#]class Program { static void Main() { Class1 type = new Class1("HELLO",17) ; // here do things like Console.WriteLine(type.message); Console.WriteLine(type.age); // or if its birthday: type.age = 18; //etc } }[/CODE] | |
Re: Hi please12345, welcome here! You may know what the heck a [B]sansa clip [/B]is. There is at least one person(me) who has not even the faintest idea of what it could be? Please don't ask questions like:[COLOR="Green"] I have problems with [B]woof [/B]I tried [B]spif [/B]but it gave me [B]zork[/B]. … | |
Re: A C# program needs a function called [B]Main[/B], for C++ this is [B]main[/B]. The syntax for arguments of Main is [B]string[] args[/B], I believe for main this is string args[]. Your function on line 1 is called [B]Go[/B]? | |
Re: You could read this recent thread [url]http://www.daniweb.com/forums/thread336019.html[/url] It might perhaps provide some hints. | |
Re: This is obviously a homework assignment, but the OP has done some effort to refrase it in the proper way.:sad: | |
Hi you all, I have the following code to put a CSV file into a DataTable. [CODE=C#]// read CSV file private DataTable BuildDataTable(string fileFullPath, char seperator) { const int EOF = -1; DataTable myTable = new DataTable("MyTable"); DataRow myRow; try { StreamReader myReader = new StreamReader(fileFullPath); } catch (Exception ex) … | |
Re: Hi noamo48 welcome here! Did you find [url=http://www.andzelika.co.uk/TCPsockets.pdf]this book[/url] on your search on the web? | |
Re: I consider Arabic caligraphy one of the most beautiful in the world. I even can distinguish some letters in it, although I do not understand Arab, exept for some words like "salaam" etc. I think you are helping lots of people with your snippet. | |
Hello, Would it be a good idea to let any member manage his own collection of favorite threads? Greetings, Danny | |
Re: Hi ninikobb, welcome here! Use the GetUpperBound method. Read this:[url]http://msdn.microsoft.com/en-us/library/system.array.getupperbound.aspx[/url] | |
Re: Why is it so urgent? Is your house on fire? [COLOR="Red"]Don't post a message here in red.[/COLOR] IT HAS THE SAME EFFECT AS SHOUTING!!! Look in the code snippet section and you will certainly find what you where looking for. If not, come back here. | |
Re: Do it like this: [CODE=c#]if (sts == true) { MessageBox.Show("OK"); } else { MessageBox.Show("Your Username or password is incorrect"); }[/CODE] | |
Re: Lokk for a possible answeer at the end of this thread [url]http://www.daniweb.com/forums/thread334851.html[/url] | |
Re: Learn ADO.NET first. You could start [url=http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson01.aspx]here.[/url] This is the complete book I guess. ADO.NET does not care to what DB it is connected, as long as the connection is set up right. You will learn that in this book, or from other sources. Learn Access seperately. | |
Re: Don't think there is. Through Reflection? Perhaps use an if statement? | |
Re: Happy Newyear to you all! My first approach (perhaps not the best one) would be: Put your two listboxes in a Dictionary, something like this: [CODE=c#]Dictionary<string, int> d = new Dictionary<string, int>(); d.Add("cat", 2); d.Add("dog", 1); d.Add("llama", 0); d.Add("iguana", -1);[/CODE] Now sort your first listbox. Walk through it item by … | |
Re: You could use a ComboBox control for that what you want. | |
Re: I always found [url=http://www.csharpkey.com/csharp/index.htm]this site[/url] very usefull. It is updated for VS 2010 and C# 4. | |
Re: Hi fsuco, welcome! :) Perhaps [url=http://www.amazon.co.uk/USB-Complete-Developer-27s-Guide-Guides/dp/1931448086/ref=wl_it_dp_o?ie=UTF8&coliid=IJ1XOZFCTUQGY&colid=IT79H49ZWGO1]this book[/url] may help. It's about USB. They also have [url=http://www.amazon.co.uk/Serial-Port-Complete-2nd-Editon/dp/193144806X/ref=wl_it_dp_o?ie=UTF8&coliid=IA8KGUK9Q5K1V&colid=IT79H49ZWGO1]this one[/url] about serial ports. You could also read an article like [url]http://www.developerfusion.com/article/84338/making-usb-c-friendly/[/url] Succes! | |
| |
Re: He man what's the hurry? Over here it is sunday, so relax. My guess is you have to do some calculations, based on the textboxes that are enabled for a parttimer. See what you can come up with. Succes! :) | |
Re: Try [url=http://www.csharpkey.com/csharp/Lesson09.htm]this[/url] for learning about constructors. Read [url=http://www.csharpkey.com/csharp/Lesson12.htm]this[/url] for learning about static. | |
Re: Hi, RichMayor, welcome here. So you want a free tutor to teach you C#? I am affraid that is too much to ask. ( At least for me that is too much asking :D ) Try to start with for example this: [url]http://www.csharpkey.com/csharp/index.htm[/url] Other sites as this one exist. Or … | |
Re: Obviously you want something like a "shopping basket" or am I wrong? Look at how differt "shopping" sites handle this and try to implement it that way. Happy programming :) | |
Re: You can use a default constructor to give the fields of your class initial values. This avoids the use of an extra Initialisation method. You can also overload constructors, if you want some fields to be initialised with other then the default values. | |
Re: Read about [B]static[/B] You could do something like this: [CODE=c#]class Vars { public static int var1 = 1; public static double var2 = 3.42; //etc. }[/CODE] Then use your variables like this: [CODE=c#] int i; double d = Vars.var2; i = Vars.var1;[/CODE] | |
Re: Hi welcome! Use MDI (Multiple Document Interface) You could start [url=http://msdn.microsoft.com/en-us/library/ms632591(v=vs.85).aspx]here[/url] for more info. Or look at this [url]http://msdn.microsoft.com/en-us/library/aa645520(v=vs.71).aspx[/url] | |
Re: Your custom control seems to be a good idea to me. I made something similar for the table of Mendeleev(chemical elements). >[COLOR="Green"]Will I need to create a custom version of the Panel (or similar) to get a better "smooth" scroll?[/COLOR] There is already a custom version in the form of … | |
Re: [QUOTE]Which one is the better one[/QUOTE] There is no better one. Even in spoken languages. Which is better? French, English, Chinese? But I agree that I have a (personal) preference for C# over VB and some other languages. But I still do some programming in VB for the moment! | |
Re: I know it is Xmass, I shall be generous. Seek and thou shalt find! |
The End.