4,439 Posted Topics

Member Avatar for havejeet

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 …

Member Avatar for ddanbe
0
165
Member Avatar for efficacious

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 …

Member Avatar for ddanbe
0
141
Member Avatar for honeybits

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.

Member Avatar for efficacious
0
133
Member Avatar for bokr66

This thread already is about what you want I think. [url]http://www.daniweb.com/forums/thread180533.html[/url]

Member Avatar for ddanbe
0
128
Member Avatar for dip7

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.

Member Avatar for ddanbe
0
101
Member Avatar for serkan sendur

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, …

Member Avatar for verruckt24
1
256
Member Avatar for Robtyketto

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?

Member Avatar for iamthwee
0
251
Member Avatar for preetchhabra

It's visual here but not visual C++ so post your question on the C++ forum.

Member Avatar for ArkM
0
74
Member Avatar for Bramenator

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; …

Member Avatar for swain
0
178
Member Avatar for bekicot

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.

Member Avatar for ddanbe
0
62
Member Avatar for tintincute

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?

Member Avatar for tintincute
0
133
Member Avatar for shazzy99

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.

Member Avatar for ddanbe
0
119
Member Avatar for bekicot

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 …

Member Avatar for bekicot
0
105
Member Avatar for havejeet

I think reading this will help : [url]http://www.codeproject.com/KB/miscctrl/SimplePersistentFormCS.aspx[/url]

Member Avatar for Diamonddrake
0
121
Member Avatar for FallenPaladin

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?

Member Avatar for Diamonddrake
0
463
Member Avatar for flash121

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.

Member Avatar for flash121
0
80
Member Avatar for En-Motion

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.

Member Avatar for Teme64
0
178
Member Avatar for dip7

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.

Member Avatar for Diamonddrake
0
136
Member Avatar for David2009
Member Avatar for DevC++4.9.9.2

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.

Member Avatar for ddanbe
0
156
Member Avatar for ddanbe

[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 …

Member Avatar for ddanbe
0
159
Member Avatar for kanjah

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.

Member Avatar for ddanbe
0
52
Member Avatar for shazzy99

You can use the OpenFileDialog or FolderBrowserDialog from the toolbox.

Member Avatar for ddanbe
0
177
Member Avatar for Undream

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]

Member Avatar for BestJewSinceJC
0
140
Member Avatar for abhay_pundir

You might also want to read the article [url]http://support.microsoft.com/kb/306572/[/url]

Member Avatar for serkan sendur
0
162
Member Avatar for waphon
Member Avatar for Egypt Pharaoh
Member Avatar for shaviraghu
Member Avatar for dev_kc
Member Avatar for HBMSGuy

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 …

Member Avatar for Diamonddrake
0
178
Member Avatar for DaveD3

Does [B]e.Graphics.DrawString("Hello world", aFont, aBrush, aPoint); [/B] work?

Member Avatar for kvprajapati
0
119
Member Avatar for Bhoot

Maybe this snippet might get you some ideas: [url]http://www.daniweb.com/code/snippet982.html[/url]

Member Avatar for ddanbe
0
232
Member Avatar for Poab9200

[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?

Member Avatar for ddanbe
0
260
Member Avatar for moro2009

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.

Member Avatar for margani
0
127
Member Avatar for luvsom

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

Member Avatar for WaltP
0
129
Member Avatar for functionalCode

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.

Member Avatar for functionalCode
0
93
Member Avatar for gooddevilgod

This snippet does some basic statistical things : [url]http://www.daniweb.com/code/snippet992.html[/url] Hope it helps.

Member Avatar for ddanbe
0
134
Member Avatar for Egypt Pharaoh

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.

Member Avatar for kvprajapati
0
133
Member Avatar for Diamonddrake

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; } …

Member Avatar for Diamonddrake
0
6K
Member Avatar for ddanbe

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, …

Member Avatar for ddanbe
0
832
Member Avatar for sivak
Re: oops

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.

Member Avatar for Diamonddrake
0
61
Member Avatar for bigN

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.

Member Avatar for ddanbe
0
431
Member Avatar for Jarrex

Put the foods and the calories together in an array of struct and sort the struct.

Member Avatar for SLORE
0
327
Member Avatar for amorphis88

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.

Member Avatar for amorphis88
0
101
Member Avatar for bordedhananjay

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.

Member Avatar for ddanbe
0
40
Member Avatar for serkan sendur

[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 …

Member Avatar for ddanbe
0
104
Member Avatar for Delija

You could also try [url]http://www.dijksterhuis.org/implementing-a-generic-binary-tree-in-c/[/url]

Member Avatar for ddanbe
0
490
Member Avatar for asilbek

IMHO you can not derive from SqlDataReader. The ExecuteReader method of the SqlCommand class will return a SqlDataReader.

Member Avatar for asilbek
0
117
Member Avatar for pranjalkumar
Member Avatar for Ancient Dragon

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!

Member Avatar for ddanbe
0
533

The End.