Ask a Question related to ASP.NET, Design and Development.
-
Anne #1
keyDown
hie again, i have 3 textbox and i would like the user to
go to the next textbox by pressing the 'ENTER' key. i have
tried using this:
Private Sub txtRequestor_KeyDown(ByVal sender As
System.Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles
txtRequestor.KeyDown
If e.KeyCode = Keys.Enter Then
SendKeys.Send("{TAB}")
End If
End Sub
The coding produces these errors:
1. Event 'keyDown' cannot be found
2. Name 'Keys' is not declared
3. Name 'SendKeys' is not declared
what us the cause of my problem? do i have to add in other
reference (i have already added System.Windows.Forms) so
that the keyDown event can be found? or is there another
way to do this?
Thanx!
Anne Guest
-
Keydown does not register if W3D on stage
I have a 3D model made in Max which i've imported into Director MX 2004. I have made loads of custom script to interact with the model using the... -
Problem with Keydown and S3D
Hello everybody, I use On keyDown event in a movie script and it works well until I put a shockwave 3d sprite on the stage. The event is then no... -
Sound on keydown
hi, um... im having a bit of trouble with director at the moment, i have posted on other forums and had some useful replies, but being a beginner... -
keyDown: in NSMatrix subclass
In <znu-55B7B3.11560309072003@news.fu-berlin.de> ZnU wrote: I presume you remembered to dick around with acceptsFirstResponder? When that... -
keyDown & keyUp?????
Can anyone tell me why the keyDown and keyUp handlers don't work when SW3D is inserted in a movie. chartonum(the keypressed) works, but that... -
Kevin Spencer #2
Re: keyDown
You must not be using Internet Explorer for your browser.
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
[url]http://www.takempis.com[/url]
Some things just happen.
Everything else occurs.
"Anne" <lilanne_2@yahoo.com> wrote in message
news:035f01c3446a$61fc6960$a001280a@phx.gbl...> hie again, i have 3 textbox and i would like the user to
> go to the next textbox by pressing the 'ENTER' key. i have
> tried using this:
>
> Private Sub txtRequestor_KeyDown(ByVal sender As
> System.Object, ByVal e As
> System.Windows.Forms.KeyEventArgs) Handles
> txtRequestor.KeyDown
> If e.KeyCode = Keys.Enter Then
> SendKeys.Send("{TAB}")
> End If
> End Sub
>
> The coding produces these errors:
> 1. Event 'keyDown' cannot be found
> 2. Name 'Keys' is not declared
> 3. Name 'SendKeys' is not declared
>
> what us the cause of my problem? do i have to add in other
> reference (i have already added System.Windows.Forms) so
> that the keyDown event can be found? or is there another
> way to do this?
>
> Thanx!
>
Kevin Spencer Guest
-
David Waz... #3
Re: keyDown
he must be using a BROWSER!
there is no such event for a text box in Asp.Net.
and the reference to SYSTEM.WINDOWS.FORMS is really puzzling. Is this a WEB
project (that's what this N.G. is for) or is this a desk-top application?
"Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
news:#lo8$QIRDHA.1564@TK2MSFTNGP12.phx.gbl...> You must not be using Internet Explorer for your browser.
>
> HTH,
>
> Kevin Spencer
> Microsoft FrontPage MVP
> Internet Developer
> [url]http://www.takempis.com[/url]
> Some things just happen.
> Everything else occurs.
>
> "Anne" <lilanne_2@yahoo.com> wrote in message
> news:035f01c3446a$61fc6960$a001280a@phx.gbl...>> > hie again, i have 3 textbox and i would like the user to
> > go to the next textbox by pressing the 'ENTER' key. i have
> > tried using this:
> >
> > Private Sub txtRequestor_KeyDown(ByVal sender As
> > System.Object, ByVal e As
> > System.Windows.Forms.KeyEventArgs) Handles
> > txtRequestor.KeyDown
> > If e.KeyCode = Keys.Enter Then
> > SendKeys.Send("{TAB}")
> > End If
> > End Sub
> >
> > The coding produces these errors:
> > 1. Event 'keyDown' cannot be found
> > 2. Name 'Keys' is not declared
> > 3. Name 'SendKeys' is not declared
> >
> > what us the cause of my problem? do i have to add in other
> > reference (i have already added System.Windows.Forms) so
> > that the keyDown event can be found? or is there another
> > way to do this?
> >
> > Thanx!
> >
>
>
David Waz... Guest
-
Kevin Spencer #4
Re: keyDown
Hi Anne,
Yes, there is an onkeydown event for a text box. However, it is not on the
server side. It is on the client side, in the browser. The problem is that
you can't send keys through the browser interface programmatically. It just
isn't safe, and I don't expect that you ever will be able to. A hostile web
site could type any combination of keys on a client computer if that was so.
I mistakenly thought that you had written a client-side event handler there,
as it looks a lot like one for Internet Explorer (should have looked more
carefully). If this is a server-side event handler, you're barking way up
the wrong tree there. The good news is, you can get the effect you want on
the client side without a PostBack, and without having to use the client
keyboard. While the TAB key moves the focus to the next form field in most
browsers, you can use the JavaScript focus() method to set the focus on any
form element you wish. So, what you really need is a client-side event
handler that captures the ENTER key and sets the focus on the form element
you desire. However, be advised that this is not standard browser behavior,
and therefore may be contrary to the way that people expect their browser to
behave. Here is an example:
<script type="text/javascript"><!--
function GetEnter()
{
if (event.keyCode == 13) document.forms[0].elementName.focus();
}
// --></script>
"elementName" is the name attribute of the form element you want to shift
the focus to.
In Your textbox, just add an "onkeydown" event handler. Example:
<input type="text" name="myText" size="20" onkeydown="GetEnter()">
HTH,
Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
[url]http://www.takempis.com[/url]
Some things just happen.
Everything else occurs.
"Anne" <lilanne_2@yahoo.com> wrote in message
news:0f2601c344ea$fe62f500$a001280a@phx.gbl...> hie david, yes, this is a web project. but i am trying 2
> integrate that keyDown event from the system.windows.forms.
> are u sure there's no such thing for a textbox in asp.net?
> anybody else have any idea on how i can use similar
> function as the keyDown?
>
> thanx 4 all the help!
>> puzzling. Is this a WEB> >-----Original Message-----
> >he must be using a BROWSER!
> >
> >there is no such event for a text box in Asp.Net.
> >
> >and the reference to SYSTEM.WINDOWS.FORMS is really> top application?> >project (that's what this N.G. is for) or is this a desk-> message> >
> >"Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wrote in> browser.> >news:#lo8$QIRDHA.1564@TK2MSFTNGP12.phx.gbl...> >> You must not be using Internet Explorer for your> to> >>
> >> HTH,
> >>
> >> Kevin Spencer
> >> Microsoft FrontPage MVP
> >> Internet Developer
> >> [url]http://www.takempis.com[/url]
> >> Some things just happen.
> >> Everything else occurs.
> >>
> >> "Anne" <lilanne_2@yahoo.com> wrote in message
> >> news:035f01c3446a$61fc6960$a001280a@phx.gbl...
> >> > hie again, i have 3 textbox and i would like the user> have> >> > go to the next textbox by pressing the 'ENTER' key. i> other> >> > tried using this:
> >> >
> >> > Private Sub txtRequestor_KeyDown(ByVal sender As
> >> > System.Object, ByVal e As
> >> > System.Windows.Forms.KeyEventArgs) Handles
> >> > txtRequestor.KeyDown
> >> > If e.KeyCode = Keys.Enter Then
> >> > SendKeys.Send("{TAB}")
> >> > End If
> >> > End Sub
> >> >
> >> > The coding produces these errors:
> >> > 1. Event 'keyDown' cannot be found
> >> > 2. Name 'Keys' is not declared
> >> > 3. Name 'SendKeys' is not declared
> >> >
> >> > what us the cause of my problem? do i have to add in> so> >> > reference (i have already added System.Windows.Forms)> another> >> > that the keyDown event can be found? or is there> >> >> > way to do this?
> >> >
> >> > Thanx!
> >> >
> >>
> >>
> >>
> >
> >.
> >
Kevin Spencer Guest
-
Anne #5
Re: keyDown
hie kevin,
thanx 4 the reply, and yes, at the time i was reading ur
explanation and solution, i was able to find another
solution similar to yours using javascript
thanx once
again!
it is not on the>-----Original Message-----
>Hi Anne,
>
>Yes, there is an onkeydown event for a text box. However,The problem is that>server side. It is on the client side, in the browser.programmatically. It just>you can't send keys through the browser interfaceto. A hostile web>isn't safe, and I don't expect that you ever will be ablecomputer if that was so.>site could type any combination of keys on a clientevent handler there,>
>I mistakenly thought that you had written a client-sidehave looked more>as it looks a lot like one for Internet Explorer (shouldyou're barking way up>carefully). If this is a server-side event handler,effect you want on>the wrong tree there. The good news is, you can get theuse the client>the client side without a PostBack, and without having toform field in most>keyboard. While the TAB key moves the focus to the nextset the focus on any>browsers, you can use the JavaScript focus() method toclient-side event>form element you wish. So, what you really need is athe form element>handler that captures the ENTER key and sets the focus onbrowser behavior,>you desire. However, be advised that this is not standardexpect their browser to>and therefore may be contrary to the way that people[0].elementName.focus();>behave. Here is an example:
>
><script type="text/javascript"><!--
>function GetEnter()
>{
> if (event.keyCode == 13) document.formsyou want to shift>}
>// --></script>
>
>"elementName" is the name attribute of the form elementExample:>the focus to.
>
>In Your textbox, just add an "onkeydown" event handler.onkeydown="GetEnter()">>
><input type="text" name="myText" size="20"system.windows.forms.>
>HTH,
>
>Kevin Spencer
>Microsoft FrontPage MVP
>Internet Developer
>[url]http://www.takempis.com[/url]
>Some things just happen.
>Everything else occurs.
>
>"Anne" <lilanne_2@yahoo.com> wrote in message
>news:0f2601c344ea$fe62f500$a001280a@phx.gbl...>> hie david, yes, this is a web project. but i am trying 2
>> integrate that keyDown event from theasp.net?>> are u sure there's no such thing for a textbox indesk->> anybody else have any idea on how i can use similar
>> function as the keyDown?
>>
>> thanx 4 all the help!
>>>> puzzling. Is this a WEB>> >-----Original Message-----
>> >he must be using a BROWSER!
>> >
>> >there is no such event for a text box in Asp.Net.
>> >
>> >and the reference to SYSTEM.WINDOWS.FORMS is really>> >project (that's what this N.G. is for) or is this ain>> top application?>> >
>> >"Kevin Spencer" <kevin@SPAMMERSSUCKtakempis.com> wroteuser>> message>> browser.>> >news:#lo8$QIRDHA.1564@TK2MSFTNGP12.phx.gbl...
>> >> You must not be using Internet Explorer for your>> >>
>> >> HTH,
>> >>
>> >> Kevin Spencer
>> >> Microsoft FrontPage MVP
>> >> Internet Developer
>> >> [url]http://www.takempis.com[/url]
>> >> Some things just happen.
>> >> Everything else occurs.
>> >>
>> >> "Anne" <lilanne_2@yahoo.com> wrote in message
>> >> news:035f01c3446a$61fc6960$a001280a@phx.gbl...
>> >> > hie again, i have 3 textbox and i would like thekey. i>> to>> >> > go to the next textbox by pressing the 'ENTER'in>> have>> >> > tried using this:
>> >> >
>> >> > Private Sub txtRequestor_KeyDown(ByVal sender As
>> >> > System.Object, ByVal e As
>> >> > System.Windows.Forms.KeyEventArgs) Handles
>> >> > txtRequestor.KeyDown
>> >> > If e.KeyCode = Keys.Enter Then
>> >> > SendKeys.Send("{TAB}")
>> >> > End If
>> >> > End Sub
>> >> >
>> >> > The coding produces these errors:
>> >> > 1. Event 'keyDown' cannot be found
>> >> > 2. Name 'Keys' is not declared
>> >> > 3. Name 'SendKeys' is not declared
>> >> >
>> >> > what us the cause of my problem? do i have to addSystem.Windows.Forms)>> other>> >> > reference (i have already added>>> so>> another>> >> > that the keyDown event can be found? or is there>> >> > way to do this?
>> >> >
>> >> > Thanx!
>> >> >
>> >>
>> >>
>> >>
>> >
>> >
>> >.
>> >
>
>.
>Anne Guest
-
malta2 webforumsuser@macromedia.com #6
keydown
Hello,
I am creating a software simulation and need to create a script which will advance the movie by 10 frames from the current frame, when an F button is pressed.
Seems simple enough but can't seem to follow the syntax.
malta2 webforumsuser@macromedia.com Guest
-
Aghamahdi #7
keydown
I use director mx 2004.
In a frame script, after handler "on exit frame" i used a "oh keydown" handler
but it did not work! and when i changed it to a "on keyup" handler it worked.
Who can explain me why?
My scripts are very simple:
on exitframe me
go the frame
end
on keydown()
case (_key.keyCode) of
6:
zoomin--z
7:
zoomout--x
end case
end
I am using these in stead of that codes, it works but i dont want use
exitframe handler:
on exitframe me
go the frame
if (_key.keyPressed(6)) then zoomin
if (_key.keyPressed(7)) then zoomout
end
Aghamahdi Guest
-
Ex Malterra #8
Re: keydown
w3d sprites seem to muck up key events, see [url]http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=268&threadid=1112648&highlig ht_key=y&keyword1=keydown[/url] for some fixes.
Ex Malterra Guest
-
-
kopir #10
keyDown
Hi all,
I'm wondering about the keyboard functionalities.
I'd like to catch the event "I press a key". it works fine in a TextInput
component, but I want to do that in all my application.
and the function keyDown doesn't seem to work...
Have you got any idea?
Here is a code which would be working but is not, it never goes in my
function...
ps: I've tried with an addeventlistener, I have the same result, nothing is
working!
/***************************************
<?xml version="1.0" ?>
<mx:Application keyDown="keyDownHandlerCustom()"
xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
viewSourceURL="srcview/index.html">
<mx:Script>
<![CDATA[
import flash.events.*;
private function keyDownHandlerCustom():void
{
trace("keyDown");
}
]]>
</mx:Script>
</mx:Application>
kopir Guest



Reply With Quote

