|
I'm trying to double buffer an entire form (i.e. all the controls into one off screen buffer). I've tried using the SetStyles double buffering but that appears to double buffer on a individual control basis and not work at all on the ListView control.
Has anyone done this before?
I'm heading in the direction of overriding OnPaint on the form itself and somehow force each control to draw into an offscreen buffer I created. When that's done draw the offscreen image on screen.
I don't have this working yet but thought I throw this out there incase someone has tried this already or has a better solution.
Thanks.
Kevin
|
|
|
|
|
try this code i got no flickering after using it (pass the function the listview handle)
public enum LVS_EX
{
LVS_EX_GRIDLINES =0x00000001,
LVS_EX_SUBITEMIMAGES =0x00000002,
LVS_EX_CHECKBOXES =0x00000004,
LVS_EX_TRACKSELECT =0x00000008,
LVS_EX_HEADERDRAGDROP =0x00000010,
LVS_EX_FULLROWSELECT =0x00000020,
LVS_EX_ONECLICKACTIVATE =0x00000040,
LVS_EX_TWOCLICKACTIVATE =0x00000080,
LVS_EX_FLATSB =0x00000100,
LVS_EX_REGIONAL =0x00000200,
LVS_EX_INFOTIP =0x00000400,
LVS_EX_UNDERLINEHOT =0x00000800,
LVS_EX_UNDERLINECOLD =0x00001000,
LVS_EX_MULTIWORKAREAS =0x00002000,
LVS_EX_LABELTIP =0x00004000,
LVS_EX_BORDERSELECT =0x00008000,
LVS_EX_DOUBLEBUFFER =0x00010000,
LVS_EX_HIDELABELS =0x00020000,
LVS_EX_SINGLEROW =0x00040000,
LVS_EX_SNAPTOGRID =0x00080000,
LVS_EX_SIMPLESELECT =0x00100000
}
public enum LVM
{
LVM_FIRST =0x1000,
LVM_SETEXTENDEDLISTVIEWSTYLE=(LVM_FIRST + 54),
LVM_GETEXTENDEDLISTVIEWSTYLE=(LVM_FIRST + 55),
}
public class Extended
{
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int SendMessage(IntPtr handle, int messg, int wparam, int lparam);
public static void SetExStyles(IntPtr Handle)
{
LVS_EX styles;
styles = (LVS_EX)SendMessage(Handle, (int) LVM.LVM_GETEXTENDEDLISTVIEWSTYLE, 0,0);
styles |= LVS_EX.LVS_EX_DOUBLEBUFFER | LVS_EX.LVS_EX_BORDERSELECT;
SendMessage(Handle, (int) LVM.LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (int) styles);
}
}
|
|
|
|
|
Hello all,
I am new to C# and trying to write a program that will strip data from three different reports (2 Excel, 1 Text), then output the three "modified" reports. I can picture the flow of the GUI, but cannot seem to grasp the capture and massaging of the data itself.
Any suggestions would be helpful
|
|
|
|
|
Welcome to c# world!
Your request is very vague. Why not ask a more specific question, like how do I open an excel document in the app? Most things you can find by doing a search of the forums, you would probable find most of the answers you are looking for.
Most here are helpful, if you have specific questions...
Some resources:
Excel: http://www.codeproject.com/csharp/csharp_excel.asp
String handling: http://www.codeproject.com/books/0735616485.asp
Hope these help.
*****************
"We need to apply 21st-century information technology to the health care field. We need to have our medical records put on the I.T." —GW
|
|
|
|
|
I have been playing with the different events, but am not sure how to make this happen. I want to select the item currently under the mouse. This would give a highlight effect to the one you are over. Anyone know how to do this?
Thanks in advance.
*****************
"I know how hard it is for you to put food on your family." —GW
|
|
|
|
|
If you've not already found a solution, try looking at the OnMouseMove event. Are you trying to give feedback for any control on a form as the user moves from one to the other or are you trying to do this within a specific control, like a ListView or ListBox?
|
|
|
|
|
Hello everybody,
I'm building a class library and i would like to add summary information to some function/classes, the ones that are shown by the object browser. When I add the summary information it is only available to me in the object browser when I'm working in my library.
I would like to see the same information in the object browser when I add the library to an application.
Can somebody please tell me how to do that.
Regards,
Paul
|
|
|
|
|
Are you using the ///summary
in your code ,if not ,try it.
|
|
|
|
|
I'm sure, so that is not the problem
thanks anyway
|
|
|
|
|
I discovered my problem
It only works in C#. I was trying to add my C# DLL in managed C++.Net. It all work so easy together that I forget this could be a problem. (should have mentioned this, should I?)
I'm still a bit disappointed, but it can rest now
Thanks for the trouble,
Paul
|
|
|
|
|
Is there a application around which could help me convert VB.NET project in to C#?
leo
Kathmandu, Nepal
|
|
|
|
|
|
Our VB.NET to C# converter is Instant C#.
Download the Demo Edition at www.instantcsharp.com
(the Demo Edition is also supported)
David Anton
Tangible Software Solutions
www.tangiblesoftwaresolutions.com
Home of the Instant C# VB.NET to C# Converter and the Instant VB C# to VB.NET Converter
|
|
|
|
|
Is there any sample Tapi3 Application created in c#
|
|
|
|
|
I have developed application in c#. which save data in xml. but i don't want to show xml file to user. so i want to put custom file with custom extention(e.g .abc), and when user double click that file then my application will start and load xml file in my own application. How i can implement this.
(my requirement is like microsoft word. when we double click on abc.doc then microsoft word load abc.doc)
Thanks
|
|
|
|
|
|
How to determine from 10 15 tool bar button that mouse is over which button,and how can we change image item of the button on mouse over event.How to do in Tool Bar.
|
|
|
|
|
Use the Tag property for each button. Then query this value in the form with either with a switch statement or if-else-endif type of construct.
|
|
|
|
|
How do I get the name of the local machine from a C# application?
|
|
|
|
|
Try:
System.Net.Dns.GetHostName();
|
|
|
|
|
|
Thanks, that worked great.
|
|
|
|
|
Hi,
Guess the following code will help you.
string hostname = "";
hostname = Dns.GetHostName();
MessageBox.Show(hostname.ToString());
Thanks and Regards
SGS
|
|
|
|
|
|
I Want My program to hide the TaskBar automatically when it run ?
how can I do that ? and what is the class that controls the main components of the window like (taskbar my computer controlepanel)?
misho
|
|
|
|