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
~22.4K People Reached

59 Posted Topics

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
175
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
134
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
186
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
123
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
151
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
519
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
320
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
128
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
171
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
143
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
138
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
426
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
170
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
292
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
118
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
127
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
132
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
136
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
303
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
138
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
156
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
133
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
221
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
137
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
72
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
192
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
70
Member Avatar for babbu

There is a [icode]Column.Visible[/icode] property, you should be able to set that to false. How you do that depends on how you are binding the data to the grid view.

Member Avatar for babbu
0
4K
Member Avatar for zachattack05
Member Avatar for mpgitc

Have you tried anything like this? If the library executes the event on a different thread you will get an error when you try to access UI components as they are on a different thread. [CODE] public void OnSwyxEvent(int msg, int param) { if (this.InvokeRequired) { this.Invoke(new Action<int, int>(OnSwyxEvent), msg, …

Member Avatar for mpgitc
0
185
Member Avatar for Chargerfan

Ok, my knowledge of complex numbers is scant to say the least. This to me looks like a maths question hidden inside a c# question. To answer the c# part just assign the Text property of the edit box with the value eg. [CODE] float a = 0.23f; textBox1.Text = …

Member Avatar for privatevoid
0
102
Member Avatar for xyz12

You could use a database with related search terms included in a record with the url of the relevent image. You could also use metadata to search through images. It really depends what you need to do...

Member Avatar for xyz12
0
123
Member Avatar for zuve_fox

You will need to somhow get hold of the Canon SDK. To do that you used to have to register as a developer on the cannon website but It's been a while since I looked at this.

Member Avatar for privatevoid
0
71
Member Avatar for Jaydenn

I don't see why you would need one, the operating system should deal with that for you. Do you really mean toolbar, if you do look for ToolStrip and ToolStripContainer in the toolbox.

Member Avatar for privatevoid
0
121
Member Avatar for MxDev

Look at [icode]RichTextBox.Select()[/icode], see if the code below helps: [CODE] // The draw back to this is if a line wraps it will continue the // selection until a newline char is found. int startIndex = myRtfEdit.GetFirstCharIndexOfCurrentLine(); int selectionLength = myRtfEdit.Text.IndexOf('\n', startIndex) - startIndex; if(selectionLength > 0) myRtfEdit.Select(startIndex, selectionLength); [/CODE]

Member Avatar for privatevoid
0
111
Member Avatar for DIPY

[QUOTE] [CODE] public TreeNode FindInstanceNode(string SubContainer,string instance) { TreeNode Node = GetTreeViewClickedNode(); foreach (TreeNode trNode in Node.Nodes) { if (trNode.Text == "SUB-CONTAINERS") { TreeNodeCollection tcSubNodes = trNode.Nodes; foreach (TreeNode trInode in tcSubNodes) { TreeNodeCollection tcInsNodes = trInode.Nodes; foreach (TreeNode InstanceNode in tcInsNodes) { if (InstanceNode.Text == "INSTANCE" && InstanceNode.FirstNode.Name == …

Member Avatar for Geekitygeek
0
132
Member Avatar for reyarita
Member Avatar for reyarita
0
115
Member Avatar for shine_jose

I don't think this is relevent to this forum. In most cases you just move your source files to the active directory of your server but you have not supplied enough information for me to answer your question.

Member Avatar for djzia
0
97
Member Avatar for kobalt

Note that the below are links: 1/. [URL="http://support.microsoft.com/kb/311566"]Read Xml into the dataset[/URL] 2/. [URL="http://en.csharp-online.net/Presenting_Data_with_the_DataGridView_Control_in_.NET_2.0%E2%80%94Basic_Data_Binding_with_the_DataGridView"]Use binding to link your dataset with the grid view[/URL] 3/. [URL="http://quickstart.developerfusion.co.uk/quickstart/howto/doc/Xml/SaveDataSetXML.aspx"]Save the dataset as Xml[/URL]

Member Avatar for sknake
0
977
Member Avatar for sati02

I think in most cases like this the server is built into the client so that you don't need a seperate server app. I would look at using UDP broadcasts for finding people who are online and then creating a client server link using TCP between the person initiatinag a …

Member Avatar for sknake
0
193
Member Avatar for melodie123

Have a look at this thread: [URL="http://www.daniweb.com/forums/thread242898.html"]http://www.daniweb.com/forums/thread242898.html[/URL]

Member Avatar for sknake
0
88
Member Avatar for dennis.d.elston

That looks very much like C rather than C#. I think [ICODE] if (amt = % 10 = 0) [/ICODE] should read [ICODE] if( (amt % 10) == 0) [/ICODE] it looks to me like you are assigning the modulo value to amt though I am unsure if this is …

Member Avatar for towerrounder
0
592
Member Avatar for Firethorn

If you want to display the image in the browser, I think, you should use an asp:control so you can reference it from the server side asp like this: [CODE] <body> <form runat="server"> ... <asp:Image ID="Image1" runat="server" /> ... </form> </body> [/CODE] To set the url use the following in …

Member Avatar for privatevoid
0
102
Member Avatar for dskumar_85

In C#: [CODE] DateTime time1 = DateTime.Parse("09/11/2000"); DateTime time2 = DateTime.Parse("09/12/2000"); if(time1 > time2) {...} [/CODE]

Member Avatar for privatevoid
0
73
Member Avatar for klactose

I don't think it is possible to cast generic lists like that although object is the base and float inherits object that is not the cas when it comes to generic lists. I think i'd try somthing like this: [CODE] List<object> temp = new List<object>(); temp.Add((float)20.5); temp.Add((float)21.5); temp.Add((float)22.5); List<float> temp2 …

Member Avatar for privatevoid
1
242
Member Avatar for Ari5555

I would look at WCF more closely it is based on SOAP and may be what you are looking for by the sounds of it. See: [URL="http://msdn.microsoft.com/en-us/library/ms731082.aspx"]Microsoft What is WCF[/URL]

Member Avatar for sknake
0
83
Member Avatar for jas2010

I need a bit more information about what you are trying to do before I can be much help. To use multithreading have a look at delegates and the BeginInvoke() method. There is lots of information available about multi threading and worker threads out there.

Member Avatar for sknake
0
110

The End.