4,439 Posted Topics
Re: Could you post your includes etc. code please. | |
Re: There is more fault tolerance to be build in. Have a look at [this snippet](https://www.daniweb.com/software-development/csharp/code/371819/code-template-for-a-menu-in-a-console-application-). | |
Re: Same as you would do in a console aplication. | |
Re: A basic recur**S**ion question is: Write a recursive function to implement the factorial function. | |
Re: Line 18 and 19(and following) What is the purpose of D1 = txt1(0).Text D1 = txt2(0).Text You set a variable D1 to something and immediately to something else. BTW whenever you see something like D1,D2,D3,D4 etc. you should turn this into an array. | |
Re: You where using classes from the .NET framework when your where building your Windows form application. To say that stackoverflow sucks does not help us to solve your problem. We like to see some code and exact error messages. ![]() | |
Hi all, Want to write some data from C# to Excel. Code enough I thought, here at DANI's and on the web. So I managed to come up with this : [CODE=csharp]private void DoExcel(string Fname) { Microsoft.Office.Interop.Excel.ApplicationClass excel = null; Microsoft.Office.Interop.Excel.Workbook wb = null; Microsoft.Office.Interop.Excel.Worksheet ws = null; Microsoft.Office.Interop.Excel.Range rng … | |
Re: If you are using Visual Studio, in solution explorer window, right click your solution,-->Add-->New Item-->Windows Form. Call this from your button click handler. | |
Re: The expression *"is not working"* should be mentioned in the rules, together with the well known 4 letter words etc. | |
Re: For structures of equal size you could try an indexed sequential file. Google. | |
Re: If you are using Visual Studio, in solution explorer window, right click your solution,-->Add-->New Item-->Windows Form. Call this from your button click handler. *** If a monitor reads this, I guess this thread belongs in the C++ section *** | |
Re: I don't see the problem. This is how my VS Express looks:  Just select a Windows Forms Application from the dialog that appears after chosing New Project, give it a name and click ok. And there it it is, your .NET framework project! | |
Re: Hi Navee30 welcome at DaniWeb! If you consider that your application executable is like a [raisin cake](http://www.bbcgoodfood.com/recipes/5396/almond-raisin-cake-with-sherry), the resources are the raisins in the dough. They are embedded. Only your app knows how to reach them. There isn't a path to them, only to the application. | |
Re: AS I understand your question well: What you want is a windows form app with two splitted panels. One containing the code and the other the output? | |
Re: I have a binary clock in my C# code snippet section, with this code. public static int ReadBit(int number, int BitPosition) { int i = number & (1 << BitPosition); //i=2^^Bitposition return (i > 0 ? 1 : 0); } This is C#, but I guess it reads like C++. … | |
Re: >It's not working. Well, you tell me what is wrong with my car, if I tell you this:"My car is not working." Please specify WHAT is not working in your program. | |
Re: Do you mean something like this(example 3)? 0011 or 3333 3 3 3 3 3 3333 | |
Re: Hmm, not bad, but according to the OP's drawing could it not be something like this? cout << " /|\\ " << endl; cout << " / | \\ " << endl; cout << " / *|* \\ " << endl; cout << " / * | * \\ " … | |
Re: Why should we do your homework? Send us what you have and we'll correct it. | |
Re: Hi parkp, welcome at DaniWeb. Are you using Visual Studio? You have to explicitly make a windows form application to do that, not a console application. | |
Re: If I would implement more than 3 accounts I would use a vector of Account. Here's a good [tutorial](http://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c4027/C-Tutorial-A-Beginners-Guide-to-stdvector-Part-1.htm) about vector. | |
Re: By sending us what you tried in code! Be it good or bad. But only then we can help solve your question. | |
Re: Or you might open a filedialog in your buttonclick like this : [CODE=csharp] OpenFileDialog dlg = new OpenFileDialog(); dlg.Title = "Open bitmap or jpeg."; //dlg.Filter = "jpg files (*.jpg);*.jpg;*.* | bmp files (*.bmp); *.bmp"; if (dlg.ShowDialog() == DialogResult.OK) { this.fotoPictureBox.Image = new Bitmap(dlg.OpenFile()); } dlg.Dispose();[/CODE] | |
Re: Without some code sample, we can say little to what is happening here. | |
Re: If you moved the WriteLine, you also have to move the definition on line 53. This definition was still in the context or scope of your Sum53 method and out of the context of the moved WriteLine. | |
Re: Do you think more than 400 lines of code are going to impress anyone here? Ifyou want code for quicksort, just google. | |
![]() | Re: Define powerfull in this context. :) |
Re: The only time `Found` will be true is when the condition on line 21 is true. There you break and use `Found` to break out of the other loops. Use a `goto label` here! This is one of those rare conditions where a goto is useful. I think even Stroustrup … | |
Re: If you want to avoid duplicate code use a method. In this case call it `doCalculation` or something like that. | |
Re: Go to my snippet section or that of others here. Try to improve or modify some, or get some ideas to rework them in your own project. | |
Re: Change line 28. Instead of `for (int j =2; j <= floor(sqrt(i)); j++)` use `int EndVal = floor(sqrt(i));` `for (int j =2; j <= EndVal; j++)` Now, the functions floor and sqrt are only called once. Oh and perhaps this for (int i = 3; i < MAX_INTERVAL; i += … | |
Re: Visual Studio is just an integrated development environment. Which computer language you like to use in it? C#, VB.NET, C++, F#, Python? | |
Re: Put this in your button click handler private void button1_Click(object sender, EventArgs e) { for (int i = 3; i >= 0; i--) { if (i ==0) { MessageBox.Show("Please try again", "Error"); } else { textBox1.Text = i.ToString(); MessageBox.Show("Continue?", "OK"); } } } | |
Re: Open your bitmap in Paint. Pick up the colour with the pipette. Have a look at the RGB values in the color dialog of the Paint application. .NET has a set of named colors and I don't think you can change that. Her is a snippet I made once to … | |
Re: OK, why don't you? We can't wait to see the results. | |
| |
Re: We don't do homework, show us what you have written yourself if you ever hope to get some help. | |
Re: Do you like to know something about the div and mod operators? Does the word *please* means anything to you? | |
Re: No! You are supposed to do that, so do it. Post your work over here and we will gladly try to solve all your problems. | |
Re: Google! [Example](https://www.youtube.com/watch?v=CyHZPyLmmQg). | |
| |
Will the console prompt ever support unix commands Like in the Apple Terminal? | |
This is just for fun. You know how old you are(I hope), but do you know how many days you are walking around on this planet? The two routines presented here could be used more practically in an ever present employee application. | |
Re: See under my avatar. Why don't we all make love and forget about war! It dates from the 60ties or something, but it is still VERY actual. O, and "making love" has not always the meaning of what rabbits do all the time... ![]() | |
Re: You could probably use [this method](https://msdn.microsoft.com/en-us/library/system.char.isletter%28v=vs.110%29.aspx) to start with. | |
Re: Every time it highlights the word, augment a counter. | |
Re: Too many to name; Three that pop up: *rubberman, ketsuekiame, decepticon.* | |
|
The End.