Yeah i kno Timer concept is not rite.....but ma focus was on keys 'A','B'....y it's not working for them.. rather works totally fine for enter.... Here some changes i made Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress If GetAsyncKeyState(Keys.Enter) > 0 Then MsgBox("Enter") Else End If End Sub
Even this is not working although it's done on Key press event....
greendragons
Posts
-
Key Tracking Using API not working -
Key Tracking Using API not workingI have put msg box jes to chk if it's working or not.... Ma question is that y this code not working for keys A B C... It's only working for few keys like enter, Ctrl, Escape.....
-
Key Tracking Using API not workingI made a lil' application that tracks wht key has been pressed... I have called api function... but it's not tracking keys like A or a , R... It's working for Enter, backspace pretty well..... Why it is not working for alphabets.....
Declare Function GetAsyncKeyState Lib "user32" Alias "GetAsyncKeyState" (ByVal vKey As Keys) As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If GetAsyncKeyState(Keys.A) > 0 Then MsgBox("A") Else End If End Sub End Class
-
clearInterval Not working on IEThnx a lot!!! REPS!! ++++++ can u plz look through http://www.codeproject.com/Messages/3587075/onmouseorver-for-child-element.aspx[^]
-
clearInterval Not working on IEI modified da code and put var ID... = setInterval(....)..., but now it says da ID i gave is unidentified by browsers(both IE and Firefox).....
window.onload=inItAll; var j=0; var N=2; function inItAll() { document.getElementById("img1").onclick=click; } function click() { if(navigator.appName=="Netscape") { j=0.9; var IntervalIDN1 = setInterval("fadeN()",40); //for firefox } else { j=90; var IntervalIDI1 = setInterval("fadeI()",40); //for IE } } function fadeN() //for Firefox { j=j-0.1 if(j>0.4) { document.getElementById("img1").style.opacity= j; } else { j=0.4; window.clearInterval(IntervalIDN1); document.getElementById("img1").src = "images/"+N+".jpg"; var IntervalIDN2 = setInterval("showN()",40); } } function showN() //for firefox { if(j<1) { document.getElementById("img1").style.opacity= j; j=0.1 + j; } else { window.clearInterval(IntervalIDN2); document.getElementById("img1").style.opacity= 1; } } function fadeI() //for IE { j=j-10 if(j>40) { document.getElementById("img1").style.filter ="alpha(opacity="+j+")"; } else { j=40; window.clearInterval(IntervalIDI1); document.getElementById("img1").src = "images/2.jpg"; var IntervalIDI2 = setInterval("showI()",40); } } function showI() //for IE { if(j<100) { document.getElementById("img1").style.filter ="alpha(opacity="+j+")"; j=10 + j; } else { document.getElementById("img1").style.filter ="alpha(opacity="+100+")"; window.clearInterval(IntervalIDI2); } }
if i remove ids it works perfectly on Firefox but not on IE.... -
clearInterval Not working on IEI don't know anything about jquery......it's will take long to understand and implement that coz it's new technology for me...so plz can u help me with this in Javascript code.... Thnx...
-
clearInterval Not working on IEHere is the code....it works fine on mozilla but on IE clearInterval doesn't work,,...
.imgf{width:300px; height:250px;} #img2{z-index:1000;} window.onload=inItAll; var j=0; var N=2; function inItAll() { document.getElementById("img1").onclick=click; } function click() { if(navigator.appName=="Netscape") { j=0.9; setInterval("fadeN()",40); } else { j=90; var fI = setInterval("fadeI()",40); } } function fadeN() { j=j-0.1 if(j>0.4) { document.getElementById("img1").style.opacity= j; } else { j=0.4; window.clearInterval(); document.getElementById("img1").src = "images/"+2+".jpg"; setInterval("showN()",40); } } function showN() { if(j<1) { document.getElementById("img1").style.opacity= j; j=0.1 + j; } else { window.clearInterval(); document.getElementById("img1").style.opacity= 1; } } function fadeI() { j=j-10 if(j>40) { document.getElementById("img1").style.filter ="alpha(opacity="+j+")"; } else { j=40; window.clearInterval(fI); document.getElementById("img1").src = "images/2.jpg"; var sI = setInterval("showI()",40); } } function showI() { if(j<100) { document.getElementById("img1").style.filter ="alpha(opacity="+j+")"; j=10 + j; } else { document.getElementById("img1").style.filter ="alpha(opacity="+100+")"; window.clearInterval(sI); } } 
it gives unwanted flicks on IE coz clearInterval did not work..... -
onmouseorver for child elementi was creating little animation using javascript....but got stuck
body{} .imgC{width:350px; height:300px;} #divV{background-color:#000000; opacity:0.6; filter:alpha(opacity=60); width:350px; height:70px;} #mainDiv{width:100%; height:100%; background-color:#c3c3c3; top:0px; left:0px; position:absolute;} window.onload=inItAll; function inItAll() { document.getElementById("img1").onmouseover = cursorOver; document.getElementById("img1").onmouseout = cursorOut; document.getElementById("divV").onmouseout = cursorVOut; } function cursorOver() { if(!document.getElementById("divV")) { var Y1 = document.getElementById("img1").offsetTop; var X1 = document.getElementById("img1").offsetLeft; var Elem = document.createElement("div"); Elem.id="divV"; Elem.cssClass="divVc"; Elem.style.position="absolute"; Elem.style.top = 230+Y1+"px"; Elem.style.left = X1+"px"; document.getElementById("div1").appendChild(Elem); } } function cursorOut(e) { var Y1 = document.getElementById("img1").offsetTop; var Y2 = Y1 + 300; var X1 = document.getElementById("img1").offsetLeft; var X2 = X1 + 350; if (!e) var e = window.event; if (e.pageX || e.pageY) { posx = e.pageX; posy = e.pageY; } else if (e.clientX || e.clientY) { posx = e.clientX posy = e.clientY } if(posx>=X1 && posx<=X2 && posy>=Y1 && posy<=Y2) { } else { var Elem = document.getElementById("divV"); document.getElementById("div1").removeChild(Elem); } } function cursorVOut() { var Elem = document.getElementById("divV"); document.getElementById("div1").removeChild(Elem); } 
everything works fine except document.getElementById("divV").onmouseout = cursorVOut; this part is not working..... when i bring cursor on image(img1) a small div appears at the bottom of image and if i move my cursor out it should disappear...the p -
Dynamic buttons ID retrievalI created suppose 10 buttons dynamically...... how to get ID of a clicked button protected void Page_Load(object sender, EventArgs e) { for (int i = 0; i < 10; i++) { Button b1 = new Button(); b1.ID = "b" + i.ToString(); b1.Click += b_Click; form1.Controls.Add(b1); } } in event hander of click how to retrieve the ID of clicked button..... protected void b_Click(object sender, EventArgs e) { //want ID here........ }
-
Smileys symbols in textboxThnx a lot....:)
-
Smileys symbols in textbox -
IIS errorWhenever i try to publish filesystem website to HTTP, first it prompts me with an error to run as administartor and also to install windows component of IIS although i have checked every option while enabling IIS from Control Panel. And when i run VS as administrator it deploys successfully but while open site it gives error access denied......
-
Calling javascript for ASP textbox...lemme try with what u told....but can u tell why im getting error that end task......
-
Calling javascript for ASP textbox...Thnx :)....can i similarly add a function which is called on onload to this textbox.... im little confused..and also when im trying to add .js file as javascript source im getting typeLibBuilder stopped working error..... like this is the function i wanna call myjsfile.js window.onload= initAll; function initAll(){ document.getElementById(....id of text box).onblur= blur; document.getElementById(....id of text box).onfocus= focus; function blur(){.............} function focus(){.............} .............
-
Calling javascript for ASP textbox...Hello, I want to know how to call javascript function for asp textbox.... like i have created <asp:TextBox ID="search" runat="server"/> i wanna create a javascript function which checks some condition and triggers onblur and onfocus for this textbox......since it is runat server how to do that... THNX!
-
Default TextBox Text.....Thtz great working and exactly i wanted to do...:) But please can you explain how class changed....i was using this.className...... and u used document.getElementById("textbox1").className=...... Apparently both are same since the value of this is document.getElementById("textbox1")..... but in this way it's working.....how????
-
Default TextBox Text.....Ohhhhh i got it...sry i was little confused...Thnx..thtz quite tricky and defenitely will work...
-
Default TextBox Text.....If u don't mind please write the code... Thnx.
-
CSS Translucent Backgroundto simply stop opacity:1 for mozilla and for IE filter:alpha( opacity:100 )
-
CSS Translucent BackgroundYes it is done with opacity in css.... For mozilla and others it is #id{ opacity: 0.4; } for IE it is #id{ filter:alpha(opacity=40 ); } so mix 'em up #id{ opacity: 0.4; filter:alpha(opacity=40 ); }