4,439 Posted Topics

Member Avatar for iustitia

This is a recent thread on how you can do it: [url]http://www.daniweb.com/forums/thread351266.html[/url] Another tip: Put your buttons in an Array or Collection so you can easiky place them on the form via a loop. In this case I should not do it via the designer.

Member Avatar for shootermac
0
159
Member Avatar for terdie
Member Avatar for ddanbe
0
262
Member Avatar for nayansaurabh
Member Avatar for nayansaurabh
0
126
Member Avatar for xanawa

As example: Just ask yourself what a [B]table order [/B]needs. Nr. of persons? Date and time of arrival of the party? Special wishes: only veg food, comes with dog, needs big chair etc. Etc. All these are candidates for a column in this DBtable.

Member Avatar for xanawa
0
105
Member Avatar for james6754

I would do instantiation when it is needed, be it in the Main method or not.

Member Avatar for ddanbe
0
86
Member Avatar for sheennave
Member Avatar for moshe12007

@Mitja Right, but you would have the textboxes in the order they are added to the Controls collection of the form, is that always OK?

Member Avatar for moshe12007
0
169
Member Avatar for spunkywacko
Member Avatar for bart89

This works: [CODE=c#]namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void pictureBox1_Paint(object sender, PaintEventArgs e) { } private void pictureBox2_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; g.DrawLine(new Pen(new SolidBrush(Color.RoyalBlue), 15), new Point(pictureBox2.Width, 0), new Point(0, pictureBox2.Height)); } } }[/CODE] Just …

Member Avatar for jonsca
0
89
Member Avatar for Usmaan

To add an application icon: Doubleclick the properties map in the solution window. In the window that opens, under the application tab, you can browse to add your icon.

Member Avatar for Mitja Bonca
0
95
Member Avatar for AngelicOne

This may help: [url]http://social.msdn.microsoft.com/Forums/en/winforms/thread/876b6517-7306-44b0-88df-caebf3b1c10f[/url]

Member Avatar for Mitja Bonca
0
240
Member Avatar for vegaseat

After all these years there is nothing wrong with this code. I used Visual Studio C# 2008.

Member Avatar for anucom
0
714
Member Avatar for Momerath

Great! It teaches me a lot to see your class design. This is my own humble contribution from a time ago [url]http://www.daniweb.com/code/snippet217212.html[/url] My BubbleSort is a bit different and I have a sort called straight insertion sort. Maybe you could add them to your collection. I found it always fun …

Member Avatar for Momerath
3
829
Member Avatar for trume
Member Avatar for jashmin

Hi Jashmin welcome here. You could search this site or google: example [url]http://social.msdn.microsoft.com/Forums/en/csharpgeneral/thread/ef11a193-54f3-407b-9374-9f5770fd9fd7[/url]

Member Avatar for Momerath
0
136
Member Avatar for carlitosway17

Try this Console.WriteLine("{0}, {1}, {[B]2[/B]}, {[B]3[/B]} ", name, patientnumber, condition, timein);

Member Avatar for carlitosway17
0
125
Member Avatar for Usmaan

Just use one click handler instead of twenty or so. [CODE=c#]private void button1_Click(object sender, EventArgs e) { Button btn = sender as Button; //find out which button letter = btn.Text; //get the letter //etc }[/CODE] Let all the eventhandlers point to the same Click.

Member Avatar for ddanbe
0
703
Member Avatar for Farhad.idrees

This was tested and works: [CODE=c#]private void button1_Click(object sender, EventArgs e) { while (listBox1.SelectedItems.Count > 0) { listBox1.Items.Remove(listBox1.SelectedItem); } }[/CODE]

Member Avatar for ddanbe
0
200
Member Avatar for saurabhtiwari

Did you start to have a look [url=http://msdn.microsoft.com/en-us/library/system.net.ipaddress.aspx]here[/url]?

Member Avatar for kvprajapati
0
85
Member Avatar for blueman:-0

Perhaps it has something to do with the autoscroll property of your Panel. Have a look here : [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.scrollablecontrol.autoscroll.aspx[/url] Why are you adding your textbox to the controls collection of the Form and to the controls collection of panel2 ? btw: [B]I am the blue man![/B]

Member Avatar for ddanbe
0
164
Member Avatar for Usmaan

Use the Contains method of the string class: [CODE=C#]if (word.Contains(input)) //other code here[/CODE]

Member Avatar for Momerath
0
97
Member Avatar for valter

This calls for a Dictionary [CODE = c#]static void Main(string[] args) { const int ArLen = 5; Dictionary<int, int> Statist = new Dictionary<int, int>(); var Stat = new int[ArLen]{34, 35, 43, 42, 18}; int[] indexes = new int[ArLen]{0, 1, 2, 3, 4}; for (int i = 0; i < ArLen; …

Member Avatar for Momerath
0
2K
Member Avatar for james6754

Correct. This is an example [CODE=c#]int i = 42; double d = i; //implicit conversion double dd = (double)i; //explicit conversion, in this case not needed //d and dd become 42.0[/CODE] An abstract method is implicity virtual, so you can override it.

Member Avatar for ddanbe
0
137
Member Avatar for Jessurider

Perhaps something like [CODE=c#]if (MyprogressBar.Value == 100) { Form1.Hide(); Form2.Show(); }[/CODE]

Member Avatar for Jessurider
0
86
Member Avatar for 303factory
Member Avatar for 303factory
0
112
Member Avatar for vijeevvv

Perhaps [url=http://www.csharp-examples.net/string-format-datetime/]this overview[/url] can help.

Member Avatar for vijeevvv
0
119
Member Avatar for AngelicOne

Reading [url=http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/32eed283-9af9-4077-8330-8ffc02d9891b/]this[/url] may help.

Member Avatar for Mitja Bonca
0
360
Member Avatar for ajinkya112

Don't know what dB1DataSet1.Tables["TT"] is but that table probably contains no rows. The string [COLOR="Red"]code [/COLOR]is empty or null, so SubString complains it cannot index it.

Member Avatar for Momerath
0
136
Member Avatar for Kath_Fish

Have a look here [url]http://www.daniweb.com/forums/thread350292.html[/url]

Member Avatar for Kath_Fish
0
327
Member Avatar for Kath_Fish
Member Avatar for virusisfound

Have you tried a DataGridView control? It gives you the ability to store data (be it numbers, pictures or dates etc.) in rows and columns. Look [url=http://www.daniweb.com/code/snippet335171.html]at this snippet[/url] for a very simple way how to do this.

Member Avatar for prvnkmr194
0
148
Member Avatar for arjunpk

It is not a menu it is a dialog window. It can appear after clicking on a menu item an button etc. This dialog does not seem so hard to make and would be a good exercise in exploring the IO namespace.

Member Avatar for ddanbe
0
98
Member Avatar for james6754

So, are you talking about some sort of math tutor program, with questions about shapes?

Member Avatar for james6754
0
113
Member Avatar for Kath_Fish

Did this [url]http://www.daniweb.com/forums/thread348827.html[/url] not help you? If not ask a question.

Member Avatar for Momerath
0
210
Member Avatar for Kath_Fish
Member Avatar for jonsca
0
94
Member Avatar for Momerath

Great idea! Cannot give you rep because I can do that only once in 24 hours to the same person I think. So the rep turned into a 1. I have posted some time ago 3 snippets that together form a Console calculator( an expression evaluator really) could be that …

Member Avatar for ddanbe
3
2K
Member Avatar for wijithapaw

In [B]Solution Explorer [/B]you can also use [B]Add reference [/B]to add a dll to your project.

Member Avatar for sgollapu
0
1K
Member Avatar for McvR
Member Avatar for ddanbe
0
181
Member Avatar for AngelicOne

Many Click events of the DataGrridView show a DataGridViewCellEventArgs [CODE=c#]private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { // e.RowIndex and e.ColumnIndex }[/CODE] This class gives you access to the row and column.

Member Avatar for Mitja Bonca
0
799
Member Avatar for virendra_sharma

This is C code, very little needs to be changed. Change sqrt to Math.Sqrt. I would not return an int but a boolean so the last lines should return ture or false and your method should return a boolean type off cource.

Member Avatar for Momerath
0
184
Member Avatar for arjunpk

Have a look at this thread: [url]http://www.daniweb.com/forums/thread196171.html[/url]

Member Avatar for ddanbe
0
157
Member Avatar for ddanbe

I was wondering why are there so many methods for adding a row to a DataGridView consisting of textboxes. I have 4, if you find more let me know. Have made a WindowsFormsApp and put on it a DataGridView, with 3 standard columns to it and a button with the …

Member Avatar for ddanbe
1
619
Member Avatar for JOSheaIV

I should not use DataGridView here. Think more of a Panel on which you draw a 9x9 grid in any size, shape, thikness and color you want.

Member Avatar for ddanbe
0
654
Member Avatar for Kath_Fish

[QUOTE=Kat_Fish]no no.... I give a simple example..[/QUOTE] I don't understand anything of all your number rubbish. Could you give a clear and concise example? How many numbers are there? How many of them are used? Is the order of the numbers important? Can you repeat a number?

Member Avatar for Kath_Fish
0
99
Member Avatar for vishal.patil

Perhaps this could do the trick: [CODE=C#]namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string StrFromFile = "8=FIX.4.39=6135=534=149=IDE50=FX52=20101219-18:05:01.52256=SAXOQUOTE10=171"; char[] chArray = StrFromFile.ToCharArray(); // your separator char seems to be char 1 string[] SplitStrs = StrFromFile.Split(new char[] {(char)1}); string ResultStr = string.Empty; for (int i = 0; i …

Member Avatar for mcriscolo
0
415
Member Avatar for sneha mehta

Headers do not exist in C#. You can say [CODE=c#]using System;[/CODE] [B]using [/B]is a keyword, [B]System [/B]is a namespace I don't know what the System.Transaction namespace is.

Member Avatar for Momerath
0
94
Member Avatar for Kath_Fish

You have to collect(append) the first part of all your lines read in a new line. Do the same for the second and so on. Write these lines to a new file.

Member Avatar for ddanbe
0
255
Member Avatar for JudeV
Member Avatar for ajayb
Member Avatar for peter_budo
0
185
Member Avatar for neptunethought

You could use the SetCursorPosition for that [url]http://msdn.microsoft.com/en-us/library/system.console.setcursorposition(v=VS.85).aspx?appId=Dev10IDEF1&l=EN-US&k=k(READKEY);k(DevLang-[/url]

Member Avatar for ddanbe
0
189

The End.