4,439 Posted Topics

Member Avatar for astha_malik

Perhaps something like this: [CODE=C#] namespace Cube { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Paint(object sender, PaintEventArgs e) { // draw in the form Draw(e.Graphics, 100); // a cube of 100 pixs wide } public void Draw(Graphics G, int width) { int …

Member Avatar for Shwetha Dali
-1
6K
Member Avatar for destruct0

Perhaps a look at this may help:[url]http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx[/url]

Member Avatar for ddanbe
0
59
Member Avatar for techlawsam

You could also use this snippet: [url]http://www.daniweb.com/software-development/csharp/code/217189[/url] Here, pure by accident :sweat: I avoided the problem with integer calculations, Momerath is talking about

Member Avatar for techlawsam
0
186
Member Avatar for rocketman03

I am assuming you are working with positive integers. Tell me how can quotient = num/16 ever be negative? You are testing for it in both functions.

Member Avatar for WaltP
1
440
Member Avatar for techlawsam

Practical example: [CODE=C#]double price; price = 10 / 3; price (double) 10 / 3;[/CODE] Line 2 sets price equal to 3.0 Line 3 sets price equal to 3,333333333

Member Avatar for techlawsam
0
180
Member Avatar for user543820

Your foreach loop runs so fast you will be at the word "cat" before you even notice it. Try putting in some slowing down in your loop, if you want to see each word seperately.

Member Avatar for user543820
0
4K
Member Avatar for OblibSystems
Member Avatar for csharplearner
Member Avatar for sailaja reddy
0
852
Member Avatar for sha2

If you search DaniWeb you can find this in the snippet section: [url]http://www.daniweb.com/software-development/csharp/code/217409[/url]

Member Avatar for ddanbe
0
295
Member Avatar for NeilA

Was there no practice done during the the C# course? What are the interests of your son? Say, he likes basketball, he could build a small database with pictures of his favorite players. You could also google: [B]practice assignments in C#[/B]

Member Avatar for skatamatic
0
54
Member Avatar for chathuD

DateTimePicker has a Value property which gives you a DateTime object. From this Value you can extract Hour,Minute and Second values. Alternatively you could use the DateTime ToString method with the appropriate format string to extract what you want.Example: [url]http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm[/url]

Member Avatar for Mitja Bonca
0
333
Member Avatar for priyad2

Perhaps a look at [url=http://www.daniweb.com/forums/thread279582.html]this thread[/url] and the links you find in it could help?

Member Avatar for Zvjezdan23
3
4K
Member Avatar for Kobrakai
Member Avatar for Kobrakai
0
184
Member Avatar for SyncMaster170

Plenty I guess: - - The game Tetris uses the arrow keys(see Teme64) to move the blocks on the screen. - - A handscanner could scan a barcode of some item, look up info of the item in a DB and present it in a ListBox. - - In a …

Member Avatar for ddanbe
0
106
Member Avatar for pilipinas
Member Avatar for SteveyD

Think you got a null reference exeption. You did not declare your byte array on line 3: Use something like this in C#: [CODE=c#]byte[] Data = new byte[256];[/CODE]

Member Avatar for SteveyD
0
1K
Member Avatar for Khyati Patel

Check if the Text property of the TextBoxes is not empty. Check if the Imageproperty of the PictureBoxes is not null. Check if the Itemsproperty of the Comboboxes is not empty.

Member Avatar for Mitja Bonca
0
97
Member Avatar for user543820

You can create a list of words like this: [CODE=C#]public List<String> Words = new List<String>();[/CODE] To add words to this list use the Add method: [CODE=C#]Words.Add("MyFirstword");[/CODE]

Member Avatar for Mitja Bonca
0
88
Member Avatar for shravya

MSDN is a good source: [url]http://msdn.microsoft.com/en-us/library/aa288436(v=vs.71).aspx[/url]

Member Avatar for ddanbe
0
66
Member Avatar for Asotop

Just for your information:[url]http://www.daniweb.com/software-development/csharp/code/217168[/url]

Member Avatar for skatamatic
0
140
Member Avatar for falconmick

Don't no about the VS 2010 Express version but in the Pro version you can program in Visual Basic, C#, C++ and even F#.

Member Avatar for ddanbe
0
168
Member Avatar for coroll

TRy this: Open a new forms application and fill in some code from what you see here: [CODE=C#]namespace WindowsFormsApplication2 { public partial class Form1 : Form { Button ShowBtn; // declare a button Form MyForm2; // declare a Form public Form1() { InitializeComponent(); // initialize a button ShowBtn = new …

Member Avatar for ddanbe
0
151
Member Avatar for vuyiswamb

[QUOTE=vuyiswamb]Eish i wonder how will i look when i grow old [/QUOTE] If you are afraid to grow old, think about this: Once you are born you are busy dying! So: "Rejoice, rejoice, we have no choice, but to carry on!"

Member Avatar for vuyiswamb
1
237
Member Avatar for fka

Perhaps a look at [url=http://www.daniweb.com/software-development/csharp/code/256776]this snippet[/url] may help also.

Member Avatar for ddanbe
0
405
Member Avatar for perceptis

Hi, perceptis welcome here :) You will probably need to download a USB lib, because( to my knowlegde ) this is not supported in .NET. Google, example : [url]http://sourceforge.net/projects/libusbdotnet/[/url] Success !

Member Avatar for Ketsuekiame
0
246
Member Avatar for zachattack05

Perhaps you could have a look at the Visible property of the scrollbar, look [url=http://www.csharp-examples.net/check-scrollbars-visibility/]here[/url] for examples.

Member Avatar for zachattack05
0
1K
Member Avatar for walid86

Hi Walid, welcome on the Daniweb site :) I like to know what the meaning of newGraphics is on line 22 of your code. Could you not plain and simply write [B]pictureBox1.Image = Image.FromFile(openFD.FileName);[/B] on line 23 and remove lines 18 - 22 ?

Member Avatar for walid86
0
1K
Member Avatar for rainbow9

Do you mean something like this? (Coords of Location are not correct) [CODE=C#] public partial class Form1 : Form { private TextBox PTB public Form1() { InitializeComponent(); } private void pictureBox1_Click(object sender, EventArgs e) { PTB = new TextBox(); PTB.Location = new System.Drawing.Point(56, 193); PTB.Name = "textBox1"; PTB.Size = new …

Member Avatar for rainbow9
0
2K
Member Avatar for Dani

Apple delivers the free download[url=http://en.wikipedia.org/wiki/Xcode]Xcode IDE[/url] with every Macintosh. It is very comparable with Visual Studio and .NET. Don't know which one was first. I started with it in 2003 I guess. The language used was Objective-C and if you wanted to do some OO you had to write some …

Member Avatar for jbennet
0
466
Member Avatar for shandoosheri

You could use a for-loop like this: [CODE=C#]for (int i = 0; i < NumOfFiles; i++) { Filname = "Myfilename" + i.ToString(); // other code here }[/CODE]

Member Avatar for shandoosheri
0
165
Member Avatar for chandnigandhi

Have a look at MSDN e.g.: [url]http://msdn.microsoft.com/en-us/library/system.media.soundplayer.aspx[/url] You can also find usefull stuff on CodeProject

Member Avatar for ddanbe
0
125
Member Avatar for shrutipopat
Member Avatar for JOSheaIV

I once posted this snippet: [url]http://www.daniweb.com/software-development/csharp/code/238532[/url] It cannot be that hard to turn that into a forms app.

Member Avatar for Singlem
-1
190
Member Avatar for abiwax

You could use a modeless dialog (which is mostly just a new Form window) to fill in the kind of find and replace you want Then use a combination of the IndexOf, Replace and Length methods from the String class and the Select method from the TextBox class. Success!

Member Avatar for ddanbe
0
77
Member Avatar for rotten69

@rotten69: Just as a side note. Are you ever expecting dogs, baboons, mice, ants, little green man from Mars etc., to work with your application?

Member Avatar for kplcjl
0
182
Member Avatar for kapojian
Member Avatar for lolafuertes
0
174
Member Avatar for pseudorandom21

You cannot use a string like "MyString" for an operator. But suppose you like to make a class to handle [url=http://en.wikipedia.org/wiki/Maya_calendar]Maya dates [/url]. (Hot topic, this october I believe...:D ) Then you could write an overload of the + operator to add two Maya dates together.

Member Avatar for ddanbe
0
90
Member Avatar for pxndx

Use your imagination, your brain is a wonderfull resource full of projects. :)

Member Avatar for Obadiah1
0
95
Member Avatar for Jazerix

If you create a new form and you don't assign its owner property I guess nothing much will happen.

Member Avatar for ddanbe
0
102
Member Avatar for Obadiah1

Hi Obadiah1, welcome here. :) Without knowing the exact nature of your error, we can do very little and only guess that your [B]path[/B] does not lead to an image on your storage medium.

Member Avatar for Jazerix
0
124
Member Avatar for BlackHawck

Does your teacher know we live in century XXI? I guess he is probably too lazy to write a new syllabus:(

Member Avatar for Anuradha Mandal
-1
752
Member Avatar for pivotcity

Line 17: Console.ReadLine already returns a string so Convert.ToString is not needed. You could use the string property Lenght to test if a string is empty.

Member Avatar for pivotcity
0
296
Member Avatar for wizard_x

Hi wizard_x, welcome here :) I guess my Enlish is as good as yours! Your problem has not that much to do with OO, just read a good book on C# to get you on the way. Also, as documentation, have a look at this: [url]http://en.wikipedia.org/wiki/Mathematical_chess_problem[/url]

Member Avatar for ddanbe
0
120
Member Avatar for JudeV
Member Avatar for Momerath
0
1K
Member Avatar for ddanbe

What polar coordinates are is explained [url=http://en.wikipedia.org/wiki/Polar_coordinate_system]here[/url]. I wanted to draw some polar functions myself, so I changed my [url=http://www.daniweb.com/software-development/csharp/code/217204]plotting class [/url] a bit and added a polar struct to a new project.. Just posted code for the Plot class and the polar point structure here. You can find an …

2
1K
Member Avatar for bhagawatshinde

Debugging? Or if you don't want the user to click your DGV, hide the window and show it again after the download.

Member Avatar for bhagawatshinde
0
546
Member Avatar for sfrider0

Perhaps you could use the "Path" type like so [ICODE]Myfullpath = Path.GetFullPath(Myfile.txt)[/ICODE] This should return something like 'C:\MyFolder\MySubFolder\Myfile.txt' in Myfullpath.

Member Avatar for humar
0
249
Member Avatar for Shanti C

[QUOTE=Ancient Dragon]Today I learned that I have diabetes in my right eye. I've had the disease for about 10 years, and this was the first time my eye doctor detected any signs of it in my eye.[/QUOTE] Some 25 years ago, I had the disease too. I have been blinded …

Member Avatar for Netcode
0
924
Member Avatar for techlawsam

Some info (you could have found this yourself) about namespaces: [url]http://msdn.microsoft.com/en-us/library/z2kcy19k.aspx[/url]

Member Avatar for techlawsam
0
195
Member Avatar for Bountyhuntr

Hi, Bountyhuntr, welcome at daniweb :) Perhaps [url=http://www.daniweb.com/software-development/csharp/code/256776]this C# snippet[/url] can solve your problem.

Member Avatar for ddanbe
0
328

The End.