Hi, I have an urgent issue with an activeX control I have written in .NET 1.1 based on the listview. When I run the control on .NET 2.0 there is very bad flickering whereas on .NET 1.1 there isn't any. I am updating the listview asynchronously using BeginUpdate/EndUpdate along with a separate class that gets the data in a separate thread. The listview is then updated using the BeginInvoke approach. I have dissassembled the .NET 2.0 listview and found that for some reason on every item add it executes a control.invalidate() hence forcing a repaint. Therefore, this leads me to believe that there is no way to avoid the flickering.* Does anyone have any information on this as I am surprised that the listview could be released with this problem?
Anyway, this also leads me to believe that to resolve my problem is to force the application to use .NET 1.1. However, my control is hosted as an activeX object in IE. Therefore, I cannot just use the IExpore.Exe.config file to force IE to use of .NET 1.1 framework for obvious reasons. Therefore, my second question is.* Is it possible to configure an assembly to use a specific .NET framework version?
My third question is.* If I am constrained with using an executable (having my own app domain) so that I can use my own config file to force the .NET framework version. Is it possible to host my activeX.exe in IE withing the tags as I am now with my activeX control? I hope you understand my post and hope someone out there can help. Many thanks in advance
pliu_2000
Posts
-
Listview control flckering in .NET 2.0 -
How to detect overlapping windowsHi, Thanks for the reply. I've already tried BeginUpdate/EndUpdate and AddRange. However, each of these still repaint the whole control causing a flicker. The setup I have is quite unusual. On a normal winform application both these approaches are successful. However, I have an activeX user control written in C# containing the listview and have exposed methods and events through COM. The activeX control is displayed on a web page using the tags. This has been successful using the BeginUpdate/EndUpdate approach and .NET 1.1 where only a slight flicker was visible. However, now we are updating our desktops to include .NET 2.0 and .NET 1.1. This seems to exagerate the flickering hence why I have take my approach to reduce the flickering. Thanks again Peter
-
How to detect overlapping windowsWhat I have done is set a flag while adding a new item. I have also overridden the WndProc to stop it erasing the background and invalidates the new items rectangle. When the flag is set, only the new items rectangle is repainted and not the whole control However, the effect when a window overlaps my control while this flag is set is that the background is not repainted as my WndProc prevents this. Therefore, I need to somehow detect when a window overlaps my control so that I can tell WndProc to allow the background to be repainted. I hope this explains my problem. Please feel free to make suggestions on how to do this or a better approach Thanks again Peter
-
How to detect overlapping windowsHi, I am writing an application that uses an extended listview. The extended listview is modified to reduce the flickering when being populated by only invalidating the single item being added. However, If another window is dragged to overlap my application while the listview is being populated, the listview does not redraw when the overlapping window is moved out of the way. Therefore, I think I need to capture the event when the window overlaps my control. How can I do this? I believe there is an win api that can flag this, but I am not sure which one. Anyone know or anyone have a better approach? Thanks in advance Peter
-
How to add textbox or combobox to toolbarHi, I'm doing a project that requires a textbox and combo box embedded in a toolbar. Something similar to Outlooks Find/Look For field or Visual Studios Find in files combo box. I know it's possible to create a dropdown button on the toolbar designer, but this isn't what I'm looking for. I guess there must be a way of doing it using native methods, but can anyone give me some clues on this. Thanks in advance Regards Peter
-
How do I create different sized toolbar buttons?Thanks, but no luck there. The AutSize property is only for the Toolbar control only and not available for each button. :-(
-
How do I create different sized toolbar buttons?Hi, I have a toolbar on a windows client form. The toolbar contains a mix of icons and icons + text styled buttons. However, the toolbar seems to resize all buttons to the widest button. How can I make the toolbar buttons different widths? I guess I'm trying to get something similar to the IE toolbar where you have buttons like the Home (icon only) and the Search (icon + text). Any help/advice is much appreciated Thanks Peter
-
Best practices question: do you comment out or delete old code?If I'm editing existing code (mostly written by other people) I comment it out and put a region around it so I can collapse it. Once the new code is stable and approved, the commented code is deleted. Like most other people, I rely on source control for historical references.
-
How to format ugly treeview checkbox?Thanks for your reply :-D I'm using .NET 1.1 so will try the System.Windows.Forms.ControlPaint.DrawCheckBox approach. I'll also have a look for the controls you talked about too.
-
Database Microsoft Access[How can I protect my password for connection to MS Access database?] Not too sure what you mean here, but I normally put use a config file with the user name and password encrypted. The code then decrypts the values and into the connection string. Sorry, not sure if I answered that one properly [Can I use Stored Procedure with Access Database?] This really depends on the version of Access you are using. I think Access 2003 allows you to either use its Jet engine (I think they still call it that) or Msde (local SQL server). This is depends on how the Access database was setup. If it was setup using Msde, then all linked tables and queries reference SQL server tables and stored procedures. However, if it was setup with the Jet engine, then it will be Access queries. In both cases, if you are using ADO, then the queries can be treated as stored procedures in your ADO.Command object anyway. The restriction with the Access query is that you cant use things like return value, but both accept parameters. If you are using an older version of Access then it uses the Access query and the Jet engine. I hope this helps [anyone feel free to correct me if my memory has failed me with Access as it's been a little while since I used it] Peter :laugh:
-
How to format ugly treeview checkbox?Hi, I am writing an application containing a treeview. The requirements state that the treeview should have checkboxes to help multi-selection. However, the checkboxes on the treeview do not look nice at all :sigh:. The checkbox outline is thick and looks rather silly. How can I change this? :confused: Is it possible to make the outline thinner? Any help is much appreciated :-D Regards Peter
-
Should you put config files in the GAC with assemblies?<I though GAC stood for "Global *Assembly* Cache"?> Precisely my point, hence why I asked if this was good practice and if there was a "good" way of referencing configuration information from the GAC. If the only solution is to hard reference the config file then that is what I have to do. However, if there is another way, then I would really be interested. Btw - thanks for the reply ;) P.
-
Should you put config files in the GAC with assemblies?Hi, This is my first post here so please be gentle :-) I know it is possible to copy config files into the GAC such that an assembly can read from it based on its own location. This avoids having to partially hard code a location for the config file. However, is this good practice? What is the best approach for doing this? Thanks in advance :-D P