ShowShearDlg Example for Visual Basic

Private Sub Shear_Click()
	Dim RasterImgDlg   As New LEADRasterDlgImg_U
	Dim RasterKrnDlg As New LEADRasterDlgKrn_U
	Dim nRet As Integer

	RasterKrnDlg.InitDlg 0
	RasterImgDlg.EnableHorizontal = True
	RasterImgDlg.Angle = 4500
	RasterImgDlg.BackColor = RGB(255, 0, 0)
	RasterImgDlg.UIFlags = SHEAR_SHOW_PREVIEW Or _
						  SHEAR_SHOW_BACKCOLOR Or _
						  SHEAR_SHOW_HORIZONTAL
	RasterImgDlg.Bitmap = LEAD1.Bitmap
	nRet = RasterImgDlg.ShowShearDlg(hWnd)
	If (nRet = 0 And RasterImgDlg.DialogStatus = DLG_OK) Then
		LEAD1.Shear RasterImgDlg.Angle, RasterImgDlg.EnableHorizontal, RasterImgDlg.BackColor
	End If
	RasterKrnDlg.FreeDlg
End Sub