| Creating a UserControl (4 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hi, I'm creating a UserControl, and I've found some questions that I don't know how to resolve: 1) My control has a property that, depending on the value, makes the control visible or not, but I don't want that the client application be able to set the visible atribute, it is, I don't want that that property be visible to client. Can I do that? How? 2) The Usercontrol inherits form ContainerContro... |
|
| extending DataGridColumnStyle in order to display a UserControl in each row (3 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hi: I want to display a UserControl in one of the columns of my data Grid. The same control class, but with different property values in each row The steps that I have taken are the following: a) Create a User Control (MyUserControl class). To keep it simple, let's suppose that when the OnPaint() method is called, one rectangle is drawn filling the full control. The Rectangle's color can be select... |
|
| Odd error in Visual Basic. (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Just seen an odd error where the IDE gave me an error during design time about an array I had created. My VB code accepts this: namesArray New String(8) {"Red" , "Orange" , "Yellow" , "Green" , "Blue" , "Indigo" , "Violet" , "White" , "nine!!! its a bug!!!"} and rejects this as an error of "Array initializer has 1 to few elements" namesArray New String(8) {"Red" , "Orange" , "Yellow" , "Green" , "... |
|
| DataGridComboBoxColumn (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hi, Does anyone know how to show a combo box in the cell of a datagrid. I've tried deriving from DataGridColumnStyle to host the combo, but I'm not getting too far with it. Thanks, Kev. |
|
| Creating a custom textbox (3 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hello all, I am trying to create a custom textbox that simply holds extra non visual information. I also don't need the textbox to show this in the attributes window. Here is what I am trying to accomplish. I am working on a Data entry program, and I want to set edits in the manager(the program that creates the file that tells the client how to paint the screen). Some of these edits are "T" or "F"... |
|
| Sorting on listviews (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| When a listview control's view is Details, it has column headers. The usual behavior when a column header is clicked is to sort on that column; we are attempting to code this. While we can capture the click event of the listview and retrieve the index of the column header clicked, there appears to be no way to sort on a particular column Listview.Sort accepts no parameters (it sorts on the first c... |
|
| Catching exceptions... (4 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| I have a form with a subform on it. I want the main form to catch all exceptions of a certain type thrown by the subform. How does one go about doing this? The tricky part is that my subform has no knowledge of what type of form called it. Yes, I can use a this.ParentForm property, but that won't contain the specified error handling methods that my actual form would contain. Suppose I have the fol... |
|
| What event to use to diable contextmenu item (3 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Has anyone enabled/disabled contextmenu menu items based on a given criteria? I've got a contextmenu on a treeview and when the context menu appears I'd like certain menu items to be enabled/disabled. However, I've looked at the events and tried a couple and I'm not sure what event would be appropriate for this. Thanks for any help. Bryce |
|
| Why private? Why internal? I'm annoyed! (7 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| I'm sorry for my English is not very clear but do you remember the days in MFC? Everything not public is protected, so we can get most out of the library by deriving from it and changing whatever we want. But what now in .net? So many things (often key things) are private or internal that I can't access even if I derive from the class. That would greatly reduce the extensibility of the class libra... |
|
| How to reference icons in an ImageList? (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| I've been struggling like mad to get this working. I've added some icons to an ImageList, and every time I try to reference them, it gives me problems because ImageList has converted them to System.Drawing.Bitmap. How can I reference the icons properly? Thanks Sam |
|
| DrawLine (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| I know how to draw lines with the graphics object in the PaintEventArgs, Is there another way to draw a line, I mean outside an event that receives a PaintEventArgs? Thanks |
|
| NotifyIcon and ContextMenu (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| I have a NotifyIcon, not owned by a form, just by a normal C# class. The NotifyIcon has a ContextMenu, which displays just fine when the notify icon is right clicked. But I want this additional (and very common) behavior: when the notify icon i left clicked, the context menu is opened, like with the right click (except there has to be a short delay before we'll know whether it was a single click o... |
|
| Transparent User Control (5 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hi, I want to make a transparent Usercontrol That contains several Controls, and I want those Controls to paint normally, but that my controls' background be transparent. Any idea? |
|
| UserControls and Events (3 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hi, I've got a Text Box on a User Control, double click and you can add the TextBox1 TextChanged, add the following: TextBox1.Text "Changed"; When you reference the User Control from a WebForm it will not fire the event back. If you do the same but not on a User Control it fires the event back correctly. Any got any ideas? Kind Regards, Chris Bond |
|
| How to create and reactiviate forms from MID menu (7 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| there is a MID form (midform) and two normal forms(nml1form/nml2form). MID form has two menu ITEMs (one is "show1" the other is "show2")to show the normal forms. we want to show the normal form as the MID child by click the menu ITEMs("show1" or "show2"). the function of the show1 or show2 is create one instance or bring it to front. the code of the menu in the MID form like the following: /*decla... |
|
| number formatting (3 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| How can I format my doubles as strings so that: 1) If the number needs thousands separators, they are added. 2) If the number has no digits to the right of the decimal, no decimal is shown. If the number does have a fractional part, only show the number of places needed. Right now I am using: double.ToString("n", Application.CurrentCulture.NumberFormat) This is great for solving #1, but "n" format... |
|
| Listbox on form = no clicks in controls (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| I have a control that traps Click events. Works fine. As soon as I put a listbox on the same form, my control no longer gets Click events. It gets mousedown and mouseup events, but no Click.. Any ideas as to what I should do about this, where it's coming from, etc? To reproduce this (beta2): public class Class1 : System.Windows.Forms.ContainerControl { public Class1() { this.Click new EventHandler... |
|
| ListView pb (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hello, I want to use a ListView in my form, but if i copy from VB.Net doc this line to add subitem : ListView1.ListItems(0).SetSubItem(1, "Accounting") I have an error message : "ListItems" is not a member of... I don't understand what i must do. I've put those declaration in the top of the page but it the same : Imports System.Windows.Forms Imports System.Windows.Forms.ListView Imports System.Win... |
|
| Converting Color -> Brush (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Is it possible to get the equivalent brush from a color? Thanks |
|
| ContainerControl (3 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hello, Trying to do a TabControl... The main tab inherits control The tab pages inherit ContainerControl When I add a tabPage to the Main tab, I can see the containtercontrol on the form (I set it to white), but when I try to put my controls inside the tabpage it doesnt act like a container control. Any Ideas? Thanks |
|
| MFC vs. WinForms: Toolbars (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hi, I have a number of buttons on my toolbar. These buttons can be either enabled or disabled based on a variety of factors. In MFC, during idle processing, the framework would allow me to set the enablement status of the various buttons. This function would be called by the framework whenever the app was about to go idle (i.e. no messages left in the queue), which basically ensured that the butto... |
|
| Expanding properties (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hi, I would like to make one of the properties in my control to be expandable the same way like you can expand in property grid the font or point, color, etc (i.e. using a plus sign). I've already overwritten the TypeConverter from the type of this property to string. What else I have to do??? Regards, Szymon Kobalczyk |
|
| EditorAttribute (3 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Does anyone have any examples on how to use this attribute? Iam trying to display the CollectionEditor class at design time, but everytime I click on the [...] button I get an error "Object reference not set to an instance of an object" Thanks. |
|
| TabControl Bug (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| If you try to set the BackColor property of a TabControl, nothing happens. Is this by design? If so, why is the property exposed at all? If the Backcolor is not supposed to be exposed, shouldn't it default to the background color of it's container (like most other controls do)? |
|
| get reference of Application (2 replies) |
| microsoft.public.dotnet.framework.windowsforms |
| Hello. Please teach me how to get reference of the instance of the WinForms Application under starting. Satoshi Wakamatsu |
|