2,157 Posted Topics

Member Avatar for Tellalca

Just FYI, in Windows Vista/7 it is no longer recommended that files be placed in the directory with the executable (this is a safety feature to prevent malicious code from overwriting your exe files). The proper place is in the Users directory. Either [B]//Users/Public[/B] or [B]//Users/<username>[/B] depending on if the …

Member Avatar for Momerath
0
268
Member Avatar for peck3277

There are many different ways to connect to MySQL databases. [URL="http://www.connectionstrings.com/mysql"]This[/URL] site gives connection strings for each of the different ways.

Member Avatar for Momerath
0
111
Member Avatar for JannuBl22t
Member Avatar for JannuBl22t
0
133
Member Avatar for peggie1990

One (or more) of the objects [B]osdb[/B], [B]txtID[/B], [B]txtItemName[/B] or [B]txtItemDesc[/B] is null.

Member Avatar for Mitja Bonca
0
139
Member Avatar for pacheco

Create a method that adds the controls you want to a parent control. Call this method passing in each of the tabs for however many tabs you have.

Member Avatar for pacheco
0
265
Member Avatar for makamanlol

When you resize (minimizing and restoring is a form of resizing) you'll have to redraw all the lines as they aren't part of the form. One way to handle this is to store the graphics object you are using to draw on and restore it when the draw event occurs.

Member Avatar for ddanbe
0
458
Member Avatar for chetanbasuray
Member Avatar for Momerath
0
122
Member Avatar for pacheco

Lines 4,5: The Text property of both these controls is a string, don't call ToString on strings. Lines 9, 10, 11 - You are mixing OleDB objects and SQLServer objects. Pick one set. Line 12. You've not opened the connection that I can see.

Member Avatar for Mitja Bonca
0
107
Member Avatar for Acidburn

Remove the "Provider..." from your connections string and get rid of all the OleDB objects. Or if you must you OleDB (and its limitations) the provider should be "SQLNCLI10" for SQL Server 2008.

Member Avatar for Mitja Bonca
0
188
Member Avatar for onlinessp
Member Avatar for james6754

You use abstract method to indicate that the child classes all have a behavior that is implemented in different ways. For example, we could have an abstract class 'Animal' with child classes 'Lion', 'Giraffe' and 'Dung Beetle'. The 'Animal' class has an abstract method 'Eat'. For a Lion object, this …

Member Avatar for Momerath
0
109
Member Avatar for Jessurider
Member Avatar for SBA-CDeCinko

Since the web is stateless, if you are trying to pass information from the server to the client then back from the client to the server you'll have to have some form of state variable.

Member Avatar for Momerath
0
109
Member Avatar for 5ophie2012
Member Avatar for johnt68
Member Avatar for canadiancoder

Most likely your problem is the reference to the TrackRecord array. C# has no way of knowing how big it is when it is returned from the C++ code (since you are passing it as a reference) so it fails. One way to fix this is to pass it a …

Member Avatar for canadiancoder
0
1K
Member Avatar for DaveTran

Without knowing what you are trying to do it's hard to tell :) But you have effectively created a singleton factory but using a dictionary instead of class for the factory.

Member Avatar for DaveTran
0
110
Member Avatar for DaveTran

[QUOTE=ddanbe;1460557]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![/QUOTE] You can do this from within Visual Studio if you are …

Member Avatar for DaveTran
0
100
Member Avatar for Tellalca

Start a [URL="http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx"]Stopwatch[/URL] when you want to start timing, and stop it when you are done.

Member Avatar for rohand
0
629
Member Avatar for revjim44

Strings are a special case in C# and are treated like value types for equality comparison, so using == or != is fine. If you are testing for less than or greater than, you'll need to use [URL="http://msdn.microsoft.com/en-us/library/zkcaxw5y.aspx"]String.Compare[/URL]

Member Avatar for rohand
0
161
Member Avatar for 5ophie2012

In line 13, if you are trying to read a char, why are you assigning it to an int? Use string formating to output as hex (x.ToString("x2") for example). You need to rethink the Counts method, as you aren't passing references or the character read at all.

Member Avatar for Ketsuekiame
0
2K
Member Avatar for shers

I'd guess that the DPI of the PDF document is set much higher than you think it is, so the image appears to shrink. Your screen is probably around 96 DPI, whereas most documents are 300 DPI. This would make your image look about 1/3rd the size it does on …

Member Avatar for Momerath
0
71
Member Avatar for techfish

I suspect that something in startFunc is trying to update the listbox (calling updateTextBox()). Since startFunc isn't the UI thread, it can't do this without invoking the update. Take a look at [URL="http://msdn.microsoft.com/en-us/library/a1hetckb.aspx"]this[/URL] example on MSDN.

Member Avatar for Momerath
0
174
Member Avatar for ichigo_cool

What you learn about OOP will carry over into any OO language, though there are some differences between them all (C++ allows multiple class inheritance while C# does not, for example). As for developing games, I recommend you head on over to [URL="http://create.msdn.com/en-US/"]XNA[/URL]. They have (free) tools, demos, lessons, etc. …

Member Avatar for Momerath
0
75
Member Avatar for manugm_1987

If your object requires special processing when the GC wants to clean it up, implement the IDisposable interface on your object.

Member Avatar for Momerath
0
102
Member Avatar for newbie14

If you want to sort dates you need to generate them as year-month-day, not day-month-year, or sort them in the select statement from the database, not after you get them.

Member Avatar for Momerath
0
96
Member Avatar for revjim44

In ReadDials the first thing you do with errorFlag is set it to zero. You don't check it's value so I'm not sure what the problem is.

Member Avatar for Mitja Bonca
0
409
Member Avatar for zupa
Member Avatar for Mitja Bonca
0
291
Member Avatar for DaveTran

Instead of using array indexes of 0..n-1, use indexes of 0..n+1. Place your values in 1 .. n so you have an 'empty' boarder around the entire array. Make sure those values are always 'empty' and then you don't have to do any kind of boolean check. Every valid element …

Member Avatar for Momerath
0
140
Member Avatar for rachmann

Two vectors that intersect are always coplaner, so there is only one angle. As for your two spheres, I'm not sure what you are looking for, the formula for the line described using the 2nd sphere as the origin? The vector from the center of the 2nd sphere to the …

Member Avatar for rachmann
0
646
Member Avatar for nndung179

Instead of making me try to figure out all your code, why not tell me which line generates the error?

Member Avatar for Ketsuekiame
0
106
Member Avatar for pandaEater
Member Avatar for music613

[URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.checkedlistbox.checkedindices.aspx"]CheckedIndices[/URL] will return a collection of indexes that are checked. [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.checkedlistbox.checkeditems.aspx"]CheckedItems[/URL] will return a collection of items that are checked. [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.checkedlistbox.getitemchecked.aspx"]GetItemChecked()[/URL] returns a boolean telling you if the specific index is checked. [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.checkedlistbox.getitemcheckstate.aspx"]GetItemCheckState()[/URL] returns a [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.checkstate.aspx"]CheckState[/URL] for the specific index. If you only care about the checked ones, the first …

Member Avatar for music613
0
132
Member Avatar for levanlong

I would create a class to hold the information for each member, something like: [code]enum Sex {Male, Female} public class Member { public int ELO {get; set;} public int Competitions {get; set;} public int Rank {get; set;} public Sex Gender {get; set;} public String Title { get { // code …

Member Avatar for levanlong
0
197
Member Avatar for speedy94519

For 18 decimal we have: 2's complement = 0001 0010 (16 + 2, since it isn't negative nothing else needs to be done). Hexadecimal = 0x12 Octal = 22 Sign-magnitude = 0001 0010 (since it is positive first bit is 0, the next 7 bits are just the value, again …

Member Avatar for lillygil
0
204
Member Avatar for meensatwork

You will have to create your own in C# and use [URL="http://msdn.microsoft.com/en-us/library/aa288468%28v=vs.71%29.aspx"]P/Invoke[/URL] to access the functions in the DLL. Link is to a tutorial on P/Invoke.

Member Avatar for IdanS
0
106
Member Avatar for Nivass

You can't, that's a TV myth. Zooming in on a black pixel just makes a larger black pixel. There are no super algorithms that will make the zoom image show you more detail, as there is no more detail to show.

Member Avatar for buyoh
0
123
Member Avatar for virusisfound

AddMonths is working fine here. A common belief is that it changes the object you are using, when it does not. [code]using System; namespace Text { class Program { static void Main() { DateTime dt = new DateTime(2010, 1, 1); DateTime next; for (int i = 0; i < 10; …

Member Avatar for virusisfound
0
78
Member Avatar for james6754

They do hold the values, so I'm not sure what you are asking here. You might want to put the keyword 'public' in front of your property statements (lines 3 and 4) so they are accessible from outside the class.

Member Avatar for ddanbe
0
103
Member Avatar for james6754

No, myobject holds a reference to an instance of the class Class1. [url]http://www.csharp-station.com/Tutorials/lesson08.aspx[/url]

Member Avatar for Mitja Bonca
0
80
Member Avatar for deucalion0

My suggestion would be to make your code more OO. You should have something like a 'enemy' class, and derive new classes from this for each enemy. These could then have a method (GetValue maybe) that would return the value of that enemy. As for your highscore problem, you'll need …

Member Avatar for Momerath
0
153
Member Avatar for hirenpatel53

While this has nothing to do with MS SQL (you are in the wrong forum), read [URL="http://www.chriscalender.com/?p=28"]this[/URL].

Member Avatar for Momerath
0
97
Member Avatar for Fungus1487

Have you looked at [URL="http://www.codeproject.com/KB/cs/Get_bitmap_from_AVI_file.aspx"]this[/URL] on CodeProject? Or maybe [URL="http://www.codeproject.com/KB/audio-video/avifilewrapper.aspx"]this[/URL]?

Member Avatar for Momerath
0
242
Member Avatar for macaela

The assigning of an empty string is so when the line where it adds the character to the string won't cause a null reference error (you can't add a character to a null). The [ICODE]mystring.Length-1[/ICODE] is to get the index of the last character. Since indexes are zero based the …

Member Avatar for ddanbe
0
171
Member Avatar for ddanbe

Your StreamReader is only available in the block where it is declared (in the very small try {} catch. Move lines 11 through 16 to be inbetween lines 43 and 44 so the StreamReader will exist for the entire block of code.

Member Avatar for Mitja Bonca
0
572
Member Avatar for Ralphael

[URL="http://lmgtfy.com/?q=how+to+analyze+an+algorithm"]How to analyze an algorithm[/URL]

Member Avatar for soutrik
0
51
Member Avatar for ninikobb

I've always used [URL="http://msdn.microsoft.com/en-us/library/system.array.getlength.aspx"]GetLength()[/URL]

Member Avatar for ddanbe
0
121
Member Avatar for fuzzyrose

1) System.Data.DataSet 2) System.Data.SqlClient.SqlCommand 3) System.Collections.Generic.List<T> 4) System.Collections.Hashtable 5) System.Net.HttpWebRequest (or one of the other Http classes) 6) System.Data.SqlClient.SqlException 7) No idea what org.apache.velocity.Template does for you. 8) System.Data.SqlClient.SqlConnection

Member Avatar for fuzzyrose
0
172
Member Avatar for RonaldvanMeer

Most likely you'll need to invoke on the client form ([URL="http://msdn.microsoft.com/en-us/library/zyzhdc6b.aspx"]Invoke[/URL])

Member Avatar for Momerath
0
218
Member Avatar for toadzky

You are starting at array index 0x8000 which is the 0x8001 byte into the array (arrays start at 0). You are trying to read one more byte than you have array size (0x8000 + 0x8000 = 0x10000).

Member Avatar for Momerath
0
154

The End.