4,439 Posted Topics

Member Avatar for Curious Gorge
Member Avatar for killingmonk

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

Member Avatar for Leslie_1
0
245
Member Avatar for basit_3
Member Avatar for mobizeyai

A basic recur**S**ion question is: Write a recursive function to implement the factorial function.

Member Avatar for ddanbe
0
95
Member Avatar for senzeye
Member Avatar for Yugavashini

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.

Member Avatar for Yugavashini
0
442
Member Avatar for Mohamed_26

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.

Member Avatar for lithium112
0
331
Member Avatar for ddanbe

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 …

Member Avatar for HaiLuong
0
4K
Member Avatar for basit_3

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.

Member Avatar for basit_3
0
109
Member Avatar for Aditya_14

The expression *"is not working"* should be mentioned in the rules, together with the well known 4 letter words etc.

Member Avatar for ddanbe
0
104
Member Avatar for lp94
Member Avatar for basit_3

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 ***

Member Avatar for ddanbe
0
61
Member Avatar for Mohamed_26

I don't see the problem. This is how my VS Express looks: ![VS2013.png](/attachments/small/1/419608a1888433a92c00ec4e5d2de2d1.png "align-left") 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!

Member Avatar for ddanbe
0
363
Member Avatar for Navee30

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.

Member Avatar for JerrimePatient
0
9K
Member Avatar for parkp

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?

Member Avatar for ddanbe
0
142
Member Avatar for S-e-c-r-e-t

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++. …

Member Avatar for ddanbe
0
591
Member Avatar for basit_3

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

Member Avatar for ddanbe
0
237
Member Avatar for S-e-c-r-e-t

Do you mean something like this(example 3)? 0011 or 3333 3 3 3 3 3 3333

Member Avatar for basit_3
0
426
Member Avatar for shafiqkuidad

Hmm, not bad, but according to the OP's drawing could it not be something like this? cout << " /|\\ " << endl; cout << " / | \\ " << endl; cout << " / *|* \\ " << endl; cout << " / * | * \\ " …

Member Avatar for basit_3
0
251
Member Avatar for Emmanuel Atiemo

Why should we do your homework? Send us what you have and we'll correct it.

Member Avatar for basit_3
0
77
Member Avatar for parkp

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.

Member Avatar for basit_3
0
115
Member Avatar for Fares_1

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.

Member Avatar for ddanbe
0
163
Member Avatar for purejoy

By sending us what you tried in code! Be it good or bad. But only then we can help solve your question.

Member Avatar for ddanbe
0
54
Member Avatar for papuccino1

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]

Member Avatar for NetJunkie
0
2K
Member Avatar for NOVICE3
Member Avatar for JerrimePatient
0
146
Member Avatar for flebber

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.

Member Avatar for cgeier
0
299
Member Avatar for Hector_2

Do you think more than 400 lines of code are going to impress anyone here? Ifyou want code for quicksort, just google.

Member Avatar for rubberman
0
423
Member Avatar for vjcagay
Member Avatar for Petcheco

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 …

Member Avatar for Petcheco
0
349
Member Avatar for naz1234

If you want to avoid duplicate code use a method. In this case call it `doCalculation` or something like that.

Member Avatar for Reverend Jim
0
223
Member Avatar for dtpp
Member Avatar for ddanbe
0
98
Member Avatar for Curious Gorge

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.

Member Avatar for JamesCherrill
0
104
Member Avatar for Petcheco

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 += …

Member Avatar for Petcheco
0
258
Member Avatar for AlixGokai

Visual Studio is just an integrated development environment. Which computer language you like to use in it? C#, VB.NET, C++, F#, Python?

Member Avatar for ddanbe
0
67
Member Avatar for Yuki_1

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"); } } }

Member Avatar for Yuki_1
0
151
Member Avatar for judithSampathwa

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 …

Member Avatar for Jill_3
0
420
Member Avatar for Ahmed_62
Member Avatar for Ahmed_62
0
304
Member Avatar for jemdev03
Member Avatar for Mike_24

We don't do homework, show us what you have written yourself if you ever hope to get some help.

Member Avatar for ddanbe
0
60
Member Avatar for hadisur_rahman

Do you like to know something about the div and mod operators? Does the word *please* means anything to you?

Member Avatar for ShiftLeft
-1
890
Member Avatar for eng.basil

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.

Member Avatar for ddanbe
-1
80
Member Avatar for Abu Thahir
Member Avatar for ddanbe
0
86
Member Avatar for Abdul_32
Member Avatar for ddanbe

Will the console prompt ever support unix commands Like in the Apple Terminal?

Member Avatar for rubberman
0
335
Member Avatar for ddanbe

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.

Member Avatar for ddanbe
0
729
Member Avatar for jkon

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

Member Avatar for Warrens80
0
322
Member Avatar for jd3189

You could probably use [this method](https://msdn.microsoft.com/en-us/library/system.char.isletter%28v=vs.110%29.aspx) to start with.

Member Avatar for DaveAmour
0
391
Member Avatar for Ishmam
Member Avatar for happygeek

Too many to name; Three that pop up: *rubberman, ketsuekiame, decepticon.*

Member Avatar for XP78USER
0
612
Member Avatar for Derorim

The End.