ShowSobelFilterDlg Example for Visual Basic

Private Sub Sobel_Click()
	Dim RasterImgEfxDlg As New LEADRasterDlgImgEfx_U
	Dim RasterKrnDlg As New LEADRasterDlgKrn_U
	Dim nRet As Integer

	RasterKrnDlg.InitDlg 0
	RasterImgEfxDlg.UIFlags = SOBELFILTER_SHOW_PREVIEW Or _
								SOBELFILTER_SHOW_TOOL_ZOOMLEVEL

	RasterImgEfxDlg.Bitmap = LEAD1.Bitmap
	nRet = RasterImgEfxDlg.ShowSobelFilterDlg(hWnd)
	If (nRet = 0 And RasterImgEfxDlg.DialogStatus = DLG_OK) Then
		LEAD1.SpatialFilter RasterImgEfxDlg.SpatialFilterType
	End If
	RasterKrnDlg.FreeDlg
End Sub