Disable Zoom
Hi Andrea De Luca,
Currently, we don’t have direct API support to disable zoom in the WinForms PdfViewer. We are checking for any possible workaround and will update you on November 24, 2025.
Regards,
YaminiSri M
Hi Andrea De Luca,
To disable zoom using Ctrl + Mouse Wheel, we have created a sample workaround to achieve this in the code-behind. In this sample, we subscribe to the MouseWheel event, and inside the handler, we check the HandledMouseEventArgs and set Handled to true to disable zoom. We have also attached the sample for your reference. Please review it and let us know if you need any further assistance.
Regards,
YaminiSri M
Attachment: Form_Field_issue_e3c936b5.zip
Hi, thanks for your reply.
I use Visual Basic so i've translated the code in:
If ((ModifierKeys & Keys.Control) = Keys.Control) Then
Dim handledArgs As HandledMouseEventArgs = e
If (handledArgs IsNot Nothing) Then
handledArgs.Handled = True
End If
End If
It works but only for e.delta <0
Hi Andrea De Luca,
After further analysis, we found that ModifierKeys and Keys.Control are numeric values in VB.NET. To check if the Ctrl key is pressed, we need to use a bitwise AND operation. In VB.NET, the correct operator for bitwise AND is And, not &.
But we initially used &, which is a string concatenation operator in VB.NET. This caused the condition to fail, so the zoom was not disabled. When you replace & with And, the condition works correctly because it performs the intended bitwise comparison.
Here’s the correct code snippet:
Please review it and let us know if you need any further assistance.
Regards,
YaminiSri M
Fantastico!!
It was my fault 😒😒
Thank You very much.
Your assistence is superb
Regards,
YaminiSri M
- 6 Replies
- 2 Participants
-
AD Andrea De Luca
- Nov 18, 2025 04:35 PM UTC
- Nov 26, 2025 05:33 AM UTC