I've got an application which adds 10+ items to a treelist every second. This causing the control and UI to unresponsive and sometimes can't even paint it enough, also consumes a lot of CPU.
These new items coming from different threads so I can't use .BeginUpdate() unless I do some sort of local caching.
If I do BeginUpdate() and EndU...
Hi,
I'm writing a mini editor component that is much like Notepad++ or UltraEdit that needs to monitor the files the users open - its a bit slimy, but thats the way it needs to be.
Is it wise to use multiple instances of FileSystemWatcher to monitor the open files - again like Notepad++ or UltraEdit or is there a better way to manage t...
I have big application (190 MB in 600 files) deployed using clickonce 3.5. After installation of this application i run it from link located in Start Menu but it takes over 4-12 sec to show my Splash Screen. When this application is run from .exe file Splash screen is visible after 1 sec.
My application don't use automatic updates (Clic...
I've started using this alot to link elements of my UI to their data backing class (whatever that might be). What are some of the common uses you put the Tag property to use for?
Indeed, do you use it at all? I know I didn't for a very long time.
...
I'm working on a WinForms app and need to record the location of MouseDown and MouseUp events. My problem is that the events happen on different controls so their coordinate systems don't match (all I need is the amount of drag). I tried adding in the location of the sending control but it still doesn't work right.
Is there a simple sol...
I have a series of buttons that display filenames. If I set the Text property when the filename is wider than the number of pixels available the text "wraps" and instead if the text being displayed LeftMiddle it is displayed LeftTop. Therefore I only display as many characters as can be shown (using the PathCompactPathEx() method).
Howe...
I have a C# Windows Form application that contains a menu with this event:
private void createMenuItem_Click(object sender, EventArgs e)
{
canvas.Layer.RemoveAllChildren();
canvas.Controls.Clear();
createDock();
}
I would like to provide the user with the opportunity to fire this event through another m...
I use data binding to display values in text boxes in WinForms client (C#). When the user clicks Save, I persist my changes to the DB. However, the new value in the active editor is ignored (the previous value is saved). If I tab out of the active editor, then Save, the new value is persisted, as expected.
Is there a way to force the ac...
I have a very simple WPF user control that is mixed in with a windows forms app. It has a list box that renders its scroll bar without the thumb (image below). I narrowed it down to a plugin in my app that uses Managed DirectX (MDX). If I remove the plugin, the scroll bar is just fine. I know MDX is deprecated, but I don't think toda...
Hello, I have a textbox that I would like for only numbers. But if I hit the wrong number, I cant backspace to correct it. How can I allow backspaces to work. Thanks
private void amount_PaidTextBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (Char.IsNumber(e.KeyChar) != true)
{
e.Handled = true;...
I have a winforms app that is supposed to display a tiled background and use click-and-drag to pan around. Most of the time it work but there are a few spots where it jumps in the wrong direction (for instance if I click and drag up across the center line of the form, it jumps down by about half a screen). I can't seem to find anything w...
I have a RichTextBox which contains links posted by the users.
The problem is that my RTB makes the color of the links black, and the background color is also black. This leads to the links being invisible.
How do I change the color of the links in the RTB?
...
I am looking for a way to change the value of the DisplayName attribute of a property at run-time. Is this even possible in Windows Forms?
...
Extended problem
I would like to add a new problem in addition to the original problem specified below. One of the user controls in the application contains a list of objects that I need to access from another user control. How can this be done? (I don't believe the division into controls is very well performed, but I'd rather not chang...
I have been playing around with the MVP pattern using winforms for the last couple of days, there is only really one thing that I'm not sure how to do. How do you create a subform from another view. Would this be a valid option.
public class MyForm : IMainFormView
{
private MainFormPresenter pres;
public MyForm() ...
Is it possible to bind to a property of a property?
Here is what I have:
[Bindable(true)]
public class DataClass
{
private string DescriptionValue = null;
private Content DataContent Value = new Content();
....
[Bindable(true)]
public Content DataContent
{
get { r...
Hi.
I have a windows forms app where I have split different functionality into several user controls. I want each of these user controls to have an accept button.
Any best practices here?
My idèa is to detect which user control that has focus, and than set it in the parent Form.
Any other idèas?
...
Hi all,
Did some searches here & on the 'net and haven't found a good answer yet. What I'm trying to do is call a button twice within the same class in C#.
Here's my scenario -
I have a form with a button that says "Go". When I click it the 1st time, it runs through some 'for' loops (non-stop) to display a color range. At the same tim...
Our app has a very large number of System.Drawing.Bitmaps that are to be displayed with drop shadows. What's a quick way of drawing drop shadows, with a given blur radius and colour? It's a winforms app, no WPF. p/invoke preferred to unsafe code, but ideally neither; third-party libraries not allowed.
I've seen the 'Image Processing ...
I'm getting an error when trying to create a barcode image using a barcode font. This is happening in production but not in dev.
The method creating the barcode is:
/// <summary>
/// Create a barcode image by writing out a string using a barcode font and save it
/// </summary>
/// <param name="barcodeText">The text string of the barco...