|
Hy,
To create a skin for a windows form i use images. Set an images as the background image of your form and also set the border style of the form to None. The image I use has already drawn on it a maximize box and other buttons. I only put a label on top of these buttons and handle the click event. Using this method you can place buttons everywhere on the form.
Hope my suggestion helps
Do your best to be the best
|
|
|
|
|
Hi!
I have a ListView with two date-columns, "started", and "ended". I want them all to be sorted on the "started" column, but I want all the rows without an "ended" value separated and displayed before rows with "ended" value, like this:
Started Ended
050101
051110
051231
050101 061231
050910 061231
Ive done an ListViewItemSorter thingie, but I can't seem to make it sort with two separate columns:
class ListViewSortering : IComparer <br />
{<br />
private int col;<br />
public ListViewSortering() <br />
{<br />
col=0;<br />
}<br />
public ListViewSortering(int column) <br />
{<br />
col=column;<br />
}<br />
public int Compare(object x, object y) <br />
{<br />
return -String.Compare(((ListViewItem)x).SubItems[col].Text, ((ListViewItem)y).SubItems[col].Text);<br />
}<br />
}
And the call:
this.wmLvInsatser.Sorting = SortOrder.None;<br />
this.wmLvInsatser.ListViewItemSorter = new ListViewSortering(1);<br />
<br />
this.wmLvInsatser.Sort();
Can anyone point me in the right direction?
-- modified at 7:27 Monday 10th July, 2006
|
|
|
|
|
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.)
|
|
|
|