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?
-Jeroen
2.WebBrowser in .NET Compact Framework eats my events
The .NET WebBrowser control in the Compact Framework 2.0 is a major
headache.
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
help.
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.
Thanks,
Ruud
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
MVP; MCP: +I, SE, SD, DBA
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?
Hello,
When this code executes:
if (dbConnection.State != ConnectionState.Open)
{
dbConnection.Open(); /* 1 */
return (true); /* 2 */
}
At 1, dbConnection.ConnectionString is "DSN=Grace SQL
Server;Uid=iron;Pwd=fillings;"
At 2, after the call to Open(), the connection string is "DSN=Grace SQL
Server;Uid=iron;"
Why is that, and is it preventable?
Thanks.
CB
5.TextChanged eats up all other events
Hi,
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?
Thanks.
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?
Thanks.
6. TextChanged eats up Button Click event problem
7. HTTP handler eats all up
8. ASP.NET process eats all CPU time