4,439 Posted Topics
Re: Mitja, why do you want to let a ListView behave like a DataGridView? Just use a DataGridView as I already suggested to you in a previous thread. A programmer must be able to leave a programming idea when it leads to too many complications and (how hard it may seem) … | |
Re: Use c = Console.ReadKey(true); true means, don't show char on console. Remember c is not a char, but is of type ConsoleKeyInfo. Edit: Jonsca was quicker :) | |
Re: Thread.Sleep(100000); Yuo have to add also: using System.Threading; | |
Re: Use something like this in your Click event handler : [CODE=c#] Button theBtn = sender as Button; theBtn.Enabled = false;[/CODE] and in design mode assign the same Click handler to all your buttons. | |
Re: Hi gbrunete, welcome on Daniweb! Invalidate does not alwyas raises a Paint event immidiately. Use Refresh in that case. | |
Re: In this snippet [url]http://www.daniweb.com/code/snippet217338.html[/url] I override the Onpaint method of a CheckBox. (With the help of Scott btw!) Is it this kind of thing you want? There is also the automatic property syntax so you don't have to define a private field anymore. | |
Re: Could you point out in your code where the error occurs? | |
Re: Just add a new SplitContainer in one of the splitted panels. | |
Re: Maybe consider this book [url]http://issc.uj.ac.za/graphics/index.html[/url] Full of C# code for image manipulation, but not for the faint of heart:ooh: I'm rather math oriented, but this one goes deep! Perhaps look at Amazon for more explanation. | |
Re: I'm from Belgium. I usually order just one item, just to avoid that problem. | |
Re: Hi BobFX! Welcome at DaniWEB! C certainly still has it's merits. But C evolved to C++ and C# for a reason. You should try to make a mindshift here. C# has no variables, it has "fields". C# has no subroutines it has "methods". Everything in C# is a class. If … | |
Re: In line 10 you tell the compiler that [B]className [/B]is a string. In line 12 you tell it that [B]className [/B]is Stuff. That's why you are getting the error you get. | |
Re: How did you construct your inputArrayList? From a file? From input via the console? | |
Re: SubItems[0].Text is the text in the first column, use SubItems[1].Text So Line 1 of your code checks the first row of your ListView. | |
Re: This is what I used in a little forms calculator application: [CODE=c#]using System; using System.Windows.Forms; using System.Drawing; using System.Drawing.Drawing2D; namespace CalculatorApp { // Class for "3D" oval or circle button // just using a color trick to simulate a 3D effect // class RoundButton : Button { private Color _startcolor … | |
Re: I don't have a bot lying around on my shelf but [url=http://www.aidreams.co.uk/chatterbotcollection/index.php]this site[/url] might perhaps help you on the way. | |
Re: Took the quiz and answered NO to all questions: [url=http://www.thesuperheroquiz.com/result.htm?a=0&b=0&c=20&d=0&e=0&f=20&g=0&h=0&i=0&j=0&k=0] the results[/url] | |
Re: If a Panel as you call it, is in fact a PictureBox, just use the Image property to get the whole picture. | |
Re: Wath do you mean by a hex file? A binary file or a text file with hexadecimal characters? | |
Re: while(1) never works in C#! It works in C and C++, but then again, C# is a different brand and more correct here. 1 is an integer, a while should test a boolean condition, not an integer. So while (x==1) or while (true) is the only way to do it … | |
Re: To my knowledge there is no database as you describe. Perhaps this code snippet might help you on the way: [url]http://www.daniweb.com/code/snippet217185.html[/url], the other two snippets may also be found in the code snippet section. Together they form a working program. Succes. | |
Re: Perhaps these will help: [url]http://www.codeproject.com/KB/audio-video/synthtoolkitparti.aspx[/url] [url]http://www.codeproject.com/KB/audio-video/synthtoolkitpartii.aspx[/url] | |
Re: I think with a usual texbox this will be hard. Better use a RichTextBox instead. | |
Re: At the end of your code you have to use something like [CODE=c#]Console.ReadKey(); //keep console on screen in debug mode[/CODE] firstArray.Length is equal to 60 (6x10) so is not strange you would get an index out of bounds exception. | |
Re: I have no problem with this. Did you include a reference to System.Drawing? | |
Re: Maybe this thread might shed a light on it [url]http://www.daniweb.com/forums/thread236306.html[/url] Also remember that every Color struct has a GetHue, GetSaturation and GetBrightness method. | |
Re: I should follow the advise of DdoubleD and at least try to understand the code he proposes. If some part of it is "above your head" let us know. Line 4 of your code should be : for(i = 0; i < textBox1.Text.Length; i++) | |
Re: Depends on how your complex number is defined. Is it just a string or is it a struct or a class? Please tell. | |
Re: [url=http://www.aclweb.org/anthology-new/C/C73/C73-2031.pdf]This[/url] discusses the problems you are likely to encounter depending on the language. Have fun! | |
Re: Use an if statement: [CODE=c#]if (em==!null) { em.AddToCompanies(c); em.SaveChanges(); }[/CODE] | |
Re: Extra remark: ^ is the XOR operator, not the power of operator. | |
Re: Use the PictureBox Location property to do that. MyPicBox.Location=new Point(25,75); will set your picture at coordinates 25,75 and so on. | |
Re: I don't know that much of Python(Monty you know) but I'm going to make an effort at a translation here that fits your code as close as possible: [CODE=C#]using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { A inst = new A("Luke",61); inst.say(); A inst2 = … | |
Re: [QUOTE=jbennet]C# annoys me. [/QUOTE] Could you elaborate on that? I have the same feeling with VB, but I cannot tell exactly why that is. I even did some programming in it.;) I am beginning to believe that with programming languages it is the same as with food, people, cars... You … | |
Re: THERE IS NO NEED TO SHOUT HERE. We all have good ears, explanation of your problem is what we want. | |
| |
Hi all, I like to write out integers in binary format to the console. Let's say I want [B]Myint=5[/B] to be written I use [B]Convert.ToString(Myint,2)[/B] I get [B]101[/B], what I want is [B]0000000000000101[/B] I found this struct on the net which could do the trick, but is there a better … | |
Re: Take a look at this thread: [url]http://www.daniweb.com/forums/thread188529.html[/url] | |
Re: Hi hk.daxini! Welcome on Daniweb! Something like this? : [url]http://www.codeproject.com/KB/dialog/cballoon.aspx[/url] | |
Re: Do the effort of a search on this site (see the searchbox in the right upper of this page) This is, amongst others, what I found : [url]http://www.daniweb.com/forums/thread80255.html[/url] | |
Re: Hi GizmoPower welcome here at Daniweb:) I think you will find the info you need here: [url]http://www.dotnetspider.com/tutorials/DotNet-Tutorial-277.aspx[/url] | |
Re: This could put you on the way: [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.treenode.beginedit.aspx[/url] | |
Re: Hi dennis! Welcome at Daniweb! You could write a method (C# does not use the word function) with a parameter that inputs the total amount and that returns a struct like this [CODE=C#]struct MyStruct { int AmountOf50s; int AmountOf20s; int AmountOf10s; }[/CODE] Succes! And show us what you came up … | |
Re: Hi tchiloh! Welcome at Daniweb. Did you know that every textbox has a TabIndex property you can set? So you can tab on the textbox that has the focus and you will automatically move to the one with the higher tabindex. You even don't have to install all those indexes … | |
Re: Just as there is an OpenFileDialog class there is a SaveFileDialog one. Read about it [url=http://msdn.microsoft.com/en-us/library/system.windows.forms.savefiledialog.aspx]here[/url] | |
Whenever you hear the word recursion, factorials or Towers of Hanoi are never far away. Well here they get mentioned, because we are not going to talk about these guys at all! Iteration and recursion are in fact quite similar: they both loop until a certain condition is met. As … | |
Re: Hi reddevilz! Welcome on Daniweb! Question #1: The first line says that the variable(or field in C# parlance) [B]dog[/B] is of type [B]animal[/B]. Almost the same as saying [B]int i;[/B]. Now the compiler infers that the [B]int type [/B]is a [B]struct [/B]and allocates space for it on what is called … | |
Re: [CODE=c#]OpenFileDialog dlg = new OpenFileDialog(); if (dlg.ShowDialog() == DialogResult.OK) { MyFileNameToUseWhereIWant = dlg.FileName; // perhaps other code here }[/CODE] Is all there is to it. Happy coding! |
The End.