Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

keydown event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Claudia Fong - 17 Sep 2007 15:33 GMT
Hi, in my C# application I have the following keydown event

private void Form1_KeyDown(object sender, KeyEventArgs e)
{
 if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.A)
     MessageBox.Show("Combination of ALt and A pressed");
  else if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.F1)
    MessageBox.Show("Combination of ALt and F1 pressed");
       }

I was wondering if I can do the same with asp.net?

Cheers!

   Claudi
Eliyahu Goldin - 17 Sep 2007 16:22 GMT
Yes, but in Javascript instead of C#.

Signature

Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net

> Hi, in my C# application I have the following keydown event
>
[quoted text clipped - 13 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***
Mark Rae [MVP] - 17 Sep 2007 16:29 GMT
> I was wondering if I can do the same with asp.net?

Yep - in JavaScript, obviously...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Claudia Fong - 18 Sep 2007 09:05 GMT
WELL..is there other option?
Because pocket internet explorer does not support javascript.. at least
the code that I'm writing.. because I already tried

Cheers!

   Claudi
Mark Rae [MVP] - 18 Sep 2007 09:27 GMT
> WELL..is there other option?

No.

> Because pocket internet explorer does not support javascript..

There was no mention of Pocket Internet Explorer in your original post...

However, Microsoft Internet Explorer for Pocket PCs enables JScript support:
http://www.microsoft.com/technet/archive/wce/downloads/ppctoys.mspx?mfr=true

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Claudia Fong - 18 Sep 2007 09:52 GMT
When I said that it does not support is because I can't download
anything to the PDA.. I can only use the original PIE.. and with this
one, the javascript I wrote doesn't work..

document.onkeydown = keydown;
function keydown(evt)
{
if (!evt)
evt = event;

//if (evt.shiftKey && evt.keyCode == 9)
// if (evt.shiftKey && evt.keyCode == 32)
if (evt.ctrlKey && evt.keyCode == 65)
{
myfunction()

}
}

function myfunction()
{
window.open("Language.aspx", '_blank');
window.opener='x';window.close();
}            

Cheers!

   Claudi

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.