4,439 Posted Topics
Re: I usually rather use a DataGridView instead of a TextBox. I use this class (can be extended if you like) to handle stuff in with Excel in C#. // **************************************************** // // Class to manipulate and work with Excel files in C# // DM 2.2.2009 // // **************************************************** using System; … | |
Re: Instead of using a list, use a Label. Append your result string to the Text property of the Label. | |
Re: Well? What are you waiting for to start working out and start coding your homework assignment? If you encounter problems, feel free to post them here. Success! | |
Re: Hi chen.vang.3 and Serena_1, welcome at DaniWeb :) @chen.vang.3 if you make an effort to browse my snippets, you might find something of your liking. :) | |
Re: If you got your custormerID, construct your file path with it. `string path = @"c:\MyPictFolder\custormerID.jpg";` Now open the picture. Have a look at FileStream, to see how to do that if you would have trouble with it. | |
Re: Hi Maven, welcome to DaniWeb :) Set your variable `smallest` to an arbitrarily large number, bigger than any number in your data set. Test `smallest` with every element of your array in your two loops on line 31. If you find an element smaller than `smallest` set smallest equal to … | |
Re: Hi Zyxl, welcome at DaniWeb :) You cannot learn a language from a book alone. You learn the most by doing a project. But if you just start a new language, don't directly start with trying to write the next fancy 3D rendering program in it. Start small, to get … | |
Re: raw scetch of how I should start to do it: revprint(int n) { if n==0 return cout<<n%10 revprint(n/10) } | |
Re: > if the path is valid or not With Regex you could test if a pathstring is valid or not. I'm certain there are many examples of this to be found on the web. | |
Re: Iterate through whole your original string(the one to find). If char by user is equal, change the '_' in that position in the string on the screen. Should work for any number of chars. Happy computing :) | |
Re: Simply said: return is needed to tell your program to return to the place where it was, before this function was called. But I agree with deceptikon, that a closing brace could do this trick equaly well. It depend on the compiler designers I guess. | |
Re: Why not use a [DateTimePicker control](http://www.c-sharpcorner.com/uploadfile/mahesh/C-Sharp-datetimepicker-control/) directly on your form? Much less validation to do. Just put a label `Arrival date:` and next to it a DateTimePicker etc. And remember that within a period of 5 years, ther is at least one leap year. The [TimeSpan](http://msdn.microsoft.com/en-us/library/system.timespan(v=vs.110).aspx) structure will help you … | |
Re: To draw a line on a form is exactly the same as to draw a line on a printer. | |
Re: Multiply by -1 if the number is negative. Use an if statement. | |
Re: "Facsimile" is derived from Latin and it just means: "Made in the same way." It is usualy used for a remake of an old book. This word is then mostly written on the first or last page of the book. Personally I would not put time and effort in a … | |
Well, start a new forms application from VS. In design mode, drop a DataGridView and a Button on the form and fill in the code. The button clickhandler will add an extra totals row to the datagrid. Here it will keep adding and totaling, which is of course meaningless, but … | |
Re: Hi kareem.keko.35 welcome at DaniWeb. If you used a lot of loops, you must have a lot of code. Post the parts of it you have trouble with. We are just waiting here to help you out. | |
Re: MSDN is a great place to look for info. Have a look [here](http://msdn.microsoft.com/en-us/library/system.windows.forms.keyeventargs.keycode(v=vs.110).aspx). | |
Re: In C#, a literal like `279.99` is considered of type `double`. C# is very strict about typing(I like that btw.), so a `float` is not a `double`. The error message is very clear on how to remedy this. Instead of using the concatenation operator in your WriteLines I would use … | |
Re: There is no "best" language just learn a language you feel comfortable in. For me this is now Visual Studio with C# and Python, but I started with FORTRAN, BASIC, Pascal, Modula-2 etc. | |
Re: > form4.report2.show() > but the error is in the fastreport itself thank you Could you please be a little more cryptic? Your statement was too easy to understand... | |
Re: My penny of advice: Don't start to run before you can walk. :) | |
Re: Welcome to DaniWeb, sudharsanravij :) Could you explain, what exactly do you mean by *property file*? | |
Re: foreach (DataGridViewRow row in dataGridViewX1.Rows) { if (row.Cells[1].Value.ToString().Equals(MyTextBoxText)) { //do whatever } } Something like this perhaps? | |
![]() | Re: By **line** you mean charactercount IN a line of text? ![]() |
Re: The compiler has not the faintest idea what `ux.name` means, hence your error in the code. Try something like this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication5 { public class Myux_class { public Myux_class() //default constructor { } string name; string email; int age; //.... … | |
| |
Re: Welcome Albert! Hope you like staying here as much as I do! | |
Re: When you type in code, it hapens often as you type that error messages are generated. The compiler compiles while you are typing. Most of those errors disapear as your coding becomes completed. Errors that stay often dissapear also by building your solution. The errors that stay after this action … | |
Re: Why don't you start with [WPF](https://www.google.be/webhp?sourceid=chrome-instant&rlz=1C1LDJZ_enBE500BE501&ion=1&espv=2&ie=UTF-8#q=wpf%20vb%20net%20tutorial)? Windows Presentation Foundation. | |
Re: Hi Brent welcome! Working with GetEnumerator and MoveNext is a bit old style I guess. The 2013 C# compiler is smart enough to figure that out for you. Use something like this:(just a pseudocode) foreach (string s in itemstoremove) { mylistBox.Items.Remove(s); } Your method is also doing a lot of … | |
Re: Check for something like this: Dim Name As Process() = Process.GetProcessesByName("myProccess") Now check if the array Name contains something. If it does your process is running and doesn't have to be started again. | |
Re: Hi Mauricio 3, welcome at DaniWeb. Are you in an infinite loop? Do you clear your variables after calculation? You question is not very clear. Please provide some extra info. | |
![]() | Re: *... Imagine no possessions I wonder if you can...* I'm with John. All the code I ever posted here belongs to anyone and no one. Earn money with it if you can, but don't sue me for it, if it hurts. It is not my "possession". BTW half of it … |
Re: Way back in the previous century there was a saying that code that was TOP SECRET so that nobody could view it, was mostly code that was so badly written that it was a shame to show it to other people... | |
Re: You could type in a key and xor it with a username password. You could look at this snippet for encryption [url]http://www.daniweb.com/code/snippet1009.html[/url] | |
Re: Google is your friend:[example](http://www.codeproject.com/Articles/690207/Csharp-Project-on-Database-for-Beginners) | |
Re: Please read [the rules](https://www.daniweb.com/community/rules)! | |
Mine is: > *procrastination* Don't ask me why. I guess it's the succession of vowels o a i e u | |
Re: Please post the code you have so far. Even if if it does not much. | |
Re: Why can't you? Just set a breakpoint on the line where you want debugging to start. | |
Re: If you would show us your code on how you did the mean calculation, that would help us alot to provide you an answer to your question. | |
Re: I tried this code: int determinedaycode(int year) { int d1, d2, d3; d1 = year / 4; d2 = year / 100; d3 = year / 400; return 1 + (year + d1 + d2 + d3 + 1) % 7; } Seems to work, I only cannot garantee this … | |
Maybe a bit silly question, but in one of my projects I needed an enum and I suddenly wondered what would be the best place for it to write it in a file. Should it be in a .cs file of his own or could I place it in the … | |
Re: > Our professors told us that he have > given us everything we need but we don't have any > idea. Why not ask your professors what it is they haven't told you to solve your assignment? | |
Re: If you're designing a game or something like that you can let all your beasts loose regarding design. It does not matter that much. It is something totaly different if you want to produce a "business sort of application". Design is indeed an art on it's own. @Ange1ofD4rkness: had similar … | |
Re: Radiobuttons are definitly the way to go here. If you ever see a vintage transitor radio, you could select a channel by pushing a button, whichwould cause one of the other buttons to deselect automaticaly. Did you ever wonder why those little round things were called RADIObuttons? |
The End.