2,157 Posted Topics

Member Avatar for abdu-

Lines 111-112 have a StreamWriter. Your request is vague. What does this StreamWriter you need to add need to write?

Member Avatar for abdu-
0
129
Member Avatar for babaidebnath

Just use the [URL="http://msdn.microsoft.com/en-us/library/system.printing.printqueue.aspx"]PrintQueue[/URL] class.

Member Avatar for Momerath
0
269
Member Avatar for Erco21

You'll need some sort of indicator that tells a thread that the item has already been checked, and a locking mechanism to prevent the threads from attempting to access that same object. You should probably read [URL="http://msdn.microsoft.com/en-us/library/c5kehkcz%28VS.80%29.aspx"]this[/URL].

Member Avatar for Erco21
0
111
Member Avatar for [csharp]

Double has a very very large range, what exactly is your range requirement? Or are you confusing range and precision?

Member Avatar for ddanbe
0
104
Member Avatar for tatarao25
Member Avatar for Premsathishbe

I can create a folder named 'com' on the desktop. What OS are you using?

Member Avatar for Premsathishbe
0
76
Member Avatar for DaveTran

[QUOTE=DaveTran;1323562]In C++ the ternary operator below will return 1. [CODE] true ? 0 : 1 [/CODE] In C# it will return 0.[/QUOTE] You need to recheck that, it returns 0 in C, C++ and C#.

Member Avatar for DaveTran
0
135
Member Avatar for DaveTran

If you store objects (reference types) in your List/Array then this behavior will happen automatically. When you store value types (int, bool, float, etc.) then this behavior doesn't happen. You can convert a value type into a reference type with explicit casting (known as [URL="http://msdn.microsoft.com/en-us/library/yz2be5wk.aspx"]boxing[/URL]), but changes to the original …

Member Avatar for Momerath
0
165
Member Avatar for prathoven

The first [b]clsSerial[/b] is telling you what type of object is going to be returned by this method. The second [b]clsSerial[/b] is [URL="http://msdn.microsoft.com/en-us/library/ms173105%28VS.80%29.aspx"]casting[/URL] the value returned by [URL="http://msdn.microsoft.com/en-us/library/b85344hz.aspx"]format.Deserialize()[/URL] into a [b]clsSerial[/b] object.

Member Avatar for prathoven
0
94
Member Avatar for yamini222

I can think of two ways to quickly do this, one using [URL="http://msdn.microsoft.com/en-us/library/system.string.split%28VS.71%29.aspx"]String.Split()[/URL] and the other using [URL="http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex.aspx"]Regex[/URL]. Take a look at those and see what you can come up with.

Member Avatar for yamini222
0
126
Member Avatar for mgaritjr

Your C# code looks fine, the error you are getting is saying that there is something in the textbox that is not part of an integer (spaces, letters, something). I'd put a break on the first Parse() line and take a look at what is in the qty100 and price100 …

Member Avatar for mgaritjr
0
137
Member Avatar for Romil797

[code]void cPc() { Random trytg = new Random(); int trytg1 = trytg.Next(0, 9); Boolean r = true; while (r == true) { if (pictureBox1[trytg1].BackgroundImage == null) { pictureBox1[trytg1].BackgroundImage = y; pTur = true; r = false; } } }[/code] Line 3 gets your random number, but you never get another …

Member Avatar for Romil797
0
135
Member Avatar for zachattack05

A connection to a database has resources that aren't managed by the CLR. These are owned by the OS, and if you don't dispose of the object, the OS doesn't know that it's ok to clean up those resources. Also, the Garbage Collector runs when it 'feels' it needs to, …

Member Avatar for zachattack05
0
661
Member Avatar for dineshcbe

It's been a while since I've done file IO in C/C++, but doesn't it require that you read the EOF before file.eof() is set? What I believe is happening is this: 1. while (!file.eof()) // first time here, so it's not EOF 2. file.read(...blah...) // read the file into the …

Member Avatar for Momerath
0
93
Member Avatar for anthonyjava

Was this code provided to you and you have to add the functionality that you state, or is this all your code? If this is all your code, do you know what an array is?

Member Avatar for Momerath
0
96
Member Avatar for GAME
Member Avatar for IDC_Sharp

The reason is that when you do the first resize only the Form1_Resize method is being called so your 'a' and 'b' variables are equal to zero. Set them somewhere else, like in the Form_Load event. Also, replying to your own thread over and over again makes it less likely …

Member Avatar for Geekitygeek
0
162
Member Avatar for drake10k

[QUOTE=drake10k;1319884]Hello, I'm receiving an error message (ArgumentException was unhandled - Parameter is not valid) when I'm trying to capture a portion of the screen with a rectangle. It works great when drawing the rectangle with clickPoint.X < lastPoint.X and clickPoint.Y < lastPoint.Y, but when lastPoint.X or/and lastPoint.Y is lower than …

Member Avatar for Geekitygeek
0
133
Member Avatar for anoop4real

Show your code where you get and construct the query string, it will make it easier to understand and help you :)

Member Avatar for anoop4real
0
115
Member Avatar for chickod
Member Avatar for Revan1985

You can't create an interface that has to be a class because then it wouldn't be an interface. Abstract class is the way you'll have to go. Also, why do you consider it to be unlucky to have to use an abstract class?

Member Avatar for Momerath
0
271
Member Avatar for anitha10

[code]SqlConnection myConnection = new SqlConnection(<connection string>);[/code] <connection string> in the basic form looks like this: [code]"Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;"[/code] You can see other formats at [URL="http://connectionstrings.com"]ConnectionStrings.Com[/URL].

Member Avatar for vincezed
0
133
Member Avatar for becky007

You aren't very clear, what "doesn't work" since you get no errors? You do realize that the Regex you are creating only has scope inside the if, once you leave that there is no Regex?

Member Avatar for Momerath
0
119
Member Avatar for ITStrawberry
Member Avatar for coop123

IIRC, Access doesn't support @ parameters, you have to use ? and then make sure you add them in order: [code]cmd.CommandText = "insert into Trace (DS_ID,D_ID, Trace_Type, T_Amount, T_Date, VIN) values (?, ?, ?, ?, ?, ?)";[/code]

Member Avatar for Momerath
0
94
Member Avatar for Anon17

From the same site you linked: If you receive a SocketException, use SocketException.ErrorCode to obtain the specific error code. Once you have obtained this code, you can refer to the Windows Sockets version 2 API error code documentation in MSDN for a detailed description of the error.

Member Avatar for Anon17
0
228
Member Avatar for beginerC#

Every book I've read on C# has this in it, and it would be much easier for you to find a book than to explain all the code you have to right.

Member Avatar for beginerC#
0
76
Member Avatar for DaveTran

Some optimizations for your loops could be done, take your xDivisions loop: [code]for (int x = 0; x <= xDivisions; ++x) { a.X = x * cellSize; a.Z = z * cellSize; b.X = a.X; b.Y = yDivisions * cellSize; b.Z = z * cellSize; DrawLine(a, b, color); }[/code] Lines …

Member Avatar for DaveTran
0
112
Member Avatar for valter

According to Microsoft, this happens when you didn't completely uninstall a beta version of their software before installing the release version. Otherwise, they want you to fill out a form reporting the issue at [url]http://lab.msdn.microsoft.com/ProductFeedback/reportbug/search.aspx[/url]

Member Avatar for valter
0
113
Member Avatar for lgriess

You can attach event handlers to the VerifyingUser/VerifyingAnswer events and handle this yourself.

Member Avatar for Momerath
0
163
Member Avatar for SBA-CDeCinko

In your 2nd code example, you realize that you are setting each of those parameters to the literal strings you are supplying, not to values stored in variables of those names? While the first 4 would be fine (they are VarChar), the last one would not as "DateSent" can't be …

Member Avatar for Momerath
0
176
Member Avatar for =OTS=G-Man
Member Avatar for =OTS=G-Man
0
560
Member Avatar for prathoven

What does it do? Do you get an error? Are you sure it didn't open (sometimes it opens the project but doesn't display any windows, check the project tab).

Member Avatar for prathoven
0
77
Member Avatar for buster2209

[QUOTE=buster2209;1311512]How can I do a SortOrder for the [I]second[/I] column?[/QUOTE] Provide your own ListViewItemSorter method, you can see an example [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.listviewitemsorter.aspx"]here[/URL]. The example shows how to sort based on clicking the column header.

Member Avatar for Momerath
0
340
Member Avatar for martin mnukwa
Member Avatar for Momerath
0
38
Member Avatar for azfarhus

On which line is the exception thrown? What error are you getting? What is the value of TextBox1.Text?

Member Avatar for PierlucSS
0
91
Member Avatar for sizzlefire
Member Avatar for zachattack05

There is overhead with a SQL type database. Using a file based system allows them to avoid that overhead at a cost of performance (and limited size). Splitting the tables into different files enhances performance, as you don't have to read what you don't need (I suspect they also use …

Member Avatar for zachattack05
0
107
Member Avatar for DaveTran

Because of the way you created your equation, your 'z' axis is what we'd traditionally refer to as the 'x' axis. I believe that is causing your problem. As for checking to the right, does the check wrap around the cube? For example, if I'm at the far right of …

Member Avatar for DaveTran
0
395
Member Avatar for BonaDrag

[code]int myNumber = Int32.Parse(str.Trim().Substring(0, str.Trim().IndexOf(' ')));[/code] This will attempt to convert the first text of the string into an integer. Leading spaces are ignored. If you know you don't have leading spaces, remove the Trim() calls.

Member Avatar for BonaDrag
0
217
Member Avatar for Zinderin

tmpInc is an object, and you are storing a [b]reference[/b] to that object in the list (you are not making a copy of the object). So when you change the values in the object you get this affect. You need to create a new object each time: [code]for (int x …

Member Avatar for Geekitygeek
0
187
Member Avatar for iinf
Member Avatar for kebbby

Lines 24-34 aren't in your psuedocode (and I believe they are causing your problem). What are you trying to accomplish with them?

Member Avatar for Momerath
0
106
Member Avatar for normmy

String.Split contains an overloaded method that uses Strings as delimiters: [code]string[] sections = line.Split(new String[] {"><"}, StringSplitOptions.None);[/code]

Member Avatar for Geekitygeek
0
258
Member Avatar for LevyDee

You should use File.ReadAllLines(), it will make it shorter and will work with however many lines you put into the file: [code]songs = File.ReadAllLines(playlist);[/code]

Member Avatar for Lusiphur
0
168
Member Avatar for surk23

Create 2 'pointers', one to the start of the queue, one to where the next one will go. When you add an item, check to make sure the start and end aren't the same (if they are, then your queue is full. How you want to handle that is your …

Member Avatar for tesuji
0
180
Member Avatar for buster2209

Depending on what you need to do, you put it in the FormClosing or FormClosed event.

Member Avatar for buster2209
0
102
Member Avatar for NH1
Member Avatar for NH1

[code]/// <summary> /// Rounds a number to the closest multiple of another number. /// </summary> /// <example>83 rounded to closest 25 would give a value of 75 (83 is closer to 75 than 100)</example> /// <param name="num">The number to be rounded</param> /// <param name="closest">The value you wish to round to …

Member Avatar for NH1
0
146
Member Avatar for shannon.archer

You'll need to get XNA if you want to do DirectX in C#. They stopped the original managed directx a long time ago. Check out [url]http://msdn.microsoft.com/en-us/aa937791.aspx[/url] for more info.

Member Avatar for shannon.archer
0
236

The End.