microsoft.public.dotnet.framework.windowsforms Archive - February 2004
Post a message to this list
Messages
Page: 123456789101112131415161718
How to duplicate focus rectangle behaviour? (3 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
Hi, Does anyone know how to duplicate .Net or Windows focus rectangle behaviour but with custom drawn user controls? The behaviour goes something like this... 1. Create a WinForm with one or more Button controls on. 2. Run the form and click on any of the buttons. 3. Depending on your system's accessibility settings, you should not see any focus rectangles on the buttons you've just clicked on. 4....
how to: bring main form to front, when its modeless dialog comes into focus? (2 replies)
microsoft.public.dotnet.framework.windowsforms
hi all i have a main form and it displays a modelss dialog. when the user brings the dialog into focus, the main form is left in the back. how can i bring the main form into the front, when its modeless dialog is selected into focus? my code: class MyMainForm { MyModelessDalog MyModelessDalog new MyModelessDalog(); MyMainForm() { this. MyModelessDalog.Owner this; } void ShowDialog() { this. MyMode...
How to make sure Icon resources are getting freed? (4 replies)
microsoft.public.dotnet.framework.windowsforms
After some playing around with icons and ImageList, I'm not quite sure I understand what's happening. Either the resources are not really getting cleaned up like I thought they would or what I'm using to measure the resources isn't accurate, or there's something else going on. I'm using Task Manager and added the column for "GDI Objects". I created a little test Form and added some code to load an...
Default designer values of base class control properties (5 replies)
microsoft.public.dotnet.framework.windowsforms
I am developing an inherited control (i.e. subclassed) and I am having trouble figuring out how to set the default values for BASE CLASS properties which appear in the designer. In other words with this definition: public class MyTextBox : System.Windows.Forms.TextBox is there a way to make MyTextBox have the following DEFAULT values in designer mode: Enbaled false; Size new Size(10, 15); TabStop ...
Install service and UI together (5 replies)
microsoft.public.dotnet.framework.windowsforms
I have an app that consists of two parts: a Windows service, and a UI that allows users to change settings that determine how the service functions. I can obviously create two msis and use both but, for simplicity, I'd like to create an msi that installs both of these at the same time (the next version might allow users to get at the UI from their own machines.... but not yet). I haven't tried any...
NGen Use in NTD? (6 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
Does NGen have any value in a WinForm deployed as an NTD form? Thanks.
Drawing error,Help!Help!Help! (3 replies)
microsoft.public.dotnet.framework.windowsforms
My application have many picturebox objects,when run it ,sometimes i will have a strange error,how to work out ,help me please!(in windows98,the error cause frequently than in windowsxp) System.InvalidOperationExceptionSystem.InvalidOperationException: The object is currently in use elsewhere. at System.Drawing.Image.get Width() at System.Drawing.Image.get Size() at System.Windows.Forms.PictureBox...
ListView to Excel Code (but needs SPEED improvements) (2 replies)
microsoft.public.dotnet.framework.windowsforms
Hi, The following code works, but it has some issues: 1) Any suggestions to optimize the code? 2) How can I set the text and background colors for my header cells Thanks, Steve private void button1 Click(object sender, System.EventArgs e) { // Create application Excel.Application excel new Excel.Application(); if (excel null) { MessageBox.Show("ERROR: EXCEL could not be started!"); return; } // Ad...
Focus Problems with MDI child forms (8 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
Hi Folks, Sorry if you have seen this post before I've posted it before, but it seems to have gotten lost in Outlook limbo it's visible on the web interface, but not in any news reader I've tried :S A while ago, I came accross this post by Armin describing how to reporduce a focus bug with MDI children. I am currently experiencing the same problem in my application although I'm not using an Active...
Databound control problem (2 replies)
microsoft.public.dotnet.framework.windowsforms
I have created a windows forms control that exposes a DataSource, DisplayMemeber and ValueMember. Everything works fine, but here is my problem: when I drag and drop a DataSet DataAdapter and use the Fill to fill the dataset, I cannot find a way to notify my control that the data has changed. I have a "RefreshItems" method that parses the datasource and fills the control with the correct data, I a...
How to chage MainMenu background color? (8 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
Hello, I have figured out how to change the background colors of menuitems on my windows form, but I cannot figure out how to change the MainMenu background color? Because of this, if I change my menuitem background color to white, from where my last menu item ends till the width of the screen shows up as a gray color in the menu row! What I would like is for the rest of that row to show up in whi...
Forms collection behavior (17 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
In order to be able to track some of the forms in my application, I am using a collection of forms (I am using an ArrayList per the Billy Hollis MSDN Article http://msdn.microsoft.com/library/default.asp?url /library/en us/dnadvnet/html/vbnet05132003.asp ) .. As I instantiate each new forms, I add a reference to the new form to the collection. My question is what happens to each of these reference...
How would I find out to which control a given control is docked against... (9 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
Hi, Is there a way to find to which control the current control is docked against? For example, let's say I have panel1 and panel2 docked to left within a form. The panel1 is the first one on the left and the panel2 is the second one docked against panel1. I want to be able to find out to which control/form the specified panel. I wish, Microsoft had provided a feature similar to the following. Sys...
Capturing beginning of a window resize? (2 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
Hi, Can someone please tell me how to capture the beginning of a window resize when a user resizes a window? I know that I get OnResize calls in my topmost form, but I want to be able to do some preprocessing prior to getting the first OnResize call. I've tried the OnClick and OnMouseDown methods of my topmost form, but neither of those seem to get called before a window resize. How can I know tha...
Casting of a Object* to an Enum value? (3 replies)
microsoft.public.dotnet.framework.windowsforms
Hi everybody! I have a problem with letting the compiler accept the following code in Managed C , see example below. I have a logfile that contains statements about variuos actions taken during an installation. The actions has a value of a enum type itemOper {FileCopy, FileMerge, FolderOk, ...} that is written to the logfile by Enum::GetName( typeof(itemOper), oper). No FlagAttribute is used on th...
Trap Keys from DataGrid (2 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
I'm using C# on a Windows Form with a datagrid. I want to trap when a user hits ENTER (or Tab on the last column) so that I can auto add a new row and prepopulate with default values from the previous row. It not be assumed that column values were actually changed on the current row. I have trapped the PreProcessMessage event on the grid, but that doesn't fire if a column in the grid has focus. I ...
NotifyIcon and SetForegroundWindow (4 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
I use NotifyIcon to minimize my app to the system tray. I also check everytime my app runs for the previous instance, if it is running, call SetForegroundWindow to bring its window up front and exit the second instance. The problem is it doesn't bring the app out of the system tray. It works fine if the app is NOT in the system tray. How do I bring it out of the system tray and make it an active w...
object reference not set to an instance of an object (2 replies)
microsoft.public.dotnet.framework.windowsforms
Hi, I got the message of "object reference not set to an instance of an object" when I click on the View Designer. The form is inherited as below. Can someone please help? public class frmShf : PME.frmCal Regards, Vivian
Getting the keyboard state (C#) (4 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
In a MouseDown event, I want to find out what modifier keys are being held down to change the behavior of my program. I can't, however, seem to find a way of doing this. Can anyone offer any suggestions? Thanks, Charles.
Use .Net WindowForm in a MDI application written in VB6. (5 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
We have a MDI application write in VB6. It's a complex application so it is not reasonable to rewrite the entire the program in .net, now. We have developed some .Net WindowForm and now we want to use them in the MDI application. We tried to use SetParent WinAPI to make the WindowForm a mdichild (setting WS CHILD and unsetting WS POPUP with SetWindowLong API). The problem is that the .Net WindowFo...
email (3 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
How can I send an email from a windows service? I try to add the System.Web.Mail namespace but I can't.
How to handle strings in code (2 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
Would you please review the methods that we use to Globalize our software applications? I would like to obtain your critique of the practices that we use and have outlined below. In our Module Main we declare a Public (global) variable for a ResoureManager that is used throughout the application for strings that appear within our code. Public rm As ResourceManager Then, within our Sub Main, our co...
DataGrid multiselect (3 replies)
microsoft.public.dotnet.framework.windowsforms
I have a windows forms data grid which I want to use for display only. Is it possible to turn off the "multiselect" behaviour so that only one row can be selected at a time? Is it possible to stop individual cells receiving focus (I want the whole row to be highlighted and want to avoid the text in individual cells being selected as if they were being edited) Thanks Douglas Collie
Disabling Expand on parent/child datagrids (2 replies)
microsoft.public.dotnet.framework.windowsforms
Hi, I have successfully got a parent/child relationship running across two DataGrids (Windows Forms). All I want to do now is to remove the Expand ( ) in the parent grid. Any ideas? Thanks Paul.
HelpProvider's SetHelpString method (2 replies, VIP)
microsoft.public.dotnet.framework.windowsforms
Hi. When using the SetHelpString method of the HelpProvider control, do I have any limit on the number of characters I can set? Thanks, Robert Scheer
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com