Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
21
Posts with Upvotes
16
Upvoting Members
12
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
4 Commented Posts
0 Endorsements
Ranked #630
~21.9K People Reached
Favorite Tags
Member Avatar for complete

Note that the [icode]params[/icode] keyword is not required unless you are going to add individual ints as multiple parameters to the method.

Member Avatar for hscoder
0
162
Member Avatar for aravinda reddy

I think from what you have said you need to get the optimal price for the space/weight allowed a very interesting problem, this is a version of the multi-dimensional knapsack problem. See [URL="http://tracer.lcc.uma.es/problems/multi01knap/knap.htm"]here [/URL] for an in depth description of the problem. From the layout of this question I guess …

Member Avatar for Momerath
0
131
Member Avatar for Cactusmania

If you are using an rich text edit just use the line breaks, most apps that compare and highlight changes in lines will highlight the actual change and the line number part of the display. In short I would just use the default action.

Member Avatar for Cactusmania
0
181
Member Avatar for Joelles

Why do you need to create a builder app to do that? Could you not just use user configuration settings. (Properties.Settings in a forms app)

Member Avatar for Joelles
0
120
Member Avatar for khan17

Yep that should work just the same way as any other key. [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx"]Microsofts SendKeys Description [/URL]

Member Avatar for ddanbe
0
147
Member Avatar for sachintha81

Have a look at this thread: [URL="http://social.msdn.microsoft.com/Forums/en-US/windowssecurity/thread/10c6ff4b-701b-4351-a3d8-a716d8831a66"]http://social.msdn.microsoft.com/Forums/en-US/windowssecurity/thread/10c6ff4b-701b-4351-a3d8-a716d8831a66[/URL]

Member Avatar for privatevoid
0
511
Member Avatar for "ICode"

FYI: When creating graphics in a Windows Forms App by default you use GDI+. It's not normally called WFA hence ddanbe's confusion. You can look at using either WPF or DirectX depending on the requirements you have. googleing either will give alot of tutorials and furthur information.

Member Avatar for "ICode"
0
212
Member Avatar for Gospp

I think I see the problem: If you have a argument that is a string you would assign it like this [icode]string str = "'001', '002', '003'"; [/icode] now if you added that to your query like this [icode] string.format("Select * from ... where appName in {0};", str); [/icode] it …

Member Avatar for Gospp
0
125
Member Avatar for onlinessp

Have a look at the below, the System.Diagnostics.Process class. [CODE] Process[] processes = Process.GetProcesses(); ... Process p = Process.GetProcessesByName("aname"); p.Kill(); [/CODE]

Member Avatar for privatevoid
1
168
Member Avatar for lowhzplayinfool

I don't think I quite understand what you are trying to achieve. If you want to access the same static methods/functions from a number of places the best way to do this is to create a class like this: [CODE] public class MyClass { public static bool MyMethod(float arg) { …

Member Avatar for lowhzplayinfool
0
140
Member Avatar for ereruh

Um ignore IceMans post as the example is in C/C++. To do this using a form is quite simple. In the properties of designer select the events tab and double click the gap next to KeyPress to create the event handler code for you. Now do somthing like below: [CODE] …

Member Avatar for ereruh
0
135
Member Avatar for hkBattousai

In newer versions of .Net you can declare properties like this: [CODE] // For a simple property (this is useful because properties // are thread safe) public int MyInt{get; set;} // To allow it to only set with the current class but viewable outside public int MyInt{get; private set;} [/CODE] …

Member Avatar for hkBattousai
0
423
Member Avatar for nitin2010

You could use a standard for loop: [CODE] for(int index=0; index < hashtable.Keys.Count; index++) { switch(hashtable.Keys[index]) { ... } } [/CODE]

Member Avatar for privatevoid
0
166
Member Avatar for johnroach1985

Is this of any use to you? [URL="http://www.codeproject.com/KB/system/cstcpipwmi.aspx"]http://www.codeproject.com/KB/system/cstcpipwmi.aspx[/URL]

Member Avatar for johnroach1985
-1
272
Member Avatar for adino2

It could be a threading issue or somthing similar. What happens when you step through it and have you tried using try and catch around the affected code?

Member Avatar for adino2
0
112
Member Avatar for Kligham

1/. An IntPtr is a pointer to an int you can convert it easily to either int32 or int64 (int and long respectivly) see below: [CODE] int i = 10; IntPtr p = new IntPtr(i); int aInt = p.ToInt32(); long aLong = p.ToInt64(); [/CODE] 2/. All that code is doing …

Member Avatar for privatevoid
0
124
Member Avatar for Cory_Brown

It's also worth noting that you can use the -= operator to stop the delegate pointing to a method e.g. [CODE] Car myCar = new Car(); public void Start() { myCar.Crash += new Car.CrashEventHandler(myMethod); } private void myMethod() { ... } public void Stop() { myCar.Crash -= new Car.CrashEventHandler(myMethod); } …

Member Avatar for privatevoid
0
130
Member Avatar for makdu

I think the way to do this is to use a manifest file as explained [URL="http://www.enusbaum.com/blog/2007/08/26/how-to-run-your-c-application-as-administrator-in-windows-vista/"]here[/URL]. I think this will still prompt the user to click the run as admin popup though.

Member Avatar for makdu
0
5K
Member Avatar for bords

Yep you really should use parameterised querys instead of directly inserting arguments into strings! See security issues regarding SQL injection etc. I tend to use somthing like this: [CODE] public DataSet Query(string sql, params SqlParameter[] args) { try { SqlConnection connection = new SqlConnection(this._connection); SqlCommand command = new SqlCommand(sql, connection); …

Member Avatar for bords
0
130
Member Avatar for elcaro.miao

1/. You don't need a new method for every button just call the same method and do somthing like this: [CODE] private void btnLetter_Click(object sender, EventArgs e) { if (Pwdsel == 1) { insertStringPass((sender as Button).Text, this.Password.SelectionStart); } else { insertStringUser((sender as Button).Text, this.Username.SelectionStart); } } [/CODE] 2/. You should …

Member Avatar for elcaro.miao
0
297
Member Avatar for saint.troy

If you are in the new item dialog you have gone too far. The 'Component...' option is in the add menu second from bottom. I am using VS 2008

Member Avatar for Dr_Gonzo
0
135
Member Avatar for Mitja Bonca

I am not 100% sure what you actually want to know. If the time in the database is 'DateTime' or 'SmallDateTime' then no matter how you pass a date it will store it with hours mins and seconds. If you just pass a date then the database will contain a …

Member Avatar for Mitja Bonca
0
153
Member Avatar for makdu

You will still need the .Net framework for your executable to run on the target machine. If your executable references any other dlls then you will need to add those too. You need the .Net framework because the exe you have is not a set of machine code instructions that …

Member Avatar for privatevoid
0
128
Member Avatar for Lukezzz

You will need to call CreateChart() using a Chart object as an argument I presume that there is a Chart described in dotnetCHARTING.WinForms that you will need to use. I don't know what a Chart is so I can't be sure but I suspect you need to do somthing like …

Member Avatar for privatevoid
0
220
Member Avatar for thanatos2

What you are looking for is a sorting algorithm, there are a few of these and they vary in complexity from the recursive Quicksort to a simple Bubble sort. This tutorial gives you code and a more in depth explaination:[URL="http://www.publicjoe.f9.co.uk/csharp/sort00.html"]http://www.publicjoe.f9.co.uk/csharp/sort00.html[/URL]

Member Avatar for Geekitygeek
0
133
Member Avatar for hitro456

If you did not force all the elements of an interface then what would happen when a missing element was called? (see below) [CODE] foreach(ITemp tmp in myCollection) { string name = tmp.GetName(); } [/CODE]

Member Avatar for privatevoid
0
70
Member Avatar for Jellybaby
Member Avatar for makdu

It's probabbly because you have a console app and Message is part of System.Windows.Forms eg not included in a console app by default. Even if you add the assembly reference I don't think the WndProc will work unless you have a form.

Member Avatar for makdu
0
2K
Member Avatar for carey_amanda

Is the dll import expecting it to be in 'Windows\System32' or somthing similar?

Member Avatar for carey_amanda
0
187
Member Avatar for privatevoid

I have a small WMI issue that I am having trouble with. I am using root\WMI:MSSerial but would like to retrieve properties from both MSSerial_PortName and MSSerial_CommInfo specifically the following properties PortName, IsBusy and Active. If I query just one object then the code below works fine but I can't …

0
68