Propertygrid eating keystrokes

dotnet framework


  • 1. Paint a user control outside the bounds of the form (C#)
    Hi, How do you make a user control appear outside the bounds of a form in c#. Here's the problem: I've created a multi-tier combo box (i.e. a combo box that has sub menus for some of the items in it). Whenever you hover over an item in the box that has sub items then i display a list box containing the sub items. I need to be able to paint the sub item list box outside the borders of the form, so that if the combo box is near the edge of the form the sub menu can still be displayed. Thanks in advance for any help, Calum
  • 2. Auto Logoff
    Using .NET 2.0... How can I cause Windows Forms application to shut itself down after a period (say 15 minutes) of [no user activity]? Specifically, I'm wanting some options for detecting that the user is somehow using the application (either detect mouse clicks or keyboard input). The idea is that if the user walks away from their computer and is gone for an extended period, then the app will close itself down to help curb malicious use. This is a Windows Forms MDI app. Thanks.
  • 3. Simple datagrid question
    Hi, I think while setting datasource you have not explicitly set datasource to datatable in datsource. I think you have set datasource in following way: datagrid1.datasource = ds( a dataset variable) It should be datagrid1.datasource = ds.Tables(0) or datagrid1.datasource = ds.Tables("tablename") Thanks and Regards, Manish Bafna. MCP and MCTS. "Paul" wrote: > Just wondering why with a windows form data grid when I run the > application the user must select the plus on the datagrid to expand it and > to show the data? I have the datagrid datasource (in the properties box of > the datagrid) set to a dataset that gets filled from a stored procedure. > Everything works just it would be nice if the user did not have to select the > + to see the data. > Thanks. > > -- > Paul G > Software engineer.
  • 4. How to determine the main monitor's pixel depth
    > How does one determine the pixel depth of the main monitor in .NET 2? Or > how > does one loop through each monitor device? I know of the Use => or for all screens: Greetings, Torsten.

Propertygrid eating keystrokes

Postby Tosch » Thu, 19 Aug 2004 00:44:37 GMT

I have a very simple form with a menu where the top level items are
&file and e&xtras.
Normally you can type Alt-F to display the file menu.

Now I have added a propertygrid to the form using this code:

declarations section:
     private withevents pg as propertygrid

        pg = New PropertyGrid()
        pg.SelectedObject = Nothing
        pg.Dock = DockStyle.Fill

where panProp is a panel on the form.

Now I can't type Alt-F anymore on the form. Really annoying. I have to
type Alt, release it and then type F.

Is this a bug in Propertygrid? If yes how can this be solved? It works
until the property grid is added.


Similar Threads:

1.system wide replace keystroke with other keystrokes

Does anyone know a trick to replace a keystroke (say "F12") with a
series of keystrokes (say "some lengthy text followed by F12") using
Visual Studio 2005?


2.WebBrowser in .NET Compact Framework eats my events

The .NET WebBrowser control in the Compact Framework 2.0 is a major

Once it takes the focus (e.g. by the user tapping on it) it keeps it
and keyboard events are not passed to the form anymore even though
KeyPreview is set to true.
If there are no other controls on the form we don't get them at all to
start with.

I added a tiny textbox with same colors as the form so we can at least
get the focus and be passed keyboard events. This works as long as it
has the focus and also when I give it focus again with SetFocus().

I tried adding a handler for the WebBrowser's KeyDown but that does not

Next I put the browser control on a panel, setting the panel's Enabled
to false. This works, but the we cannot use the arrows in the browser,
scrollbars don't work, and so on.

Next I tried adding a timer which keeps setting the focus to the
textbox, this way the scrollbars still work but key events like the
arrows don't get to the browser (even when I enable the panel again).

What I did next is disable the panel again, and post a Windows message
to the browser control for interesting key events (if the panel is not
disabled, things start looping). But this does not help for the
scrollbars (and I don't know to intercept scrollbar events and pass
them on to the browser control).

Anybody any ideas?

I am using VS 2005.



3.ADO.NET Eating Up Memory

With connections, I would use conn.Dispose(); to aid disposal. Of course,
your example is a bit overblown, as opening 100 connections is not a good
idea anyway.

The GC in .NET is memory driven, so it does take awhile to clear objects.
This is not a problem in most apps. If you add a Dispose(), you should see
some improvement with the worker process being restarted, although it will
still eat a lot of memory before GC kicks in.

Gregory A. Beamer
Author: ADO.NET and XML: ASP.NET on the Edge

Think Outside the Box!
"TB" < XXXX@XXXXX.COM > wrote in message
news:02d101c34512$762219a0$ XXXX@XXXXX.COM ...
> I'm trying to troubleshoot a problem in which an ASP.NET
> application that connects to a database consistently
> consumes more and more memory without ever releasing any
> of it.
> The following code generates the same results as my
> application.  Even though I'm closing, disposing and
> nulling the connection objects, the memory usage of the
> application mever declines.
> ----------------------------------------------------
> static void Main()
> {
>   SqlConnection conn = null;
>   for (int x = 0; x< 100; x++)
>   {
>     conn = new SqlConnection(connectstring);
>     conn.Open();
>     conn.Close();
>     conn = null;
>   }
> }
> ----------------------------------------------------
> I understand that the GC is supposed to assist with this
> but I've seen my ASP.NET application actually get reset
> because it used the maximum allowed amount of memory.
> What am I doing wrong?  I'm using .NET Framework 1.1.
> Thanks.

4.IDbConnection eats the password?


When this code executes:
    if (dbConnection.State != ConnectionState.Open)
        dbConnection.Open();      /* 1 */
        return (true);                    /* 2 */

At 1, dbConnection.ConnectionString is "DSN=Grace SQL
At 2, after the call to Open(), the connection string is "DSN=Grace SQL

Why is that, and is it preventable?


5.TextChanged eats up all other events


I have a page with textboxes, checkboxes, buttons, etc. One of textboxes has 
Autopostback=true. I am using TextChanged event of this textbox to populate 
some other read only textboxes from the DB. If I change the textbox with 
autopostback=true and click on anything else in the page using the mouse, 
e.g., click on other editable textboxes, checkboxes, etc, only the 
TextChenaged event is called. If I click on another textbox I see the edit 
focus in that textboxes temprarily, as soon as the page is posted back from 
the server, the edit focus is gone. If I click on another checkbox, I see the 
checkbox get checked temprarily, as soon as the page is posted back from the 
server, the check on that checkbox is gone. Can anybody tell me how to 
overcome this problem?

any of the buttons all events fire as expected Page_Load, 
TextChanged, Button.Click. However if textbox is not empty (already 
contains some text) and I just change this text and click on the button 
I get only Page_Load and Textchanged fired, no Button.Click event. 
Does anyone knows what is the problem and how to workaround it? 


6. TextChanged eats up Button Click event problem

7. HTTP handler eats all up

8. ASP.NET process eats all CPU time

Return to dotnet framework


Who is online

Users browsing this forum: No registered users and 32 guest