4,439 Posted Topics

Member Avatar for saqi1986
Member Avatar for klklklk
0
1K
Member Avatar for vinnijain

Try this : [CODE=c#]int i = 123456789; //string s = i.ToString("##,##,##,###"); -->will not work string s = i.ToString("##-##-##-###"); // --> will work s = s.Replace('-', ',');[/CODE]

Member Avatar for Momerath
0
2K
Member Avatar for sneekula

What about [url=http://www.wired.com/wiredscience/2007/10/forward-40-wher/]LOGO[/url]?

Member Avatar for Sanchixx
0
482
Member Avatar for Cap'nKirk

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

Member Avatar for Cap'nKirk
0
125
Member Avatar for BobLewiston

>>An actual GUI.?? You have : [B]Console.Read(); Console.ReadLine(); Console.ReadKey();[/B] to choose from. Look up their use in help or MSDN

Member Avatar for passerbyJim
0
489
Member Avatar for panpwintlay

@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!

Member Avatar for Momerath
-1
1K
Member Avatar for lxXTaCoXxl
Member Avatar for NetJunkie

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

Member Avatar for Reverend Jim
0
966
Member Avatar for alanbrazil

Try to do some file handling first: [url]http://www.dotnetperls.com/file[/url]

Member Avatar for thines01
0
230
Member Avatar for Behseini

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(); …

Member Avatar for mtns
0
2K
Member Avatar for zukazen

Do you use a comma or a point as decimal separator? .NET prefers a point.

Member Avatar for zukazen
0
150
Member Avatar for welshly_2010

I would do what viljoed does, but I would put my buttons in an array or a list for easy handling.

Member Avatar for ddanbe
0
159
Member Avatar for zukazen

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]

Member Avatar for zukazen
0
168
Member Avatar for xavier93
Member Avatar for icekid5

To test for a minus you could use e.KeyCode == Keys.OemMinus Why are you setting MaxLength to 1 ?

Member Avatar for icekid5
0
2K
Member Avatar for Andy90

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]

Member Avatar for ddanbe
1
117
Member Avatar for ddanbe

Start a new console application and fill in the about 70 lines of code in the Program.cs file. Run and enjoy!

Member Avatar for ddanbe
2
408
Member Avatar for sharon.chapman7
Member Avatar for NPDA

You usually get this exception if you try to access a private method. Could you give us the complete error message?

Member Avatar for NPDA
0
123
Member Avatar for sha1023012

Label and TextBox controls both have a Visible property that can be set to true or false.

Member Avatar for dwarvenassassin
0
107
Member Avatar for s_mostafa_h

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!

Member Avatar for s_mostafa_h
0
87
Member Avatar for nicewave

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!

Member Avatar for skatamatic
0
90
Member Avatar for dujgaran

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. :)

Member Avatar for syd919
0
237
Member Avatar for nicewave

[B]MyButton.Location = new Point(11,11); [/B]would position the upper left part of your button at the point 11,11

Member Avatar for nicewave
0
188
Member Avatar for dirzy

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.

Member Avatar for Mitja Bonca
0
288
Member Avatar for emreozpalamutcu

Try the FullName property [url]http://msdn.microsoft.com/en-us/library/system.io.filesysteminfo.fullname.aspx[/url]

Member Avatar for emreozpalamutcu
0
165
Member Avatar for sah
Member Avatar for ddanbe
0
452
Member Avatar for eoop.org

A PrintPreview Control is meant for what it says: previewing what the application is possible going to print. It is not meant for textprocessing.

Member Avatar for ddanbe
0
183
Member Avatar for nicewave

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.

Member Avatar for ddanbe
0
145
Member Avatar for AleWin

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]

Member Avatar for ddanbe
0
416
Member Avatar for amir808

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]

Member Avatar for ddanbe
0
178
Member Avatar for gogs85
Member Avatar for gogs85
0
98
Member Avatar for zachattack05

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.

Member Avatar for zachattack05
0
181
Member Avatar for lxXTaCoXxl

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.

Member Avatar for skatamatic
0
301
Member Avatar for manal-19

@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

Member Avatar for Mitja Bonca
0
237
Member Avatar for Orbea

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!

Member Avatar for Mitja Bonca
0
144
Member Avatar for poloblue

Also have a look at this. Use a MessageBow, Label or TextBox to show the strings, intead of WriteString.

Member Avatar for sknake
0
176
Member Avatar for TrueCoding

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 …

Member Avatar for TrueCoding
0
261
Member Avatar for manhthaodn

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.

Member Avatar for manhthaodn
0
179
Member Avatar for Johan__

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.

Member Avatar for ddanbe
0
153
Member Avatar for lxXTaCoXxl

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]

Member Avatar for skatamatic
0
172
Member Avatar for kahheng93

Put line 32 in the default clause of the switch statement. Remove lines 28&29 set menu to a starting value, other then 0.

Member Avatar for kahheng93
0
148
Member Avatar for RFID

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]

Member Avatar for dwarvenassassin
0
194
Member Avatar for D19ERY

Reformulate your question in a new thread, you might get an answer! Do not resurrect old threads!

Member Avatar for skatamatic
0
143
Member Avatar for DavidKroukamp

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 …

Member Avatar for DavidKroukamp
0
341
Member Avatar for notuserfriendly

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 …

Member Avatar for thines01
0
304
Member Avatar for codechrysalis

I think , by making some adaptations to this : [url]http://www.daniweb.com/software-development/csharp/code/238532[/url] you will get it done.

Member Avatar for codechrysalis
0
2K
Member Avatar for andur92

Hi, andur92, welcome to this site. :) Sure we can help! Have you tried something for yourself so far?

Member Avatar for dwarvenassassin
0
607
Member Avatar for dresdor

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"), …

Member Avatar for darkelflemurian
0
235
Member Avatar for Taximus

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.

Member Avatar for ddanbe
0
97

The End.