📄 vb11.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0057)http://www.pconline.com.cn/experience/subject/VB/vb11.htm -->
<HTML><HEAD><TITLE>|><| 太平洋电脑信息网</TITLE><!-- #BeginTemplate "/Templates/0723.dwt" --><!-- #BeginEditable "doctitle" --><!-- #EndEditable -->
<META content="text/html; charset=gb2312" http-equiv=Content-Type><LINK
href="vb11.files/text.css" rel=stylesheet>
<STYLE type=text/css>.sfont {
LINE-HEIGHT: 18pt
}
</STYLE>
<META content="MSHTML 5.00.2014.210" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD vAlign=top width="100%">
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR bgColor=#303880>
<TD><A href="http://www.pconline.com.cn/"><IMG alt=太平洋电脑信息网 border=0
height=18 hspace=30 src="vb11.files/txtpconline.gif"
width=96></A><IMG height=10 src="vb11.files/blank.gif"
width=400></TD></TR></TBODY></TABLE></TD>
<TD align=right background=vb11.files/bw.gif noWrap width=130><IMG
height=26 src="vb11.files/bw.gif" width=10><A
href="http://www.pconline.com.cn/sitemap/"><IMG alt=网站地图 border=0
height=26 src="vb11.files/sitemap.gif" width=21></A><IMG height=26
src="vb11.files/bw.gif" width=10><A
href="http://www.pconline.com.cn/tpy/"><IMG alt=关于太平洋 border=0 height=26
src="vb11.files/aboutus.gif" width=21></A><IMG height=26
src="vb11.files/bw.gif" width=10><A
href="http://www.pconline.com.cn/tpy/tariff.html"><IMG alt=与我们联系 border=0
height=26 src="vb11.files/contact.gif" width=21></A><IMG height=26
src="vb11.files/bw.gif" width=10></TD></TR></TBODY></TABLE><BR>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=760>
<TBODY>
<TR>
<TD bgColor=#666666><IMG height=1 src="vb11.files/blank.gif" width=1></TD>
<TD bgColor=#666666><IMG height=1 src="vb11.files/blank.gif" width=1></TD>
<TD> </TD>
<TD colSpan=2 noWrap><A
href="http://www.pconline.com.cn/experience/index.html"><IMG
align=absBottom alt=企业之窗 border=0 height=15
src="vb11.files/txtexperience.gif" width=68></A> <A
href="http://www.pconline.com.cn/">首 页</A> <A
href="http://www.pconline.com.cn/market/">今日报价</A> <A
href="http://www.pconline.com.cn/recommend/">产品推介</A> <A
href="http://www.pconline.com.cn/yp/">企业之窗</A> <A
href="http://www.pconline.com.cn/news/">科技新闻</A> <A
href="http://www.pconline.com.cn/product/">产品查询</A> <A
href="http://www.pconline.com.cn/download/">软件下载</A></TD></TR>
<TR>
<TD><IMG height=1 src="vb11.files/blank.gif" width=1></TD>
<TD><IMG height=1 src="vb11.files/blank.gif" width=1></TD>
<TD><IMG height=1 src="vb11.files/blank.gif" width=21></TD>
<TD bgColor=#ffa000 colSpan=2><IMG height=1 src="vb11.files/blank.gif"
width=1></TD></TR>
<TR>
<TD bgColor=#666666><IMG height=1 src="vb11.files/blank.gif" width=1></TD>
<TD bgColor=#cdcdcd><IMG height=5 src="vb11.files/blank.gif" width=1></TD>
<TD align=right colSpan=3><IMG height=6 src="vb11.files/ffa000.gif"
width=1></TD></TR>
<TR>
<TD bgColor=#666666><IMG height=1 src="vb11.files/blank.gif" width=1></TD>
<TD align=right><A href="http://www.pconline.com.cn/"><IMG alt=太平洋电脑信息网
border=0 height=35 src="vb11.files/pconline.com.cn.gif" vspace=10
width=162></A></TD>
<TD> </TD>
<TD vAlign=bottom><!-- #BeginEditable "important_news" --><IMG height=40
src="vb11.files/blank.gif" width=350><!-- #EndEditable --></TD>
<TD align=right vAlign=top><!-- #BeginEditable "adv_top" --><IMG alt=广告位
height=43 src="vb11.files/icon.gif"
width=190><!-- #EndEditable --></TD></TR></TBODY></TABLE>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=760>
<TBODY>
<TR>
<TD bgColor=#666666 width=1><IMG height=1 src="vb11.files/blank.gif"
width=1></TD>
<TD vAlign=top width=170><!-- #BeginEditable "addons" --><!--替代为附加信息 --><!-- #EndEditable --></TD>
<TD bgColor=#666666 width=1><IMG height=1 src="vb11.files/blank.gif"
width=1></TD>
<TD><IMG height=1 src="vb11.files/blank.gif" width=21></TD>
<TD colSpan=3 vAlign=top width=566><!-- #BeginEditable "1" --><IMG
height=1 src="vb11.files/blank.gif" width=566><BR><IMG height=1
src="vb11.files/666666.gif" width=420><BR><IMG height=13
src="vb11.files/blank.gif" width=1><A
href="http://www.pconline.com.cn/experience/">经验共享</A> > <SPAN
class=greenb><A
href="http://www.pconline.com.cn/experience/subject/VB/index.html">专题教程</A></SPAN><A
href="http://www.pconline.com.cn/experience/subject/VB/index.html">
VB专区</A>> <BR><IMG height=1 src="vb11.files/666666.gif" vspace=1
width=420><BR>
<P align=center><B><FONT color=#000066>VB编程中如何锁定鼠标</FONT></B></P>
<P align=center>出自:电脑报</P>
<P
class=sfont> 锁定鼠标!什么意思?有人一定不明白了,好!让笔者先说明一下吧!锁定鼠标就是让你的鼠标不能移动,不能单击,当然也不能双击,不能做任何事,反正就是让鼠标本来应有的功能都失效,就跟坏了的一样,很有趣的。你也可以尝试编写一个和你的朋友开个小小的玩笑,不过,不要忘记还原啊!OK!就让笔者用VB编程为各位演示一下这个程序吧!<BR> 首先,新建工程,在FORM1上放上两个COMMAND命令按钮(即COMMAND1与COMMAND2),其属性都保持不变,然后请输入以下程序代码:<BR> Private
Declare Function ClipCursor Lib ″user32″ (lpRect As Any) As
Long<BR> Private Type RECT<BR> Left As Long<BR> Top As Long<BR> Right
As Long<BR> Bottom As Long<BR> End Type //以上代码请从API函数浏览器中复制即可。<BR> Dim
DENG As RECT<BR> Dim SS As Boolean
//是锁定或是释放的判断<BR> ------------<BR> Private Sub Form_Load()
//作初始化设置。<BR> SS = True<BR> Command1.Caption =
″单击将锁定鼠标,锁定后按回车将被释放″。<BR> Command2.Caption = ″结束程序″<BR> Form1.Caption =
″锁定鼠标的演示程序″<BR> End Sub<BR> -----------<BR> Private Sub
Command1_Click() //锁定鼠标<BR> If SS = True Then
//如果鼠标没有被锁定则锁定它。<BR> DENG.Left = 0:DENG.Top = 0
//必要设置,四个都为零。<BR> DENG.Right = 0:DENG.Bottom = 0<BR> ClipCursor DENG :
SS = False //锁定鼠标且重新赋值给SS。<BR> Else <BR> ClipCursor ByVal 0& : SS = True
//释放鼠标且重新赋值给SS<BR> End If<BR> End Sub<BR> -----------<BR> Private Sub
Command2_Click()<BR> End //结束程序。<BR> End
Sub<BR> 现在运行一下吧(按下F5),单击COMMAND1鼠标将被锁定,锁定后要释放请按下回车键即可。当然你也可以把上面的DENG的LEFT,TOP,RIGHT,BOTTOM值都改成100(或每个都不相同的值)再试一试,相信你一定会有其他新的收获!<BR> 注:以上程序在中文WINDOWS98,
中文VB5.0专业版中调试通过!<BR><B>(上海 季昭君)</B> </P>
<P align=right class=sfont><A
href="http://www.pconline.com.cn/index.html">更多文章……</A></P><!-- #EndEditable --></TD></TR></TBODY></TABLE>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=760>
<TBODY>
<TR>
<TD bgColor=#666666 width=1><IMG height=1 src="vb11.files/blank.gif"
width=1></TD>
<TD align=right vAlign=bottom width=170><IMG height=10
src="vb11.files/blank.gif" width=170><BR></TD>
<TD bgColor=#666666 width=1><IMG height=1 src="vb11.files/blank.gif"
width=1></TD>
<TD width=21><IMG height=1 src="vb11.files/blank.gif" width=21></TD>
<TD bgColor=#eeeeee width=566><IMG height=10 src="vb11.files/blank.gif"
width=566><BR>版权所有©1999 太平洋电脑信息网<BR><FONT
face="Arial, Helvetica, sans-serif"><A
href="mailto:exp@pconline.com.cn">exp@pconline.com.cn</A></FONT> <IMG
height=1 src="vb11.files/hhvisit.html" width=1> </TD></TR></TBODY></TABLE><!-- #EndTemplate --></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -