共用方式為


Mouse.Click 方法 (UITestControl, MouseButtons, ModifierKeys, Point)

在按住指定的輔助按鍵時,在指定的控制項上相對於該控制項的指定位置按一下指定的滑鼠按鈕。

命名空間:  Microsoft.VisualStudio.TestTools.UITesting
組件:  Microsoft.VisualStudio.TestTools.UITesting (在 Microsoft.VisualStudio.TestTools.UITesting.dll 中)

語法

'宣告
Public Shared Sub Click ( _
    control As UITestControl, _
    button As MouseButtons, _
    modifierKeys As ModifierKeys, _
    relativeCoordinate As Point _
)
public static void Click(
    UITestControl control,
    MouseButtons button,
    ModifierKeys modifierKeys,
    Point relativeCoordinate
)
public:
static void Click(
    UITestControl^ control, 
    MouseButtons button, 
    ModifierKeys modifierKeys, 
    Point relativeCoordinate
)
static member Click : 
        control:UITestControl * 
        button:MouseButtons * 
        modifierKeys:ModifierKeys * 
        relativeCoordinate:Point -> unit 
public static function Click(
    control : UITestControl, 
    button : MouseButtons, 
    modifierKeys : ModifierKeys, 
    relativeCoordinate : Point
)

參數

.NET Framework 安全性

請參閱

參考

Mouse 類別

Click 多載

Microsoft.VisualStudio.TestTools.UITesting 命名空間

UITestControl

MouseButtons

ModifierKeys

Point