4,439 Posted Topics
Re: I always found [url=http://www.daniweb.com/code/snippet217193.html]this code snippet [/url] a very good one, about this subject. Can I remind everyone who likes to know, that this site has a [B]search [/B]function? | |
Re: Use the forms Invalidate or Refresh methods in your Button Click handler. These methods will somehow call your Form1_Paint method. | |
Re: If [B]date[/B] is of type DateTime you can do: [CODE=c#]CalendarMyMeetings.SelectedDate = date;[/CODE] If your date has another format, convert it to year, month and day and use: [CODE=c#]DateTime mydate = new DateTime(year, month, day); CalendarMyMeetings.SelectedDate = mydate;[/CODE] | |
Re: Google [B]3D matrix in C#[/B] You will find things like this: [url]http://www.vcskicks.com/3d_gdiplus_drawing.php[/url] Succes! | |
Re: Say L is the last character in your filename.(Same as Fname.Length-1) Then Fname.Substring(L-3,L); should do the trick. | |
Re: :ooh: Yeah, every morning the sun comes up. | |
Re: Graduation project? >>[I]I'm new to the c# world as I only have c/c++ programming skills ... [/I] Use the skills you have, if you have to do it in C#: START LEARNING IT!!! As a matter of fact you are a graduate student, right? Or am I just a moron … | |
Re: Perhaps you could have a look at this snippet: [url]http://www.daniweb.com/code/snippet217420.html[/url] | |
Re: Perhaps you could also have a look at this snippet: [url]http://www.daniweb.com/code/snippet217420.html[/url] | |
Re: Sure, if you have two buttons, each can have a click event. | |
Re: Hi Kami3, welcome on DaniWeb! Look on this site for info, use the search function. I found this: [url]http://www.daniweb.com/forums/thread245701.html[/url], there is more. Perhaps [url=http://www.andzelika.co.uk/TCPsockets.pdf] this site[/url] can also help. | |
Re: Like andrewll2 is saying, the code: [B]int[] myarray1 = myArray; [/B] Makes myarray1 and myArray point to the same memory location. So, if you change one array element it will also be changed in the other array. | |
Re: GDI (G raphics D evice I nterface) or any other STROUMPF interface for that matter, whether it is slower or faster, is not at hand here! I suggest to the OP to show some code of what he has already done. | |
Re: Prime numbers have been done so many times before, that if you do a search on this site, you will find what you need. | |
Re: What is the value of c in shufCards.Add(cards[c]); in your shuffle routine? | |
Re: To make a Graphic dissapear you could first draw one. Wait 3 secs or watever. Draw the same grhaphic again but with the Brush in the backgroundcolor of the form. Wait 3 secs or whatever. Draw the graphic again with a Brush in the color you had before. | |
Re: Every recursive operation has to have some kind of stopping condition. If not, you can create a stack overflow or some other error. Look at the classic example of the factorial calculation: [CODE=C#]uint factorial(unint n) { if (n <= 1) { return 1; // stopping condition } else { return … | |
Re: Perhaps you could change this struct, so that it fits your 3 byte scheme: [CODE=C#]struct IntBits { private int _bits; public IntBits(int InitialBitValue) { _bits = InitialBitValue; } //declare indexer public bool this[int index] { get { return (_bits & (1 << index)) != 0; } set { if (value) … | |
Re: In Console.WriteLine, {0} acts as a placholder for a value to be put in a string. So [B]Console.WriteLine("Enter Value p[{0}]:", i);[/B] (Let i in the for loop be 3) would print out: [COLOR="Green"]Enter Value p[ 3 ]: [/COLOR] I would prefer to change this to [B]Console.WriteLine("Enter Value Number {0} :", … | |
Re: [QUOTE]However i want to move onto java. i want to learn oop[/QUOTE] Strange, you say you are very good with C++. That you want to learn Java, I can understand, but C++ has among other things, multiple inheritance... Did you missed the oop part of the C++ language? | |
Re: Instead of [B]Convert.ToString(i)[/B] you could use [B]i.ToString()[/B] | |
Re: Use SuspendLayout. Make all your checkboxes. Use ResumeLayout. On a side note, this snippet might interest you: [url]http://www.daniweb.com/code/snippet217338.html[/url] | |
Re: You should check that the divisor (in your case variable [B]b[/B]) is not zero. You cannot divide by zero. you cannot do that in math, so why do you think a computer, which consists mainly of silicon(from sand), copper and plastic, is able to do that? If you use [B]void … | |
Re: You could use textbox.Text.Lenght. If you have a multiline textbox, use the Lines property wich return an array of strings. | |
Re: IMHO you should not use two buttons, but to radiobuttons in a groupbox control. When you click on label 'a' show the contents of the dictionary according to the setting in the radiobox group. | |
Re: Don't know anything about Matlab, but from the looks of your error message it seeems like you are using a 2D array instead of a 1D array. Hope it helps a bit. | |
Re: Or use a boolean flag. If it is true show picture and set the flag to false. If it is false, hide picture and set the flag to true. | |
Re: In the snippets section you can find this snippet : [url]http://www.daniweb.com/code/snippet217193.html[/url] | |
Re: Hi finito, I think the OP meant more something like [url=http://www.codeproject.com/KB/cs/nested_csclasses.aspx]this[/url] | |
Re: Start a new forms app and fill in the code below. Hope it helps you out. [CODE=c#]namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); int numberOfDays = 30; int Xpos = 10; int Ypos = 0; for (int i = 0; i <= numberOfDays; … | |
Re: Could you post some examples of the values you get with ToInt and ToString? | |
Re: Does it have to be MSchart? If not, have a look at [url=http://www.daniweb.com/code/snippet217204.html]this snippet.[/url] | |
Re: Use something like this: [CODE=c#] while (true) { //do your thing }[/CODE] Use a [B]continue;[/B] statement to stay in the infinite loop or leave it with a [B]break;[/B] statement. | |
Re: I had some good times, I had some bad times. Like everybody else I guess. So if you cannot put here at least 1000 memorable moments of your life, you better start thinking of throwing yourself under a train. I am not going to do either of those! The good … ![]() | |
Re: If you feel confortable with VB and mostly write things for yourself, why even ask? Just carry on! But. As all things evolve, so do computers and programming languages. I programmed (as a pro)in a language called Modula-2. Liked it very much. I can still program in that language if … | |
Re: This should work: Start a new forms app, drop a button on it and implement its click event. Next fill in the timer code you see below: [CODE=c#]namespace WindowsFormsApplication1 { public partial class Form1 : Form { Timer T = new Timer(); public Form1() { InitializeComponent(); T.Interval = 1000; //Tick … | |
Re: I find [url=http://www.amazon.co.uk/Programming-Windows-Three-Dimensional-Presentation-Foundation/dp/0735623945/ref=sr_1_1?ie=UTF8&s=books&qid=1273843972&sr=1-1]this[/url] a very good book. And BTW all the books by Charles Petzold are good! (That is my personal opinion) | |
Re: What also works, strange as it may be: [CODE=c#]for( ; ; ) //loop forever { //code here }[/CODE] | |
Re: He, my refrigerator does not work, tell me how to solve it! This is the same sort of question you are posing. Please tell us EXACTLY what is not working whit your code and we'll be glad to help you out.:) | |
Re: Don't see any bolded code, could ou be more specific? | |
Re: As I already said in earlier threads, I don't care so much about all those points and stars etc. They are a nice thing to have though (it's a sort of "stimulus" to carry on), but they are not essential. More important is that I can help people(especially the newbies) … | |
Re: Hi Florinmoc, welcome here! I always have had an interest in computers. As a laboratory worker I had the opportunity to work on a data sharing project on the compagny I work for. It was mainly a task of programming in Modula-2.(Some sort of Pascal and some 20 years ago) … | |
Re: You could use the arrow keys to scroll in your text or use the ScrollBars property of the TextBox to the setting you want. | |
Re: Hi clownContagion, welcome here! If you posted some code, this would really help. What would you do, if I asked you to repair my bike, but I would not show it to you? EDIT: please use code tags if you post code. | |
Re: I could add to the suggestions Diamonddrake has given you, that a [B]Pen [/B]object has a [B]StartCap [/B]and [B]EndCap [/B]property, which are of a [B]LineCap [/B]enumeration type. If you choose the value ArrowAnchor for one of those properties, you can draw an arrow by just doing a [B]DrawLine[/B]. | |
Re: In lines 9 and 15 of your code, you are just writing the text of the radiobutton to a file. If your radiobutton1 text was "Mickey Mouse" and if it was checked, your file would contain the text "Mickey Mouse". | |
Re: Hi George_Williams, welcome here. Let me remind you that C# has no functions, we call them [B]methods [/B]in C# parlance. Further Visual Studio has a marvel called Intellisence, so I don't mind typing a '(' or ')' from time to time. | |
Re: Perhaps do it this way: Make a standard forms application and fill in this code: [CODE=C#]namespace WindowsFormsApplication1 { public partial class Form1 : Form { public const int MaxLen = 10; public const int ButtonSide = 40; // Declare empty 2D button array of 100 buttons private Button[,] MyButtons = … |
The End.