4,439 Posted Topics
Re: Make an empty WindowsApplication. Add a CheckedListBox via the toolbox. Add the following lines after InitializeComponent(); in the Form1 constructor : [CODE=csharp]public Form1() { InitializeComponent(); this.checkedListBox1.Items.Add("azerty"); this.checkedListBox1.Items.Add("querty"); this.checkedListBox1.Items.Insert(1, "boe"); }[/CODE] The first two lines add two strings, the thirth line inserts a string between these two strings. Index 1 meaning … | |
Re: If you are so keen on coding, why don't you write a complete windows application in assembler? I am also a learner(this is a great site to learn from btw) I use the IDE and Intellisence of VS C# 2008 just as serkan suggests. And believe me there is still … | |
Re: Ever heard of oblivion? The twilight zone? What would you think will happen if a user types y or n (or whatever) to [QUOTE]//ask the customer do they want to run the program again Console.Write("Run again <yes/no>:"); Console.ReadLine();[/QUOTE] Try it out, come back and tell me your findings. | |
Re: This thread already is about what you want I think. [url]http://www.daniweb.com/forums/thread180533.html[/url] | |
Re: In your timer_Tick eventhandler, instead of updating the Text of a label, update your application or do anything else you like to do here. | |
Re: Don't change your name Serkan! Way back when the emperor Napoleon ruled over a great part of Europe, people(the common people that is) just had a forename. People would refer to each other like so: Mary, the sister of Jane who lives around the corner, or the son of John, … | |
Re: Do you think there are users of your application out there who want to search through a 45000+ lines combobox to find the city they want? ![]() | |
Re: It's visual here but not visual C++ so post your question on the C++ forum. | |
Re: I'm still learning much about C#. I don't like globals very much, especially if they are a name followed by a number, but lets say this is not at hand here. So what is wrong if I do it this way? [CODE=csharp]public class GlobalVariables { public GlobalVariables(){} private int result6; … | |
Re: Took me 5 secs to come up with this: [url]http://en.wikipedia.org/wiki/Hue[/url] [url]http://en.wikipedia.org/wiki/Histogram[/url] Collecting hue data from an image and put them into an histogram cannot be that difficult. | |
Re: It would be greatly appreciated, that in the case you have an error you would tell us WHAT error you are experiencing! The only thing I can come up with(after a long look at your code) is that [B]filename [/B]is empty when you call System.IO.File.WriteAllText, perhaps use [B]save.FileName [/B]here? | |
Re: Simple [CODE=csharp]namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int[] MyNums = { 1, 2, 3, 4, 5 }; foreach (int i in MyNums) { if (i == 3) break; Console.WriteLine(i); } Console.ReadKey(); } } }[/CODE] This should only print 1 and 2 to the console. | |
Re: If you can put your data in an array or list, this has to be an easy job. e.g. for the mean : Loop through each element in the array Add element to a sum variable At the end divide the sum by the total elements in the array. Hope … | |
Re: I think reading this will help : [url]http://www.codeproject.com/KB/miscctrl/SimplePersistentFormCS.aspx[/url] | |
Re: This snippet might help : ( at least the delegate part ) [url]http://www.daniweb.com/code/snippet1012.html[/url] A delegate of type [B]function [/B]is created. I can let it point to different functions which I can feed to one method. I don't have to use pointers the compiler takes care of that. Isn't that amazing? | |
Re: Sure it's possble. Check out the RotateTransform method of the Graphics object. Second way to do it is make a GrahicsPath object with your rectangle and rotate the path with the Matrix class out of the System.Drawing.Drawing2D namespace. | |
Re: What is wrong with the following in btnAdd_Click ? Dim total As Double = CDbl(txtNum1.Text) + CDbl(txtNum2.Text) That way you don't need number1 and number2. Now convert total back to text and update txtTotal.Text. | |
Re: A message box says just what it is : a messagebox. You can do lots of things whith it but it was not primarily designed to do the things you want. Create a sepatate form for that. | |
Re: So you just want a TITLE??? | |
Re: In design mode select your listbox. Go to the properties window(usually low right). Select events(click on the lightning bolt icon. Scroll to MouseDoubleClick and fill in a name you like (e.g. MyMouseDblClick) Press enter and see what happens. Continue from there. | |
[CODE=csharp]private void txb_keydown(object sender, KeyEventArgs e) { //check if A key was pressed if (e.KeyCode == Keys.A { //OK } }[/CODE] The above code works fine, but how can I do this for the % key? Looked everywhere, I can check for the tilde key etc. but I can't seem … | |
Re: That is a very vague, misty, hazy question. What configuration? Which media file audio, video etc.? Please rephrase your question. You will more likely get more answers. | |
Re: You can use the OpenFileDialog or FolderBrowserDialog from the toolbox. | |
Re: Search Amazon. My first hit was : [url]http://www.amazon.com/Discrete-Mathematics-Introduction-Software-Engineers/dp/0521386225/ref=sr_1_1?ie=UTF8&s=books&qid=1241864495&sr=1-1#[/url] | |
Re: You might also want to read the article [url]http://support.microsoft.com/kb/306572/[/url] | |
Re: :icon_exclaim: :icon_rolleyes: :icon_mrgreen: | |
Re: What exactly do you mean by [B]margin area[/B] ? | |
Re: What do you mean by [B]call d class library [/B] ? | |
Re: We do not say an application has focus, we say an application is activated (meaning it is the foreground application) It continually checks (via its dispatcher or eventloop) for keydowns, mouseclicks etc. and processes them furter as it sees fit. You could perhaps start a background process to do what … | |
Re: Does [B]e.Graphics.DrawString("Hello world", aFont, aBrush, aPoint); [/B] work? | |
Re: Maybe this snippet might get you some ideas: [url]http://www.daniweb.com/code/snippet982.html[/url] | |
Re: [QUOTE=Poab9200]".lnk" file) and we all know what this file does(points to the file of which was linked)[/QUOTE] ??? I know a linker is a part of some compilers. Do you mean command line arguments? You seem to know that, so what is your problem? | |
Re: What your code is actually doing is : open a textfile read the whole text fill a textbox with the text close a textfile Do yo see any repetition here? I don't. You fill the textbox with the same text every time you click your button. | |
Re: He's counting his digits from right to left Walt. So IMHO it has to be more something like this : (pseudocode) number = 12345; n = 4; //we seek the fourth digit from the right num = number / 10^(n-1); digitvalue = num % 10; //this we want | |
Re: A ProgressBar has a Step property, which together with the Minimum and Maximum properties are used by the PerformStep() method. MyBar.Minimum=0; MyBar.Maximum=100; MyBar.Step=2; Use MyBar.PerformStep(); somewhere in a loop. | |
Re: This snippet does some basic statistical things : [url]http://www.daniweb.com/code/snippet992.html[/url] Hope it helps. | |
Re: Can you understand this? [url]http://msdn.microsoft.com/en-us/library/6x16t2tx.aspx[/url] It seems a good explanation to me. If it ain't clear, please come back with your questions. | |
Re: Maybe this helps : [CODE=csharp]// This event occurs after the KeyDown event and can be used to prevent // characters from entering the control. private void MyButton_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyCode == anarrowkey) { // Stop the character from being entered into the control. e.Handled = true; } … | |
I have a form with a readonly textbox, some layoutpanels with some buttons in it and together they make up a calculator. (Yes I know this is YAC (yet another...)) but I have fun while still learning! When I click the buttons and manipulate the Text property of the textbox, … | |
Re: I don't understand, if you know the concept of all the things you mentioned, could you explain to me why you need examples? If I know the concept on how to drive a car, I could give you plentyfull of examples on how to do it. | |
Re: Perhaps you need to use a splitcontainer control. I used one once. The left panel I filled with a treeview control, the right panel I filled with info from the item selected in the treeview. | |
Re: Put the foods and the calories together in an array of struct and sort the struct. | |
Re: If you just have this one, suggest you translate it to VB! e.g. the line [B]Regex re = new Regex(strRegex);[/B] would translate to [B]Dim re As New Regex(strRegex)[/B] etc. | |
Re: Search Google, lots of stuff! I typed [B]marquee on form in C#[/B] and got as first hit: [url]http://www.codeproject.com/KB/miscctrl/csmarquee.aspx[/url] Happy computing. | |
Re: [QUOTE=Serkan Sendur]to avoid repetation of setting properties to labels?[/QUOTE] After Ramy posted you a snippet you said : nice idea. Ramy was setting properties to controls, is that not a contradiction with your first post? Anyway, this snippet might also help you out : [url]http://www.daniweb.com/code/snippet1171.html[/url] P.S. Btw. your guitar playing … | |
Re: You could also try [url]http://www.dijksterhuis.org/implementing-a-generic-binary-tree-in-c/[/url] | |
Re: IMHO you can not derive from SqlDataReader. The ExecuteReader method of the SqlCommand class will return a SqlDataReader. | |
Re: I would reserve more bit space for the mantissa. Up to 64 or even more. | |
Re: Ancient Dragon > strange... what a simple but sincere wish and a funny musical site can cause... It is obvious by now that meat eaters, when celebrating Easter, slaughter little yellow chickens and s uck out their blood while still alive! |
The End.