4,439 Posted Topics
Re: There were times in my life I saw some pink elephants. This is true, I saw them! Do they count as gosts too? | |
Re: Perhaps reading this snippet will help [url]http://www.daniweb.com/code/snippet1008.html[/url] | |
Re: Make a class with a date a time and a distance as fields. Add some methods to it to act on these data. As you don't seem to know in advance how many dates etc. you have it is better to use a List than an Array. You can define … | |
Re: Hi Ramy! Hi Scott! The OP sees the outcome of this : [CODE=c#]void LabelClick(object sender, EventArgs e) { MessageBox.Show(((Label)sender).ToString()); }[/CODE] Probably as a result of his so called "trivia code". Code is seldom trivial perhaps he could show us a bit more? | |
Re: D.D.A.N.B.E.: Digital Device Assembled for Nocturnal Battle and Exploration | |
Re: Show us your code. You cannot repair a car when the engine is broken and the hood is closed. | |
Re: IdanS has a point here. But I think if you want to use a Timer, start a new Forms app, drop a textbox on it and add the following: [CODE=csharp]namespace WindowsFormsApplication1 { public partial class Form1 : Form { int counter = 1; public Form1() { InitializeComponent(); Timer MyTimer = … | |
Re: An abstract class is a class you can't instantiate. Why is that? Well if I come to you and say: "I'm an animal." (sometimes I'm a beast really...) I think you would say what [I][B]kind [/B][/I]of animal are you? To work with a class of type Animal you have to … | |
| |
Re: Type long is equivalent to System.Int64 and goes from –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 | |
Re: C# programmers don't declare static types, they just use them: [B]File."whatever";[/B], just like [B]Math.Sin(123.456);[/B] | |
Re: Did not understand either, already replied in the same thread: [url]http://www.daniweb.com/forums/thread199758.html[/url] | |
Re: Your code will give a compile error saying that string does not have a field called Enabled. This is what you can do: [CODE=csharp]Button mybutton = new Button(); //create button myButton.Name = "whatever"; //give it a name myButton.Enable = true; //enable it[/CODE] | |
Re: Finally! After 3 threads I think I know what you mean. I think you mean set the text wrap of a cell to true. This means that the text, when you type continues on a second line in the same cell. Do it like this : [CODE=csharp]const int thirdColumn = … | |
Re: [B]If _userTextBox.Text [/B]in the VB.NET code seems like a TextBox to me. In the C#.NET code it looks like a private string field of a the class, not a TextBox field. Then it should be [B]_usernametxt.Text[/B] instead of [B]_usernametxt [/B]. | |
Re: Perhaps reading this may help: [url]http://www.andzelika.co.uk/TCPsockets.pdf[/url] | |
Re: Makes one wonder why manhood is not completly composed of junkies!?! Been on a low dose of morphine a few days (had a very heavy operation) I can tell you, your dreams are of DVD quality... | |
Re: Just a little remark here. When you have but a few error messages this is still a feasable system. But don't annoy a user with perhaps dozens of error messages. In the end it would become unmaintainable. Suppose you write the same sofware for the arab, russian and chinese market, … | |
Re: What do you mean by "letter"? Is it any key on the keyboard? Is it the return key or the enter key? | |
Re: Perhaps you are better of with something like this : [url]http://www.codeproject.com/KB/cs/calculator.aspx[/url] | |
Re: This can be done this way: [CODE=csharp]//Save existing colors ConsoleColor remFG = Console.ForegroundColor; ConsoleColor remBG = Console.BackgroundColor; //Set colors Console.ForegroundColor = ConsoleColor.Black; Console.BackgroundColor = ConsoleColor.Cyan; //Write something Console.Write("This is a string in black, with cyan background"); //Restore colors Console.ForegroundColor = remFG; Console.BackgroundColor = remBG; Console.Write("This will be in the previous … | |
Re: It seems that in your foreach statement you are always making a new rootnode. | |
Re: Make an empty forms application and add this (see after InitializeComponent) : [CODE=csharp]public Form1() { InitializeComponent(); // create a textbox with name textbox1 this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox1.Location = new System.Drawing.Point(50, 50); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(100, 20); this.Controls.Add(textBox1); //this is the code line from sknake, just changed … | |
Re: On which line did the error occurred? You don't always have to start a new thread you know. See previous : [url]http://www.daniweb.com/forums/thread198951.html[/url] Thanks for using code tags! | |
Re: Do you want to create the DateTimePickers at run time? Please explain a bit more on what you want. | |
Re: What exactly is your problem? Do you know DateTime has an Add method and that the + operator can be used to perform additions of DateTime and TimeSpan? | |
Re: Your error says what it says, a DataGridView does not have a [B]SetDataBinding [/B] method or property or whatever. However a DataGridView has a DataSource property. | |
Re: I think you mean something like this: [CODE=csharp] ListViewItem [] li = new ListViewItem[4]; //define an array for 4 ListViewItems //fill the array up //just using strings here instead of your reader li[0] = new ListViewItem("ID"); li[1] = new ListViewItem("Name"); li[2] = new ListViewItem("Creator"); li[3] = new ListViewItem("Download Link"); // … | |
Re: Your English is a little hard to understand, but I will assume you need to "read" a node of the treeview after it is clicked. Use the NodeMouseClick event for that: [CODE=csharp]private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { TreeNode selectedNode = e.Node; MessageBox.Show(selectedNode.Text); }[/CODE] Once you have the node thisway … | |
Re: [QUOTE=csharplearner]why video/audio doesnt play in both the browsers in my vista [/QUOTE] Had the same experience. Signed in and all went well. Good videos! Although some of them have some strange quirks. For example two persons talking together differently about the same thing! | |
Re: [QUOTE=tiger86]If I'm designing something like a game [/QUOTE] If you are designing, why bother the language? Something like a game? So it doesn't even have to be a game, does it? The language is not that important, it is what you are trying to achieve that is. Perhaps this will … | |
Re: MyTextBox.Text="result of select"; will show [B]result of select [/B]in your textbox. Otherwise use the (DataBindings) property | |
Re: You are drawing [B]image [/B]with a Graphics object. OK. And [B]image [/B]is created in lines 4. OK. In line 5 you copy the Colorpalette used in [B]plainImage[/B], you are not copying the "picture", hence you won't see nothing. | |
Re: Adatapost, perhaps where you live it is still very early in the morning. In case you did not notice : this is the C# forum... | |
Re: It shows a 3x3 grid of 9 rectangles, defined in the [B]rects [/B]array. This is a more complete working example: Make an empty forms application and put this in the forms Paint event handler. [CODE=csharp]private void Form1_Paint(object sender, PaintEventArgs e) { Rectangle[] rects = new Rectangle[] { new Rectangle(8,8,119,86), new … | |
Re: You can also use the Tag property of the button when you build your button array and supply it any data you want. Use a scheme like Diamonddrake proposed, to retieve the data : B.Tag | |
Re: I assume you are using Visual Studio C# Express. On the start page, you have a Getting Started option with lost of items to get you on the way. Do this first and then start with your card game. How your game project will look depends on your design. You … | |
Re: See first time: [url]http://www.daniweb.com/forums/thread197560.html[/url] This is the third time you pose the same question. Now I figured out you want a ground map of your university in an application. So a good start would be to build a forms application. | |
Re: Error 1 'System.Drawing.Font' is a 'type', which is not valid in the given context C:\Users\Marivoet\Documents\Visual Studio 2008\Projects\CalculatorApp\CalculatorApp\CalculatorForm.cs 88 56 CalculatorApp Error 2 The best overloaded method match for 'System.Drawing.Font.Font(string, float, System.Drawing.GraphicsUnit)' has some invalid arguments C:\Users\Marivoet\Documents\Visual Studio 2008\Projects\CalculatorApp\CalculatorApp\CalculatorForm.cs 87 41 CalculatorApp Error 3 Argument '3': cannot convert from 'System.Drawing.Font' to … | |
Re: If you have to do a lot of number crunching it does not matter so much which make of computer you buy. What matters is the clock speed of the machine and how much processors it has. (The more the better) | |
Re: Of course F# is good. But so are C# or C++ and other languages for that matter. I am a C# learner for the moment just as you. Currently I'm reading[url=http://www.amazon.com/Foundations-F-Experts-Voice-Net/dp/1590597575/ref=sr_1_2?ie=UTF8&s=books&qid=1244473528&sr=8-2] this book[/url]. F# seems to me a very promising language, but I believe it is still somewhat premature to … | |
Re: Use a byte array: [B]Byte[] MyCchars = { (byte)'A', (byte)'B' };[/B]This will map to your C array of chars. [B]MyCchars[0][/B] will contain the ASCII code for the character A. But remember, in C# these are still bytes, not characters. Use a cast to char if you want your bytes to … | |
Re: Simple really,just append the text with the + operator : [B]txtOutput.Text = txtOutput.Text + "my new text";[/B] | |
Re: brain mapping, memory mapping, gene mapping, texture mapping, spiritual mapping etc., etc. Please explain what university mapping is. | |
Re: DiamondDrake, is it possible to call the form click handler from inside the panel click handler or is your VERY instructive example(thanks) the "best" way to do this? | |
Re: I will concentrate on your question here. Put all the code inside your OK_Click handler in a new method : private void Guess() Inside the OKClick put the following: (just a suggestion here) [CODE=csharp]const int MaxTries = 3; for (int Tries = 1; Tries <= MaxTries; Tries++) { Guess(); } … | |
Re: What about a bible translated in Russian, Portugese, Chinese? All the same code? Or does it count only for Hebrew? The original was in Greek or Armenian I'm not sure. Never mind, my question is why should one language be preferred over anotherone to derive "meaningfull bible codes" from it? | |
Re: s="hello,\n+ I am \n+"fine\n: WHAT is that?!?? I think you mean something like : string s = "hello,\n" + "I am \n" + "fine\n"; Use the Split function to accomplish what you want. | |
Re: What is your "trouble" with the input? [B]gNum = Console.ReadLine(); guessNum = int.Parse(gNum);[/B] can be written as [B]guessNum = int.Parse(Console.ReadLine());[/B] ----------------------------------------------------------------- [B]string x = Console.ReadLine();[/B] can be written as [B]Console.ReadKey();[/B] Is it this you want? P.S. In the future use code tags, and don't post 1000 lines of code saying … | |
Re: Read this : [url]http://www.daniweb.com/forums/thread196171.html[/url] it has examples of write, but read should not be that hard. There are many others on this site. Did you know this site has a search function? Try it out! |
The End.