'限定鼠标可移动的范围Public Sub DisableTrap(CurForm As Form)Dim erg As Long'声明过程变量'设置新坐标Dim NewRect As RectCurForm.Caption = "释放鼠标"With NewRect.Left = 0&.Top = 0&.Right = Screen.Width / Screen.TwipsPerPixelX.Bottom = Screen.Height / Screen.TwipsPerPixelYEnd Witherg& = ClipCursor(NewRect)End Sub
Option Explicit 'Public Ya As LongPrivate Type RectLeft As LongTop As LongRight As LongBottom As LongEnd TypePrivate Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
其實我是想封鎖DataReport那上面的工具欄,即不讓用戶按打印和導出按鈕!
可以實現么?
http://www.csdn.net/expert/topic/653/653383.xml?temp=.2192652
在窗体上放一个无边框的PictureBox,其Enabled=False.
在窗体Resize事件中调整PictureBox的大小,使其始终充满Form的客户区。
只要将选定区域的控件的Container设置为PictureBox即可实现不响应!连控件位置都不用调整!
至于选定控件,可以在Form本身的MouseDown/MouseUp/MouseMove事件中编程!另外,请帮忙回答我昨天的帖子:
http://www.csdn.net/expert/topic/654/654811.xml?temp=.8152735
主题: 我自认VB水平不错,请大家给我估估价!
'限定鼠标可移动的范围Public Sub DisableTrap(CurForm As Form)Dim erg As Long'声明过程变量'设置新坐标Dim NewRect As RectCurForm.Caption = "释放鼠标"With NewRect.Left = 0&.Top = 0&.Right = Screen.Width / Screen.TwipsPerPixelX.Bottom = Screen.Height / Screen.TwipsPerPixelYEnd Witherg& = ClipCursor(NewRect)End Sub
'Public Ya As LongPrivate Type RectLeft As LongTop As LongRight As LongBottom As LongEnd TypePrivate Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
我想您是不是想在测试版中不允许打印啊?
BorderStyle=0
Enabled=False
hehe
謝謝妳跟我一起想辦法.可是妳的辦法行不通,好像有點掩耳盜鈴哦.
//怎么屏蔽DataReport中那個打印和導出的按鈕