I'm trying to understand better how data binding works in .net. I was checking this article, and I came up with this code:
public partial class Form1 : Form//, INotifyPropertyChanged
{
public event PropertyChangedEventHandler MyTextChanged;
[System.ComponentModel.Bindable(true)]
public string MyText
{
get { retu...
Please help! I don't know if maybe this is too simple but I can't get it right and can't seem to find the right answer on other posts. I am relatively new to C# and I program for hobby only, this is my first post.
I have this method CreateMap() inside a class Met where I have all my methods. It creates an array of dynamic custom control...
Hello, in my Win Forms app I create an array of dynamic custom controls inside a loop. These, lets call them 'boxes', are like my basic pieces of information. I also create string arrays in other parts of the code that contain the information of this 'boxes', so that for example string[3] is a variable of box[3] and so does stringa[3], s...
"TreeNode.IsVisible" is available but I can't tell from it whether it's visible or partially visible - "true if the tree node is visible or partially visible".
e.g. How can I tell if the following "Temporary ASP.NET" tree node is partially visible?
Also, how the text hovers directly over the node is called? Is it a tooltip in the end? ...
I created a custom control which is actually just two labels inside a panel. I want to add an event so that when my custom control is clicked (which would really be clicking either one of the labels) it would return the properties of the whole control, I think that would mean that 'sender' in the event handler would be my custom control ...
We know that when a Form is visually inherited, all of its controls are locked in design time. This problem requires that we place event handlers in the base form. Now what should I do if I want to place base-control event handlers in the derived Form?
Since the controls are locked, approach of double clicking on the control to add an e...
I have form with 4 buttons and Image. For all these controls i have added tool tip by using the following code
ToolTip objToolTip=null;
.....
public Form1()
{
objToolTip=new ToolTip();
}
.....
//Used to set the button lables based on Data from database
private void SetButtonlabels()
{
obj...
I have form. I have enabled the transparency on the form and I have removed it's Title Bar and Border. Inside that i have created a Custom UI, Which have the same features like a window. Basically, my idea is to create custom window.
Everything is working as expected but only the windows dragging is not working. I am not sure how to ena...
In C# using VS2005 I have a Winforms TabControl with 7 tabs, but I want the last tab to be only visible if a certain configuration option is set.
How to make the TabControl only show the first six tabs? In other words, how do I make the seventh tab not visible?
...
Hi,
I have build application using .NET 4.0, WinForms and DevExpress Winforms components.
I have a bug that I cannot reproduce using simple "step by step" method.
I am trying to use core dumps to debug this issue.
I can get core dump and view exception nicely inside visual studio using
adplus -crash -pn Main.exe -o c:\output -y C:...
I have two windows form and both set the topmost property to true. But the form border style of the one form is Set to "None". The other form has border. When these two forms launch together, the one without the border is always on top and overlap the other form. How do i make the form with border always on top? thanks.
...
How's the text(like below "Temporary ASP.NET") hovers directly over the tree node called? Any difference from tooltip?
Can it be controlled on visibility? e.g. do not display even when the node is partially visible.
pic: Windows Explorer
Thanks,
...
How can I get the size a form would have in Maximized windowstate without maximizing it ?
I am doing a snapshot of a map control. I want to maximize the window when doing the snapshot but without the user noticing. It seems that the form windows state doesn't change the form size when it is hidden :
this.Hide();
this.WindowState = Form...
I have a dialog box which I programatically alter the height of. The problem now is that I'd like to allow the user to expand it horizontally if they want to see more information.
How can I stop the dialog from resizeing vertically if I allow the user to resize it?
...
Im using the FindWindow method from user32.dll to find a window and get the handle, but is it possible to get the form control from the handle? and the use it like an ordinary form? Example:
int myhwnd = FindWindow(null, "MyWindow");
form myform = SomeMagic.GetFormFromHandle(myhwnd);
myform.Visible = false;
or do I have to continue to...
I’m currently writing a windows service that’s sole purpose in life is to poll a database and, based on the resulting information, update some other data. I wrote this as a windows service because it seemed an ideal platform. I don’t need any user interaction.
However, while developing it, I’ve noticed one or two issues that make deve...
I'm having the following error when closing a form in an application
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
***** Exception Text *******
System.NullReferenceException: Object reference not set to an instance of an object.
at Infragistics.Win.UltraWinGrid.Ul...
I understand that multi-threaded WinForms apps are required to use Control.Invoke or Control.BeginInvoke when accessing a control from a thread other than the UI thread.
But does this rule also apply when manipulating objects that are contained within a control but which do not derive from the Control base class?
For example, when usin...
I have experienced an odd behavior of the BackgroundWorker or the .NET framework when rethrowing an Exception in the RunWorkerCompleted event.
Exceptions occuring in the background thread are passed to RunWorkerCompleted. There I do a object temp = e.Result to rethrow the exception. Since this is supposed to happen in the main UI thread...
From here I have created a BaseForm, then set all its BaseForm.Designer.cs private members to protected. Then has had a visually inherited/derived Form.
Now I am able to re-size or modify all the controls in the derived Form in design-time except the DataGridView. I am finding the DataGridView as locked in the derived Form, even though ...