4,439 Posted Topics
Re: Perhaps have a look at this thread: [url]http://www.daniweb.com/forums/thread224588.html[/url] | |
Re: What would happen if you changed line 28 of your code into [B]char ch;[/B]? | |
Re: Use the Image property of the Button. | |
Re: Use the Click or Activated event of Form2 to change the size of Form1 | |
Re: A MessageBox is what we call a modal dialog(window). It means you have to respond to it somehow before you can continue. A print dialog is another example of this. You wanted to print something, so this dialog shows up. Now you can set several settings of a printer and … | |
Re: Yes hexadecimal may be the way to go, but consider bignumbers. C# and .NET don't have them, F# does but perhaps that's another story. Have a look on [url=http://www.boyet.com/Articles/PiCalculator.html]this site[/url]. It is about the calculation of pi, but there is and implementation of Bignumbers here in C#. | |
Re: He! Thanks for the link! This really is something to have a look at. In fact I have a Mac on which I run Boot Camp so I could install Vista, to be able to use Visual Studio. Thanks. | |
Re: You don't. Just erase it and draw a new one in another position. Just look at the snippet I propose in post #2 of [url=http://www.daniweb.com/forums/thread267766.html]this thread[/url] | |
Re: Perhaps have a look at [url=http://www.daniweb.com/code/snippet231400.html]this snippet[/url] to get some ideas. Here I placed some big dots on a rectangle and changed their color (from yellow to red and back) so they appear to move, but here that is just a trick of the eye. If you want to move … | |
Re: Ever tried to implement the KeyDown event of the Dialog? It gives you a KeyEventArgs argument with which you can test the key that was pressed. You can then act accordingly. | |
Re: [B]>I made a program using C# and the only graphics im using is that of WFA, but i want to apply EXTREME graphics[/B] Show your code. What is WFA? What is EXTREME graphics? I know a bit what WPF is as adatapost proposed to you. | |
Re: Could you be more specific? Do you mean to parse the header line for the word "compagny" and then get to the corresponding xxx...,yyy... and zzz... values? | |
Re: Perhaps you could implement the KeyDown event handler of the textbox to detect if the key was from the keyboard or from your scanning device? | |
![]() | Re: Change your constructor private Dictionary<char, int> alphabetList = new Dictionary<char,int>(); into private Dictionary<int, char> alphabetList = new Dictionary<int,char>(); Because a Dictionary constructor first has a Key type and then a value type. The Add method will throw an exception if you try to add a key that already exists, you … |
Re: Don't know what you mean by [B]new unique object[/B] Could this help? [CODE=c#] namespace ConsoleApplication1 { class item { public int avalue = 1; public int bvalue = 2; } class Program { static void Main(string[] args) { ArrayList items = new ArrayList(); item item1 = new item(); items.Add(item1); //the … | |
Re: Strings in C# are immutable! Look up somewhere why that is so, looked strange to me at first also. So if you want to change a string, you have to create a new one, many of the string manipulation methods do that all the time. You could use this: [CODE=c#] … | |
Re: Hi, Acadian, welcome to Daniweb. I think the comments you placed in are causing some trouble here. | |
Re: If you want a method to return more than one value you could use an array or a list, or stuff all your info in a struct and return that struct. | |
Drawing on a Form does not always happen when you want it. The Refresh() method of a control comes in handy here. See the following snippet and experiment by commenting out the Refresh. Start a new WindowsForm project. From the toolbox, add a Label, ProgressBar and Button control on the … | |
Re: Perhaps [url=http://eve.uj.ac.za/gfxbook/]this site[/url] can help you a bit. | |
Re: For a conditional AND in C# we use the token [B]&&[/B] If in an expression, you want to point out that something is equal you use the [B]==[/B] operator(equal) not the [B]=[/B] operator(assignment). | |
Re: May I point out also that on line 139 you used CreateGraphics. This is not needed you get one Graphics object for free from the PaintEventArgs argument of the Paint handler. [B]Graphics formGraphics = e.Graphics;[/B] | |
Re: If you know the internal structure of an SPSS file it should be no problem to convert one file to another format. But I think because SPSS is a widely used and commercial statistical package, this will not be given for free. I can be wrong, I just don't know. | |
Re: You can find some videos here: [url]http://windowsclient.net/learn/videos.aspx#Windows+Forms+videos[/url] More basic is this: [url]http://www.functionx.com/csharp/index.htm[/url] | |
Re: You could have a look at 3 code snippets I wrote which together form a console calculator. It accepts variables and expressions defined with these variables. As an example I also implemented the the sqrt function to be used in expressions. I suppose it can easily be adapted to make … | |
Re: If you use the search optiion of this site (IMHO it is used too less, but I agree it can take some time to find something you really need...) But the searcher often gets rewarded, Among others I found this in the C# snippets section: [url]http://www.daniweb.com/code/snippet217193.html[/url] | |
Re: C'est vrai. Et chez nous en Belgique on dit: "Et pour les Flammands la même chose." This is as far as I know a site that does his communication in [B]English[/B]. So why don't you, if you really hope to get some answers to your questions? | |
Re: My car won't start please help! Come on man! Try to be as specific as you can if you pose a question! Which machines? Washing machines? | |
Re: What do you understand by a quick reply textbox? Do you mean a message box? Vaguely posed questions seldom have lots of succes here. Try to be as clear as you possibly can when posting a problem. | |
Re: Every forms application has automatically a Program.cs file that looks something like this: [CODE=c#]using System; using System.Collections.Generic; using System.Linq; using System.Windows.Forms; namespace WindowsFormsApplication1 { static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } … | |
Re: > linux (i don't know what is it , but im waiting u to tell me ) You must be joking! What where you doing while studying "Computer Science"? Chasing chicks and drinking beer? My suggestion: start a nitting course! (Always handy!) | |
Re: The error means that on line 16 of your first code, the class [B]EventArgs [/B]does not contain a method [B]Run[/B] I looked at the link you gave: change line 16 to [B]Events.Run().[/B] | |
Re: My car won't start, included a picture. EDIT: If you can post no reasonable questions, how would you expect to get a reasonable answer? | |
Re: You could also have a look at this snippet, to calculate the age of a person: [url]http://www.daniweb.com/code/snippet217223.html[/url] | |
Re: Seems you rather like to store the time in seconds, or am I wrong? A TimeSpan has several properties you can look up here: [url]http://msdn.microsoft.com/en-us/library/system.timespan_members(VS.71).aspx[/url] You could look up how many secs it took and then store the millisecs of the timespan into that array slot. Hope it helps. | |
Re: There is always the issue of [url=http://en.wikipedia.org/wiki/Endianness]endianness[/url]. I remember from the old days(more than 20 years ago), we had to read some data from a magnetic tape. We could finaly read them if we swapped the bytes or nibbles(I don't remember that anymore;) ) | |
Re: If your build was succesfull that means alot! It means the compiler did not find any errors in your programming code. The compiler generated an executable called MyProgramHoweveriIt'sCalled.[B]exe[/B] The only thing you need to do is fire the command to execute that executable, but I don't know how that is … | |
Re: [QUOTE=GAME]As you can see I worked really hard so, can you help me? [/QUOTE] Did it really was so hard to copy some scripting code? I believe it is JavasScript, C# never IMHO has a keyword called [B]function[/B]. And believe me I'm trying to stay friendly here! You know: "Make … | |
Re: The reason is perhaps strangely enough quite simple! C# interprets literals like 234.123 as a [B]double [/B]and not as a float. You cannot assign a double to a float directly. So if you explicitly want to say that 234.123 is a float, you have to append an f or F … | |
Re: Did you already tried this in the form Load event handler? | |
Re: Your question seems a bit ambiguous. Did you mean creating a log file, as Tekmaven gave you a suggestion on how to do it, or do you simply want a message to be shown (like: [B]Good morning John, it is 08:15 AM[/B]) at your program startup? | |
Re: If you want to use \ in a string you need to precede it with another \ like [B]"Name\\UserName"; [/B]or precede the whole string with the @ char, like [B]@"Name\UserName";[/B]. \ is interpreted as an escape sequence to be able to use a newline character '\n' or other in your … | |
I start a new WindowsApp with Form1 with a Button. Added a form Form2 to my project. In the click event handler of my button I do the following: [CODE=csharp] private void button1_Click(object sender, EventArgs e) { Form2 F = new Form2(); Point P = new Point(500, 500); F.Location = … | |
Re: You could also use extra variables if a line seems to long for you. [CODE=c#] bool a = NewMouse.LeftButton == ButtonState.Pressed; bool b = OldMouse.LeftButton == ButtonState.Released; return a && b;[/CODE] As a side remark: never use short meaningless variable names, certainly not in large programs! In a case like … | |
Re: Did you try a comma , as a decimal instead of a point? You must always think it can have something to do with your international settings in these kind of problems. | |
Re: Your question is a little cryptic. Could you please rephrase it more clearly? For instance is your example string: [B]this- is; text, example for the forum[/B] or is it shorter? | |
Re: A string is a collection of chars and is a reference type. The only special thing about it : it is immutable. You cannot change a string.You also cannot derive from a string class because it is sealed. The methods of a string object that appear to do change a … | |
Re: The line ArrayElem[i] = (21 * ArrayElem[i]) / MaxHoogte; is correct. If MaxHoogte is een integer you have to take into account you are doing an integer division. Don't know why you use 0,9999 if you want to generate random integers between 0 and 10. | |
Re: You could introduce an extra counter variable. Increase it in your Tick event handler and call Stop when it reaches 10. | |
Re: For what it's worth (I'm no pro) some advise: Why do you use integers instead of booleans? It feels much more natural to say [B]nameOK = true [/B]than to say [B]nameOK=1,-1[/B] or whatever. I would leave out the close on line 97. A save button has to do a save … |
The End.