简体   繁体   English

asp.net页面中的Cursor.Position

[英]Cursor.Position in asp.net page

i am trying to change the cursor position with timer. 我正在尝试使用计时器更改光标位置。 it is working perfectly in debug mode but when i publish and host it, the code is not working. 它在调试模式下可以正常工作,但是当我发布并托管它时,代码无法正常工作。

The following code i used and i have imported windows.Forms`. 我使用的以下代码已经导入了windows.Forms`。 I need to do this as it is a child lock application where when they try to click on any link it will drag them to other path and if they are adult this will be disabled 我需要这样做,因为这是一个儿童锁应用程序,当他们尝试单击任何链接时,会将他们拖到其他路径,如果他们是成人,则将其禁用

protected void Timer1_Tick(object sender, EventArgs e)
    {
        Cursor.Position = new Point(Cursor.Position.X - 300, Cursor.Position.Y - 300); 
    }`

"Code Behind" is always executed on the hosting server, before any HTML is sent to the client browser. 在将任何HTML发送到客户端浏览器之前,始终在托管服务器上执行“代码隐藏”。

You are moving the server's mouse cursor. 您正在移动服务器的鼠标光标。

And, if you want to disable functionality if there is no proper authentication, make it unclickable in the first place. 并且,如果您要在没有适当的身份验证的情况下禁用功能,请首先使其不可单击。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM