4,439 Posted Topics
Re: 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 … | |
Re: Perhaps a look at this may help:[url]http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx[/url] | |
Re: 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 | |
Re: 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. | |
Re: 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 | |
Re: 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. | |
| |
Re: Try classinprac1 a = new classinprac1 (); nov8prac1.a.classinprac2(); | |
Re: If you search DaniWeb you can find this in the snippet section: [url]http://www.daniweb.com/software-development/csharp/code/217409[/url] | |
Re: 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] | |
Re: 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] | |
Re: Perhaps a look at [url=http://www.daniweb.com/forums/thread279582.html]this thread[/url] and the links you find in it could help? | |
Re: For this kind of behavior it is best to use two radiobuttons in a GroupBox. | |
Re: 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 … | |
Re: Perhaps googling "neural network in c sharp" can help? | |
Re: 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] | |
Re: 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. | |
Re: 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] | |
Re: MSDN is a good source: [url]http://msdn.microsoft.com/en-us/library/aa288436(v=vs.71).aspx[/url] | |
Re: Just for your information:[url]http://www.daniweb.com/software-development/csharp/code/217168[/url] | |
Re: 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#. | |
Re: 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 … | |
Re: [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!" | |
Re: Perhaps a look at [url=http://www.daniweb.com/software-development/csharp/code/256776]this snippet[/url] may help also. | |
Re: 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 ! | |
Re: 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. | |
Re: 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 ? | |
Re: 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 … | |
Re: 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 … | |
Re: 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] | |
Re: 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 | |
Re: 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. | |
Re: 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! | |
Re: @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? | |
| |
Re: 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. | |
Re: Use your imagination, your brain is a wonderfull resource full of projects. :) | |
Re: If you create a new form and you don't assign its owner property I guess nothing much will happen. | |
Re: 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. | |
Re: Does your teacher know we live in century XXI? I guess he is probably too lazy to write a new syllabus:( | |
Re: 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. | |
Re: 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] | |
Re: Don't understand your question very well. And what is CDrawer? | |
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 … | |
Re: Debugging? Or if you don't want the user to click your DGV, hide the window and show it again after the download. | |
Re: 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. | |
Re: [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 … | |
Re: Some info (you could have found this yourself) about namespaces: [url]http://msdn.microsoft.com/en-us/library/z2kcy19k.aspx[/url] | |
Re: Hi, Bountyhuntr, welcome at daniweb :) Perhaps [url=http://www.daniweb.com/software-development/csharp/code/256776]this C# snippet[/url] can solve your problem. |
The End.