4,439 Posted Topics
Re: 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. | |
Re: Try this : [url]http://www.andzelika.co.uk/TCPsockets.pdf[/url] | |
Re: 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. | |
Re: I would do instantiation when it is needed, be it in the Main method or not. | |
| |
Re: @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? | |
Re: wordId on line 37 is not defined. and where is wordIdFunc = 2; ? | |
Re: 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 … | |
Re: 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. | |
Re: This may help: [url]http://social.msdn.microsoft.com/Forums/en/winforms/thread/876b6517-7306-44b0-88df-caebf3b1c10f[/url] | |
Re: After all these years there is nothing wrong with this code. I used Visual Studio C# 2008. | |
Re: 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 … | |
Re: 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] | |
Re: Try this Console.WriteLine("{0}, {1}, {[B]2[/B]}, {[B]3[/B]} ", name, patientnumber, condition, timein); | |
Re: 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. | |
Re: 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] | |
Re: Did you start to have a look [url=http://msdn.microsoft.com/en-us/library/system.net.ipaddress.aspx]here[/url]? | |
Re: 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] | |
Re: Use the Contains method of the string class: [CODE=C#]if (word.Contains(input)) //other code here[/CODE] | |
Re: 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; … | |
Re: 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. | |
Re: Perhaps something like [CODE=c#]if (MyprogressBar.Value == 100) { Form1.Hide(); Form2.Show(); }[/CODE] | |
Re: [CODE=c#]int i = (int)sourceType.ME;[/CODE] this should make i=1 | |
Re: Perhaps [url=http://www.csharp-examples.net/string-format-datetime/]this overview[/url] can help. | |
Re: Reading [url=http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/32eed283-9af9-4077-8330-8ffc02d9891b/]this[/url] may help. | |
Re: 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. | |
Re: Have a look here [url]http://www.daniweb.com/forums/thread350292.html[/url] | |
Re: Perhaps use the string Trim method? | |
Re: 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. | |
Re: 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. | |
Re: So, are you talking about some sort of math tutor program, with questions about shapes? | |
Re: Did this [url]http://www.daniweb.com/forums/thread348827.html[/url] not help you? If not ask a question. | |
Re: 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 … | |
Re: In [B]Solution Explorer [/B]you can also use [B]Add reference [/B]to add a dll to your project. | |
Re: Try to see what you can do with the Anchor property of a control. | |
Re: 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. | |
Re: 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. | |
Re: Have a look at this thread: [url]http://www.daniweb.com/forums/thread196171.html[/url] | |
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 … | |
Re: 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. | |
Re: [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? | |
Re: 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 … | |
Re: 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. | |
Re: 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. | |
Re: Do you think it helps by posting this question in the C# forum? | |
Re: 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] |
The End.