'How to sendkeys ctrl and Mouse wheel?

Use WebBrowser to browse folder paths.

And I want to make a zoom.

Really do this with the ctrl and mouse wheel.

I would like to do that with the code:

WebBrowser_Folder_Failes.Focus()
SendKeys.Send("^{+}")

Unfortunately, I failed.

How to sendkeys ctrl and Mouse wheel?



Solution 1:[1]

You can use this code.

 [DllImport("user32.dll")]
        private static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint dwData, int dwExtraInfo);

It create method mouse_event in class. Then just use this method.

uint perSent = 10;
mouse_event(0x0800, 0,0,perSent ,0);//it will zoom 10 per sent 

If you want understand more, check this: https://www.pinvoke.net/default.aspx/user32.mouse_event or just google mouseeventflags and use mouse_event.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dema