4,439 Posted Topics

Member Avatar for makamanlol

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.

Member Avatar for ddanbe
0
457
Member Avatar for pacheco

[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 …

Member Avatar for ddanbe
0
93
Member Avatar for m_priya

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]?

Member Avatar for ddanbe
0
36
Member Avatar for 5ophie2012

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]

Member Avatar for 5ophie2012
0
261
Member Avatar for johnt68

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]

Member Avatar for johnt68
0
111
Member Avatar for aloha91

Perhaps [url=http://www.daniweb.com/code/snippet217417.html]this snippet[/url] could give you a start.

Member Avatar for ddanbe
0
78
Member Avatar for NewOrder

[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]

Member Avatar for NewOrder
0
162
Member Avatar for deb081900

Did you tried to set some breakpoints? Debug it and see what happens.

Member Avatar for chetanbasuray
0
110
Member Avatar for DaveTran

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!

Member Avatar for DaveTran
0
100
Member Avatar for kishor20
Member Avatar for kishor20
0
443
Member Avatar for revjim44

Hey man, this is really a sh** assignment without arrays. See what you can do with select case statement.

Member Avatar for Ketsuekiame
0
381
Member Avatar for 5ophie2012

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]

Member Avatar for Ketsuekiame
0
2K
Member Avatar for manugm_1987

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.

Member Avatar for Momerath
0
102
Member Avatar for judithSampathwa

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!

Member Avatar for kvprajapati
0
111
Member Avatar for anandguptastar

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 // …

Member Avatar for anandguptastar
0
5K
Member Avatar for niths

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]

Member Avatar for Mitja Bonca
0
520
Member Avatar for Jesi523
Member Avatar for ddanbe
0
878
Member Avatar for qrkr0730

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 …

Member Avatar for ddanbe
0
80
Member Avatar for tiararin

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++.

Member Avatar for ddanbe
0
174
Member Avatar for Mr.BunyRabit

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?

Member Avatar for ddanbe
0
179
Member Avatar for sarminatorius

Interesting video about ListView: [url]http://windowsclient.net/learn/video.aspx?v=12389[/url]

Member Avatar for ddanbe
0
107
Member Avatar for GizmoPower

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.

Member Avatar for GizmoPower
0
1K
Member Avatar for farshad_emp

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.

Member Avatar for farshad_emp
0
148
Member Avatar for bhagawatshinde

Searching the C# code snippet section may help you. I found among others this: [url]http://www.daniweb.com/code/snippet298708.html[/url]

Member Avatar for Mitja Bonca
0
349
Member Avatar for Nikhil R
Member Avatar for rachmann

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.

Member Avatar for rachmann
0
646
Member Avatar for jlivvers

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 …

Member Avatar for jlivvers
0
125
Member Avatar for nndung179

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)?

Member Avatar for Ketsuekiame
0
106
Member Avatar for Sean87

You should have some sort of char array. For indexing, the mod operator(%) may come in handy here.

Member Avatar for Sean87
0
107
Member Avatar for SaberExcalibur
Member Avatar for SaberExcalibur
0
133
Member Avatar for aaronmk2

Set a breakpoint at line 30 of your Main program. See in the debugger what your [B]string[] array [/B]looks like.

Member Avatar for ddanbe
0
102
Member Avatar for ctsmith84

@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.

Member Avatar for ctsmith84
0
205
Member Avatar for Mr.BunyRabit

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. …

Member Avatar for Mr.BunyRabit
0
77
Member Avatar for sling blade

There is one method really for free in Visual Studio! It is called Find, it is in the Edit menu. Success!

Member Avatar for ddanbe
0
110
Member Avatar for cyph3r x3r0

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?

Member Avatar for Ketsuekiame
0
141
Member Avatar for Kath_Fish

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.

Member Avatar for alc6379
0
200
Member Avatar for tjm6f4

Hi, tjm6f4 welcome here. I have always found this a good site to start with: [url]http://www.csharpkey.com/csharp/index.htm[/url]

Member Avatar for Ketsuekiame
0
159
Member Avatar for ammarahmad001

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]

Member Avatar for ddanbe
0
70
Member Avatar for vavazoom

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 …

Member Avatar for ddanbe
0
184
Member Avatar for bisiii

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 …

Member Avatar for ddanbe
1
2K
Member Avatar for Kath_Fish
Member Avatar for gunnerone

Also have a look at this: [url]http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm[/url]

Member Avatar for gunnerone
0
125
Member Avatar for lanzslumber

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 …

Member Avatar for ddanbe
0
248
Member Avatar for onlinessp

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]

Member Avatar for ddanbe
0
104
Member Avatar for justin3085

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]

Member Avatar for justin3085
0
421
Member Avatar for coroll

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.

Member Avatar for kvprajapati
0
974
Member Avatar for CHOCHOCHO

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!

Member Avatar for CHOCHOCHO
0
116
Member Avatar for vedro-compota

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]

Member Avatar for vedro-compota
0
120
Member Avatar for james6754

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.

Member Avatar for ddanbe
0
69
Member Avatar for jnyekha

Hi njyekha, welcome here! Have a look at this: [url]http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson01.aspx[/url]

Member Avatar for jnyekha
0
94

The End.