My question is related to this question:
http://stackoverflow.com/questions/93541/baseline-snaplines-in-custom-winforms-controls
However, in my case, I have created a new control that derives from TextBox rather than containing a TextBox. I would like to have a custom ControlDesigner, but I would like to modify the behavior of the Text...
I am trying to bind a SubSonic 2.1 generated DAL object to a WinForm (VB.NET VS2005). In order to work around the lack of IPropertyNotifyChanged implementation, in my binding method I am doing a controlname.DataBindings.Clear() before a controlname.DataBindings.Add() for each control I want to bind.
Textboxes work fine with code like t...
Whenever a Form is opened, the system automatically focuses one of the controls for you. As far as I can tell, the control that gets focus is the first enabled control in the tab order, as per Windows standard behavior.
The question is how to change this at run time without having to dynamically reshuffle the tab order. For instance, so...
Hi,
I have created a Windows Form Application using Visual C# 2008 Express Edition with target as .NET 2.0. Now I need to build this project for .NET 1.1. The problem I am facing is that the designer classes are not supported in .NET 1.1. They use the partial keyword which is not supported in .NET 1.1. What steps do I need to follow to ...
Edit 1
I believe my problem stems from the following. The function that fills the dropdown portion sets the Display Member to the CountyName. Then when I try and set the SelectedText or EditValue, as has been suggested, that function only returns the CountyID which it try's to match to something in the DropDown list DisplayMember. I ...
Can anyone think of a reason not use the ASP.NET membership providers in a winforms
application?
Has anyone have experience doing this?
...
My intent is that the form be sized large enough to show the entire "buttonOK", but not much larger. What actually happens is that the resized form ends up to small to even show the button at all.
public MyFormDlg()
{
InitializeComponent();
this.Height = this.buttonOK.Bounds.Bottom + SomePadding;
...
Hi I'm new to C#. And I'm doing some exercises about switch. I just did it from console application and I would like to do it in window forms applications. I'm looking for syntax on how to do switch in window forms.
In console it's usually like this:
switch (wordValue)
{
case 1:
Console.WriteLine("You have entered numbere...
I have the following function (that is incorrect):
private void TreeView_DragDrop(object sender, DragEventArgs e)
{
TreeNode CurrentNode =
TreeView.GetNodeAt(e.X - this.Left - NotesView.Left,
e.Y - this.Top - NotesView.Top);
// [snip]...
}
But this is incorrect because it doesn't take into ...
I'm trying to align a Label and a NumericUpDown by their text baselines. I'm doing it in code, rather than the designer. How do I get the position of the text baseline?
...
I currently use a VMware virtual machine (Windows XP) to debug my .NET WinForms applications under 120dpi. Very annoying.
Does anybody know a way that gives me similar results under my 96dpi working environment? That is, can 120dpi mode be activated for a single process, or is there a switch in Windows Forms?
...
When an application's main Form - the one passed to Application.Run() - has
this.ShowInTaskBar = false;
then, an instance of Process representing that application has a MainWindowHandle of 0, meaning that Process.CloseMainWindow() does not work.
How can I get around this? I need to cleanly close down the Form via the Process instance...
Hi,
Can anyone tell me how can I display an image next to the cursor like Vista (When dragging a file to folder it shows a "Copy to..." tooltip)?
...
I have a control which contains a NumericUpDown. The updown is only shown when the container has focus, so the container has to be selectable (or else it could never receive focus). I want the control to behave as a single entity with regards to tab order; that is, when the user tabs to the control, it shows the updown and the updown i...
I've created a user control which contains a label and a progress bar. I've also created another user control which contains only a flow layout panel with the flow direction set to top down. When I add the former to the flow layout panel of the latter, I would like it to use the maximum amount of horizontal space available and the minimu...
I have a WinForms app, and I can't seem to access the text of a ToolStripStatusLabel through UIAutomation. Microsoft implies that the support for StatusStrips (and presumably items within them) is limited, but this seems like a basic enough use case that it should work.
The control shows up with ControlType.Edit in UISpy, and appears to...
I have a WCF service that I'm using to replace an old ASP.NET web service. The service appears to be working fine but it is unable to handle simultaneous requests for some reason. My implementation of the service has the following properties:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = Concurren...
Does anyone know how I can move the 'Split' portion of a ToolStripSplitButton to the bottom of the button instead of the side?
...
This is using winforms and the problem is that I have a listbox and a combo box, both tied to the same datasource, same display members, same value members. All is bound just fine and the items show up in both the controls. But when I change a selection in one control, it moves to the same index in the other control. I don't have any ...
(If you want to close this thread for duplicate, I don’t think this question is redundant cause I’ve done my/some homework :)
I know this subject has come up before :) . I’ll be learning C# and Windows Forms this summer so I’m starting to buy some books. I’ve decided to treat them separately and buy a book about each one.
I spent the l...