Answer Questions
Scott.Berry Menu keyboard shortcut works sometimes
My main menu is build with ToolStripMenuItems. I enable and disable keyboard shortcuts with: m_miHideSelected->ShortcutKeys = Keys::Control | Keys::H; m_miHideSelected->ShortcutKeys = Keys::None; This example is a sub menu eg 'Display' -> 'Hide Selected'. I find that this shortcut often does not work, dispite the correct code to enable it being executed. I have verified the code path by logging. If I click on the p ...Show All
MR SeeQL How to find is a form already open in a Multiple form application
hi, Please tell me how to find if a form is already open so I won't open multiple copies of the same form in the application. many thanks. -VJ Christian: I am new to C#. - What is the best approach to providing access to forms from anywhere in the application Please provide code. - What is the best way to provide access from an open form to the contents of a toolstrip combobox Please provi ...Show All
Voldy Deriving from abstract UserControls
Can you use abstract UserControls I created a UserControl called Dad. Marked it as abstract. I created a class Son and changed it to: public class Son : Dad { public Son() : base() } If I 'View Designer' on Son it fails with a message saying ... The Designer must create an instance of type 'Windows.Application1.Dad' but it cannot as the type is declared as abstract. Is this just a weakness in the IDE ...Show All
deanvanrooyen OpenFileDialog problem
I have an openfile dialog in my app. I normaly use relative paths. But after I use openfile dialog to get one path and then use Path.GetFullPath(""), it returns path of openfile dialog, not of my prgram. Is there any way how to solve ...Show All
telepatico Could I change the cursor of application from my C# class derived from ISerializable
Hi,I am a MFC programmer, I can use AfxGetApp()->LoadStandardCursor(id) from any class to set the cursor of application. now I want to know Could I change the cursor of application from my C# class derived from ISerializable The Control.Cursor property sets which cursor is used when the mouse is over that control. The Cursor.Current property is a static property which sets the current cursor for the application (overriding the ...Show All
João Santa Bárbara Improve TableLayoutPanel with large amount of controls
I'm using the TableLayoutPanel to display a shopping cart list. I need to use 5 label controls to present the information of each items. I need to remove all the controls and then repopulate the panels when a new item is added. The reason is that a new item may affect the price of an existing item. I've no way (or just too complicate) to update a specific label. The problem is when the no. of items grows, the performance of the list drop sign ...Show All
statscat Custom Controls with C#
I'm working with the book "MICROSOFT VISUAL C# .NET STEP BY STEP". In Chapter 23, Creating GUI Componets, I get an error message of An exception occurred while trying to create an instance of SubclassedControls.ToggleButton. The exception was  ...Show All
Mirz default focus for ToolStripButton
How can I set default focus for a ToolStripButton Regards, Sergei Hi, I think that you need something like the following: toolStrip1.Items[1].Select(); Max ...Show All
Jimmyusa It debugs.. then it won't debug?
I have spent hours today with a winform with some comboxes bound to data. And something really weird has been going on. I set some*space space*points and lately it just ignores the*space space*points.. THEN it might stop at one so I continue and I&n ...Show All
Nagendran Sellaiah Tabs Voluntarily Rearrange Themselves...
I've heard of lots people with this problem, but I've never seen an official (or unofficial, for that matter) reason, work-around, or bug confirmation for it. My tabs in my application randomly rearrange themselves randomly in debug mode somewhere between F5'ing, saving, and closing/opening Visual Studio. I can go into the collection in the tab properties and arrange them back the way they belong, but then 15 minutes, an hour, a day lat ...Show All
RobertV Error when trying to open any file in vb.net
Hi, I am using the following code to test: Dim fs As FileStream fs = File.Open("c:\test.txt", FileMode.Open, FileAccess.Read) and i get the following error.... An unhandled exception of type 'System.IO.IOException' occurred in mscorlib.dll Additional information: The process cannot a ...Show All
esgibson loading assemblies...
Hi, I want to load an assembly from a file, in c#, and I want to load a Form inherited class from that dll, to show in my main form... How can I do it What comes after: Assembly a = Assembly.LoadFilr(fileName); Thanks a lot ...Show All
JesseStC Context Menu for a row in a DataGrid
Any recommendations for implementing a context menu for a given row in a DataGrid Simple enough to do this for the DataGrid as a whole, but I don't see how to "bind" the contextmenu to the row that the user clicks on. For "extra credit", I'd like to augment the default contextmenu that you get when you right-click on selected-text with my custom menu items. Can anyone point me in the right direction ...Show All
harrybosh Handle multiple windows forms in a windows application
Hi, I'm new to Windows Forms. Let say I have 2 forms, Form A and Form B. @ Form A, there is a datagrid and a image displayed. if I clicked a OK button on Form A, it should replaced by Form B. but not 2 windows forms. It will be good if there are any examples in C#. Thanks. Buru. Hi Paul, I tried your method. However, it gives me a compilation error "No overload for method 'Show' takes '1' arguments". Pls advi ...Show All
ISW DataBinding Problem?
I have a textBox that is bound like so; this .txtBoxAccountAddressLine1.DataBindings.Add("Text", DSAccountAddress.Tables[0], "AddressLine1"); I then have the follwoing code so that I can pass the value to the stored procedure to update the Address like so; string AccountAddressLine1 = this .txtBoxAccountAddressLine1.Text; If the user erases the txtBoxAccountAddressLine1.Text and then presses the Edit Button to Update the Address, the value ...Show All
