4,439 Posted Topics
Re: Don(t know exactly what you want but you could try the following: Store your drawing in a GraphicsPath: [url]http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.graphicspath.aspx[/url] Use the paint event of your pictureBox to draw the path with the DrawPath method out of the System.Drawing namespace. | |
Re: [QUOTE=pacheco]I understand a database is needed for this.[/QUOTE] Do not always assume this is so! It entirely depends on what the user of your application wants. Perhaps you should read something about database design? As for your forms application, different other strategies are possible: What about a BillingForm with a … | |
Re: Hi m_priya, welcome here! What do you mean by [B]vb c# window [/B]? visual basic c sharp window? And what do you mean by [B]moving a record [/B]? | |
Re: This works when writing to the console: [CODE=c#]namespace ConsoleApplication1 { class Program { static void Main(string[] args) { char ch1 = 'A'; Console.Write("{0:X} ",Convert.ToUInt32(ch1)); char ch2 = 'Z'; Console.Write("{0:X} ", Convert.ToUInt32(ch2)); Console.ReadKey(); } } }[/CODE] | |
Re: Rewrite 4 if statements with braces, start with lines 35 to 37: [CODE=c#]if (jobTitleRbl.Items[0].Selected == true && hoursWorked > 40)//Engineer { basicPay = hoursWorked * 10.0F; overtimePay = (hoursWorked - 40) * 1.5F; }[/CODE] | |
Re: Perhaps [url=http://www.daniweb.com/code/snippet217417.html]this snippet[/url] could give you a start. | |
Re: [QUOTE=NewOrder]i know how to create buttons, text,,etc... and how to operate them.[/QUOTE] If you know all that, it should be simple. A [B]Console.WriteLine [/B]could be translated to a [B]Label[/B] A [B]Console.ReadLine [/B]could be translated to a [B]TextBox[/B] | |
Re: Did you tried to set some breakpoints? Debug it and see what happens. | |
Re: Write two versions of it the one you already have, and a newone with if statements. Use the ildasm tool to watch how many il-instructions you gain or loose, so you can see for yourself what is best! Success! | |
Re: What do you mean by [COLOR="Green"]showing the check path in Import section [/COLOR]? | |
Re: Hey man, this is really a sh** assignment without arrays. See what you can do with select case statement. | |
Re: What you are reading in your code are in fact ASCII codes. Change line 14 of your code into [B]Console.Write((char)s); [/B]to see what I mean. The cast to char is save I think, because it is a text file. Have a look at this: [url]http://msdn.microsoft.com/en-us/library/system.io.binaryreader.readbytes.aspx[/url] | |
Re: Can you elaborate on the reason why you want to do that? As long as you use your object, it won't be disposed by the GC. | |
Re: They are called regular expressions. Plenty of this stuff to learn from on the net, example: [url]http://gnosis.cx/publish/programming/regular_expressions.html[/url] Success! | |
Re: I tried this [CODE=c#]namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void TB_TextChanged(object sender, EventArgs e) { TextBox TB = sender as TextBox; // get control that triggered event // with knowledge of total rows and cols of tablelayout you should // … | |
Re: Don't know exactly what your intentions are with a Listview. But beside the fact that Directories has a GetFiles method it also has [CODE=c#]string[] folders = Directory.GetDirectories(folderBrowserDialog1.SelectedPath); [/CODE] | |
Re: Use this: [url]http://msdn.microsoft.com/en-us/library/czx8s9ts.aspx[/url] | |
Re: If you read the previous thread(on which you posted also) you know that some things don't come for free. If you followed also the first lecture on "basics" and understood it, then the assigment should be no problem. I know the assignment looks frightening, read it carefully again and chop … | |
Re: Phew, a lot of code. On first sight I can say you can remove all the destructors. C# like Java has something called a Garbage Collector. So basically, you don't have to pay attention about removing objects, like you have to do in C++. | |
Re: This can certainly be done in WPF(Windows Presentation Foundation). But you seem to use radiobuttons where in effect you want checkboxes, or am I wrong? | |
Re: Interesting video about ListView: [url]http://windowsclient.net/learn/video.aspx?v=12389[/url] | |
Re: You need some sort of scanner, lexer or tokenizer to get the values you want. If you have the file in a string you can use Remove and Insert methods of the string class. | |
Re: Hi, farshad_emp. Welcome here. Reading [url=http://msmvps.com/blogs/coad/archive/2005/03/23/SerialPort-_2800_RS_2D00_232-Serial-COM-Port_2900_-in-C_2300_-.NET.aspx]this article[/url] may help pinpoint your problem. | |
Re: Searching the C# code snippet section may help you. I found among others this: [url]http://www.daniweb.com/code/snippet298708.html[/url] | |
Re: Perhaps [url=http://msdn.microsoft.com/en-us/library/system.windows.media.media3d.vector3d.aspx]this Vector3D structure[/url] may help you. It has an AngleBetween method. | |
Re: I thought I understood a bit of English, but I haven't the faintest idea what you mean by [COLOR="Green"]Im doing some reports on a c# winforms app ive been working on[/COLOR] Is this newspeak? I know what a popup menu or a combobox is, but a [COLOR="green"]popup form[/COLOR]? More explanation … | |
Re: You are instantiating a CArray class. Then you call a non existent method of that class, or is this just a translation problem (English <-> Vietnamese)? | |
Re: You should have some sort of char array. For indexing, the mod operator(%) may come in handy here. | |
Re: A class is a recipe. An object is what you have cooked with it. | |
Re: Set a breakpoint at line 30 of your Main program. See in the debugger what your [B]string[] array [/B]looks like. | |
Re: @Ketsuekiame: could not have said it better! Bu a good book can do no harm. I have an older version of [url=http://www.amazon.com/2010-NET-Platform-Andrew-Troelsen/dp/1430225491/ref=sr_1_3?s=books&ie=UTF8&qid=1295950185&sr=1-3]this one.[/url] It does not bore you with pages and pages on how to do a for loop. | |
Re: So if you have a button, say "Print document" you have a second button and you want it to perform the same action? You could put a call to the same method in both buttons, if that is what you really want to do. Or else I misunderstood your question. … | |
Re: There is one method really for free in Visual Studio! It is called Find, it is in the Edit menu. Success! | |
Re: Perhaps something [url=http://msdn.microsoft.com/en-us/library/system.xml.xmlreader.aspx]like this[/url] can help. Says something about DTD also. Or are you not alowed to use such features? | |
Re: First construct a string [B]sb [/B]in your while loop, just as adatapost pointed out. Then call MessageBox.Show(sb) [B]after [/B]the loop. | |
Re: Hi, tjm6f4 welcome here. I have always found this a good site to start with: [url]http://www.csharpkey.com/csharp/index.htm[/url] | |
Re: Both welcome here! You both should read the rules of this site. For an answer on your questions. Here are some links to start with: [url]http://msdn.microsoft.com/en-us/library/system.io.textreader(v=VS.100).aspx[/url] [url]http://msdn.microsoft.com/en-us/library/h43ks021(v=VS.100).aspx[/url] | |
Re: Is the MultiLine property of your Textbox set to true? And I don't no for sure any more(been a long time ago) but is a matrix multiplication not more something like [CODE=c#]for (int i = 0; i < N; i++) for (int j = 0; j < N; j++) for … | |
Re: This is "relativly" easy. All you have to do is write a "recursive descendant parser" :cool: Look at these snippets on how I did that. It was really fun!!! [url]http://www.daniweb.com/code/snippet217187.html[/url] [url]http://www.daniweb.com/code/snippet217186.html[/url] [url]http://www.daniweb.com/code/snippet217185.html[/url] Put all these together in a Console Application and see for yourself. Success! Ask if you have any … | |
Re: Also have a look at this: [url]http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm[/url] | |
Re: This is one of the reasons I like C# so much. An enumeration in C# is what it says: an enumeration, not an integer. But if you like you can still dig down below the surface. Same holds for booleans in C++d you can say: [CODE=c++]while(0) { // do something … | |
Re: have you tried: [CODE=c#]private void button_MouseEnter(object sender, EventArgs e) { Button myButton = sender as Button; if ( myButton.Enabled== false) label1.Text = "Please Select the area to scan"; else label1.Text = "It will scan the specified area"; }[/CODE] | |
Re: First put the lines of your file in a List like this: [CODE=c#]// Read in all lines in the file, and then convert to List with LINQ. List<string> fileLines = File.ReadAllLines("file.txt").ToList();[/CODE] then select a random line by indexing the list. See here: [url]http://msdn.microsoft.com/en-us/library/0ebtbkkc.aspx[/url] | |
Re: In line 2 you test if a form is productResults, so what do you mean by line 3? If you get there IMHO you have a productResults form. | |
Re: Where is that program? I don't see it! Just start. Anything. Let it be complete rubbish, that's all right. Show it to us and we will help you! | |
Re: Yes, the Math class lives in the System namespace it is static so you don't have to instantiate it. Just use it like this: [CODE=c#]// square will be equal to aNumber * aNumber double square = Math.Pow(aNumber, 2.0);[/CODE] | |
Re: Easy. Suppose you have an Employee class(yes that one again) with an [B]Age [/B]property. In the [B]set [/B]part of the property you could check if the age is between 18 to 60, or whatever. | |
Re: Hi njyekha, welcome here! Have a look at this: [url]http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson01.aspx[/url] |
The End.