|
Hi,
the following modification should work:
class ListViewSortering : IComparer
{
private int colStart;
private int colEnd;
public ListViewSortering()
{
colStart=0;
colEnd=0;
}
public ListViewSortering(int columnStart, int columnEnd)
{
colStart=columnStart;
colEnd=columnEnd;
}
public int Compare(object x, object y)
{
ListViewItem lvi1 = (ListViewItem)x;
ListViewItem lvi2 = (ListViewItem)y;
string start1 = lvi1.SubItems[colStart].Text;
string end1 = lvi1.SubItems[colEnd].Text;
string start2 = lvi2.SubItems[colStart].Text;
string end2 = lvi2.SubItems[colEnd].Text;
if (end1.Length == 0 && end2.Length > 0)
return -1;
if (end1.Length > 0 && end.Length == 0)
return 1;
return -String.Compare(start1, start2);
}
}
So basically when only one of both items doesn't have an end date you'll return a special result value. In all other cases the normal comparison is done.
Robert
|
|
|
|
|
I'll try that out, thanks alot!
-- modified at 9:56 Monday 10th July, 2006
Worked like a charm
|
|
|
|
|
Where can I find Articles on transforming .Doc file to a single string so i can keep it in the DB
thank you
what's hard we do what's impossible will just take longer time to complete
|
|
|
|
|
Probably this is the one you are looking for:
http://www.codeproject.com/csharp/convertdocintootherformat.asp
|
|
|
|
|
Depending on your intended usage of the data it would be more effecient to store the document in a binary field.
|
|
|
|
|
I want to run queries on the string and find specific words
may be you have another idea?
thanks
what's hard we do what's impossible will just take longer time to complete
|
|
|
|
|
Hi,
I convert an C# application created in VS 2003 to VS 2005, and
notice that the button is still of the old appearance style in VS2003, and even I add new button in the form converted from VS2003,
the button style still the same ? Why, and how can I change it
to the new appearance of VS 2005 ?
Thanks
|
|
|
|
|
Hm... I know that there is a new context menu, but I don't think that there is anything new with the buttons?
---
b { font-weight: normal; }
|
|
|
|
|
I've been building new VS2005 WinClients for quite awhile now and there is not difference in the Button class.
|
|
|
|
|
Don't you notice that the button class in VS2003 is more ugly
that the VS2005, for both using the same "standard" FlatStyle property ?
|
|
|
|
|
|
Would you mind leave ur email to me so I can send
the pics of the button to you for illustration ?
Do you think there are any window theme settings
for the form that can affect the button appearance ?
|
|
|
|
|
Did you try "system" instead of "standard" for the FlatStyle?
|
|
|
|
|
Hi everybody,
I would be glad if anyone can help to get printer information using C#.
Details like how many printers are connected,their configuration ,etc to a PC(connected in a LAN).
Thanks & Regards,
Karthik.
|
|
|
|
|
Look at this article, and you must change it to what you need:
http://www.codeproject.com/csharp/printeroffline.asp
|
|
|
|
|
Thanks 4 this.
Well i already have it.
I want to know the coding to get number of printers connected 2 a Pc and their configuration.
|
|
|
|
|
Hello,
I am using MFC - ActiveX control in C# based windows application.
I am not able to debug the control with the C# application while it is possible with the MFC applcation.
I want to call a function on buttton click event of windows application.
The function is in ActiveX control.
I have given the path of the exe in control also enabled the Unmanaged debugging in Windows application, but when i start debug it doesn't populate the exe, instead it comes out and ready for debug again.
Is it possible to do so if yes then HOW.
Thanks.
Byee..
Gajesh
Pune(India)
|
|
|
|
|
If you have enabled unmanaged debugging in the application and it still doesnt work, try this:
Open the cpp source file in your .net IDE (where the c# project is open). Add a breakpoint in the cpp file where you want the control to stop (the ActiveX function that you wish to call). Now try to step into the cpp function from your c# code.
|
|
|
|
|
I like an “Tree-List-Property-View” ala MS Project. Anyone who know any ready to use control for that?
If, I would bee glad to not “invent the wheel again”…
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi,
I have 2 program: A and B
A will send data to server through port X.
How can I write B to capture the data of X?
Thanks,
Hung.
Hung
|
|
|
|
|
Probably you are looking for this:
http://www.codeproject.com/cs/internet/sharppcap.asp
|
|
|
|
|
1. While instaling the setup of an windows application, the existing version of same application should be automatically removed from the system?.
Jey
|
|
|
|
|
I recommend you read Chris' sticky post on how to get answers to questions.
Assuming you are asking : I am using a Setup and Deployment project and when I install new versions it stops due to an existing version already installed. I'd like to know how to change this behavior so that I can have the deployment project automatically remove the old version then install the new one.
The answer is this: Select your project, look at properties. Change the appropriate attribute. Note: You can only remove existing versions if a) the software was originally installed from a file on the hard drive -and- b) the new version is installed from the same location. I imagine there are other quirks in the process as well that limit it's effectiveness. I've only gotten this to work from within my project but never deployed. (Probably needs to Assert security attributes that I've not figured out yet.)
|
|
|
|
|
sorry for unclear posted message. Here after i will post the message
clearly and thanks for the job
Jey
|
|
|
|
|
1. How to add text objects and others at run time. How to sort the fileds in report, choice of sorting field will be read from user.
2. Can I run the application that has crystal reports, without this error "
keycodev2.dll error ". If i install the crystal report support files from dotnet cd in client machine then it is not showing any error. Can i add those crystal decision files with the project. where i can get the files?. Can we add the framework with the project
Jey
Jey
|
|
|
|