4,439 Posted Topics
Re: Why you want to do that? Just use the Sort method of the array. | |
Re: Try this : [CODE=c#]int i = 123456789; //string s = i.ToString("##,##,##,###"); -->will not work string s = i.ToString("##-##-##-###"); // --> will work s = s.Replace('-', ',');[/CODE] | |
Re: What about [url=http://www.wired.com/wiredscience/2007/10/forward-40-wher/]LOGO[/url]? | |
Re: If you want to get a list of the named colors, try this: http://www.daniweb.com/software-development/csharp/code/217206/any-color-you-like | |
Re: >>An actual GUI.?? You have : [B]Console.Read(); Console.ReadLine(); Console.ReadKey();[/B] to choose from. Look up their use in help or MSDN | |
Re: @Ryshad Yes, I do this also when confronted wih this kind of "problems". Although these days I prefer the wonderfull debugger that comes with VS! | |
Re: As a chemistry student in 1971 I programmed in FORTRAN IV, I punched holes in cards. I gave them to the administrator and recieved a printer listing with lots of errors. :S | |
Re: Try to do some file handling first: [url]http://www.dotnetperls.com/file[/url] | |
Re: Try using LINQ! Made a form with two listboxes and the names you have, it gave me the correct results. [CODE=C#]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace ListBoxLINQ { public partial class Form1 : Form { public Form1() { InitializeComponent(); … | |
Re: Do you use a comma or a point as decimal separator? .NET prefers a point. | |
Re: I would do what viljoed does, but I would put my buttons in an array or a list for easy handling. | |
Re: Hi zukazen, welcome. :) You have to do a coordinate transformation. Look at the plot class code in this snippet:[url]http://www.daniweb.com/software-development/csharp/code/410098[/url] | |
Re: To test for a minus you could use e.KeyCode == Keys.OemMinus Why are you setting MaxLength to 1 ? | |
Re: You might try this: [CODE=C#]private void button1_MouseHover(object sender, EventArgs e) { // check if this point stays within bounds of the button // for longer then 2 secs. Point CP = Cursor.Position; }[/CODE] | |
Start a new console application and fill in the about 70 lines of code in the Program.cs file. Run and enjoy! | |
Re: You are casting to an int=int32. Should that not be long=int64 ? | |
Re: You usually get this exception if you try to access a private method. Could you give us the complete error message? | |
Re: Label and TextBox controls both have a Visible property that can be set to true or false. | |
Re: Only allow "legal" chars to be typed. Implement the methods used in this snippet; [url]http://www.daniweb.com/software-development/csharp/code/217265[/url] If you you want to allow the minus sign you have to add something like is done on line 23 of the code. Success! | |
Re: Don't think it is possible from VS directly. Why don't you make it a learning project for yourself! Start coding in C# right away! | |
Re: Hi, dujdaran, welcome! We are all friendly girls and boys overhere, but I think nobody of them is prepared to do your homework for you. Show some effort first, if yoy have some problems on the way, we will try to help. :) | |
Re: [B]MyButton.Location = new Point(11,11); [/B]would position the upper left part of your button at the point 11,11 | |
Re: Hi Dirzy, welcome :) Perhaps you could draw the face of a die in the console app. Take a look at these console members: [url]http://msdn.microsoft.com/en-US/library/system.console_members(v=VS.80).aspx[/url] Look especially for the SetCursorPosition method. Success. | |
Re: Try the FullName property [url]http://msdn.microsoft.com/en-us/library/system.io.filesysteminfo.fullname.aspx[/url] | |
Re: Perhaps [url=http://support.microsoft.com/kb/314945]this article[/url] can help you out. | |
Re: A PrintPreview Control is meant for what it says: previewing what the application is possible going to print. It is not meant for textprocessing. | |
Re: It is like swimming. If you want to learn to swim you got to get your feet wet sometime or the other. Start slowly : [url]http://www.daniweb.com/software-development/csharp/code/335171[/url] Many tutorials on dgv can be found on you.tube & google. | |
Re: Start with an array of 16 numbers. You could shuffle it:[url]http://www.daniweb.com/software-development/csharp/code/269487[/url] or randomly sort it: [url]http://stackoverflow.com/questions/375351/most-efficient-way-to-randomly-sort-shuffle-a-list-of-integers-in-c-sharp[/url] | |
Re: PLease use code tags when posting code. Maybe you could apply a modulo operator. [CODE=C#]Myvalue = MyOtherValue % 256; // Myvalue will always between 0 and 255[/CODE] | |
Re: [url]http://www.dreamincode.net/forums/topic/44330-printing-in-c%23/[/url] | |
Re: Indeed, MessageBox is horrible in this situation. If at all possible prevent the user from typing wrong, I mean if the textbox accepts numeric input, don't allow the user to type some letters. Use a ComboBox or radiobuttons etc. instead of a textbox, if possible. | |
Re: Also have a look at this snippet;[url]http://www.daniweb.com/software-development/csharp/code/217168[/url] were I somewhat circumvented the "problem" of complex numbers. | |
Re: @m1412 do not just copy code readand understand the code first.Line 10 of Mitja's previous code contains the word [B]stirng[/B], this should be [B]string[/B]! He does this all the time to see if those who just copy stay alert:D | |
Re: I'm just guessing you are using a windows forms application. Make your menu in the designer and install Click handlers for all your menuitems(submenus of submenu etc. included) No need for a complicated switch case senario! | |
Re: Also have a look at this. Use a MessageBow, Label or TextBox to show the strings, intead of WriteString. | |
Re: You never have something like [B]Athletes athlete1 = new Atletes();[/B] This tells the compiler to reserve some memory space to hold the info about athlete1. Because Event is a reserved keyword in C#, I don't think your code will work as you intended. I should change the word into Meeting … | |
Re: Try this: [url]http://www.gemboxsoftware.com/support/articles/open-xls-xlsx-ods-csv-net?gclid=COKjuvClua4CFccl3godPQQBOQ[/url] Found it by using the rearch function(top, right) of this site. Many more related items fcan be found. | |
Re: Don't really get what you mean by [QUOTE]How do i get private bool ReadAndValidateName(out string name) and price in to the textboxes[/QUOTE] You also have two Click events for the same button?Line 84 and 109. Generated in the developer while doubleclicking twice on your OKbtn I guess. | |
Re: Floating point calculations can be a tricky buisness. Try [B]double [/B]and see if you have the same problems. Suggestion for reading: [url]http://en.wikipedia.org/wiki/Floating_point#Machine_precision[/url] | |
Re: Put line 32 in the default clause of the switch statement. Remove lines 28&29 set menu to a starting value, other then 0. | |
Re: You don't need a Setname method, if you have a class with a public field "Name". Just use [B]people[i].Name = Console.ReadLine();[/B] | |
Re: Reformulate your question in a new thread, you might get an answer! Do not resurrect old threads! | |
Re: Start a new windows forms app. Open the Form.cs file and add the extra code after the //+++ [CODE=C#]namespace WindowsFormsApplication1 { public partial class Form1 : Form { //+++ private System.Windows.Forms.Button MyBtn; public Form1() { InitializeComponent(); //+++ this.MyBtn = new System.Windows.Forms.Button(); this.MyBtn.Location = new System.Drawing.Point(100, 100); this.MyBtn.Name = "MyBtn"; this.MyBtn.Size … | |
Re: He, that's what I had to do very often during my professional IT period some 25 years ago! Opening a file, read line by line, make changes according to some "rules" found in another file or in a hard coded table, writing the changed line to a new file, until … | |
Re: I think , by making some adaptations to this : [url]http://www.daniweb.com/software-development/csharp/code/238532[/url] you will get it done. | |
Re: Hi, andur92, welcome to this site. :) Sure we can help! Have you tried something for yourself so far? | |
Re: Hi dresdor, welcome. My first advice is: If you just found out what you can do with mortar and bricks, don't start building a big cathedral, start with a little house for the dog. Second advice would be start learning about UI elements of a form, like buttons, DataGridview(your "spreadsheet"), … | |
Re: Could you show us some code? You could also [url=http://msdn.microsoft.com/nl-be/vcsharp/bb798026]watch this video[/url].It tells something on how you can handle a background in a button. |
The End.