property Surface.AllowZoomWheelSurface as Boolean
Enables or disables zooming the control using the mouse wheel.

TypeDescription
Boolean A Boolean expression that specifies whether the user can zoom the surface by rotating the mouse wheel.
By default, the AllowZoomWheelSurface property is True. The AllowZoomWheelSurface property specifies whether the user can zoom the surface by rotating the mouse wheel. The control fires the LayoutStartChanging(exSurfaceZoom) / LayoutEndChanging(exSurfaceZoom) event when the user zooms the surface. The Zoom property specifies the current zooming factor of the surface. The ZoomMin/ZoomMax property specifies the range of the surface's zooming. 

The following samples shows how you can prevent zooming the surface:

VBA (MS Access, Excell...)

With Surface1
	.AllowZoomSurface = 0
	.AllowZoomWheelSurface = False
	.ToolBarFormat = "-1,100"
End With

VB6

With Surface1
	.AllowZoomSurface = exDisallow
	.AllowZoomWheelSurface = False
	.ToolBarFormat = "-1,100"
End With

VB.NET

With Exsurface1
	.AllowZoomSurface = exontrol.EXSURFACELib.AllowKeysEnum.exDisallow
	.AllowZoomWheelSurface = False
	.ToolBarFormat = "-1,100"
End With

VB.NET for /COM

With AxSurface1
	.AllowZoomSurface = EXSURFACELib.AllowKeysEnum.exDisallow
	.AllowZoomWheelSurface = False
	.ToolBarFormat = "-1,100"
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXSURFACELib' for the library: 'ExSurface 1.0 Control Library'

	#import <ExSurface.dll>
	using namespace EXSURFACELib;
*/
EXSURFACELib::ISurfacePtr spSurface1 = GetDlgItem(IDC_SURFACE1)->GetControlUnknown();
spSurface1->PutAllowZoomSurface(EXSURFACELib::exDisallow);
spSurface1->PutAllowZoomWheelSurface(VARIANT_FALSE);
spSurface1->PutToolBarFormat(L"-1,100");

C++ Builder

Surface1->AllowZoomSurface = Exsurfacelib_tlb::AllowKeysEnum::exDisallow;
Surface1->AllowZoomWheelSurface = false;
Surface1->ToolBarFormat = L"-1,100";

C#

exsurface1.AllowZoomSurface = exontrol.EXSURFACELib.AllowKeysEnum.exDisallow;
exsurface1.AllowZoomWheelSurface = false;
exsurface1.ToolBarFormat = "-1,100";

JavaScript

<OBJECT classid="clsid:AC1DF7F4-0919-4364-8167-2F9B5155EA4B" id="Surface1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
	Surface1.AllowZoomSurface = 0;
	Surface1.AllowZoomWheelSurface = false;
	Surface1.ToolBarFormat = "-1,100";
</SCRIPT>

C# for /COM

axSurface1.AllowZoomSurface = EXSURFACELib.AllowKeysEnum.exDisallow;
axSurface1.AllowZoomWheelSurface = false;
axSurface1.ToolBarFormat = "-1,100";

X++ (Dynamics Ax 2009)

public void init()
{
	;

	super();

	exsurface1.AllowZoomSurface(0/*exDisallow*/);
	exsurface1.AllowZoomWheelSurface(false);
	exsurface1.ToolBarFormat("-1,100");
}

Delphi 8 (.NET only)

with AxSurface1 do
begin
	AllowZoomSurface := EXSURFACELib.AllowKeysEnum.exDisallow;
	AllowZoomWheelSurface := False;
	ToolBarFormat := '-1,100';
end

Delphi (standard)

with Surface1 do
begin
	AllowZoomSurface := EXSURFACELib_TLB.exDisallow;
	AllowZoomWheelSurface := False;
	ToolBarFormat := '-1,100';
end

VFP

with thisform.Surface1
	.AllowZoomSurface = 0
	.AllowZoomWheelSurface = .F.
	.ToolBarFormat = "-1,100"
endwith

dBASE Plus

local oSurface

oSurface = form.Activex1.nativeObject
oSurface.AllowZoomSurface = 0
oSurface.AllowZoomWheelSurface = false
oSurface.ToolBarFormat = "-1,100"

XBasic (Alpha Five)

Dim oSurface as P

oSurface = topparent:CONTROL_ACTIVEX1.activex
oSurface.AllowZoomSurface = 0
oSurface.AllowZoomWheelSurface = .f.
oSurface.ToolBarFormat = "-1,100"

Visual Objects


oDCOCX_Exontrol1:AllowZoomSurface := exDisallow
oDCOCX_Exontrol1:AllowZoomWheelSurface := false
oDCOCX_Exontrol1:ToolBarFormat := "-1,100"

PowerBuilder

OleObject oSurface

oSurface = ole_1.Object
oSurface.AllowZoomSurface = 0
oSurface.AllowZoomWheelSurface = false
oSurface.ToolBarFormat = "-1,100"

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Set ComAllowZoomSurface to OLEexDisallow
	Set ComAllowZoomWheelSurface to False
	Set ComToolBarFormat to "-1,100"
End_Procedure

XBase++

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oSurface

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oSurface := XbpActiveXControl():new( oForm:drawingArea )
	oSurface:CLSID  := "Exontrol.Surface.1" /*{AC1DF7F4-0919-4364-8167-2F9B5155EA4B}*/
	oSurface:create(,, {10,60},{610,370} )

		oSurface:AllowZoomSurface := 0/*exDisallow*/
		oSurface:AllowZoomWheelSurface := .F.
		oSurface:ToolBarFormat := "-1,100"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN