爱问知识人 爱问教育 医院库

求助:用VB.NET编写一个锁定屏幕的程序?

首页

求助:用VB.NET编写一个锁定屏幕的程序?

求助:请用VB.NET编写一个锁定屏幕的程序,有一个活动窗口就是登录界面,用户只有在通过有效用户名和密码登录后才能进行其他操作。

要求:
1、用API函数
2、鼠标和键盘只能在当前的窗口进行操作
   例如:像点开始——>关闭计算机后只能在当前提示框中操作一样
3、当前窗口不能被任意拖动、最大化、最小化

十万火急~~~万分感谢~~~~!!!

提交回答
好评回答
  • 2005-06-09 14:21:31
      Private Sub cmdLockWorkstation_Click()
    Dim prev_value As Long
    Dim wid As Long
    Dim hgt As Long
        cmdLockWorkstation。
      Enabled = False cmdUnlockWorkstation。Enabled = True cmdExit。Enabled = False ' Save the current size and position。
       m_LastLeft = Left m_LastTop = Top m_LastWidth = Width m_LastHeight = Height ' Put the form on top of everything including ' the task bar。
       wid = Screen。Width / Screen。TwipsPerPixelX hgt = Screen。Height / Screen。TwipsPerPixelY SetWindowPos hwnd, HWND_TOPMOST, 0, 0, wid, hgt, 0 ' Tell the system a screen saver is running。
       SystemParametersInfo SPI_SCREENSAVERRUNNING, True, _ prev_value, 0 End Sub To unlock the workstation, the program uses SystemParametersInfo to tell the system that no screen saver is running。
       Private Sub cmdUnlockWorkstation_Click() Dim prev_value As Long cmdLockWorkstation。Enabled = True cmdUnlockWorkstation。
      Enabled = False cmdExit。Enabled = True ' Restore the size and position。 Move m_LastLeft, m_LastTop, m_LastWidth, m_LastHeight ' Tell the system no screen saver is running。
       SystemParametersInfo SPI_SCREENSAVERRUNNING, False, _ prev_value, 0 End Sub 。

    象***

    2005-06-09 14:21:31

其他答案

  • C#/.NET 相关知识

  • 电脑网络技术
  • 电脑网络

相关推荐

正在加载...

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):