ShowColoredGrayDlg Example for Visual Basic
Dim RasterColorDlg As New LEADRasterDlgClr
Dim RasterProc As New LEADRasterProcess
Dim nRet As Integer
Private Sub ColorGray_Click()
RasterColorDlg.RedFactor = 400
RasterColorDlg.GreenFactor = 300
RasterColorDlg.BlueFactor = 300
RasterColorDlg.RedGrayFactor = 400
RasterColorDlg.GreenGrayFactor = 300
RasterColorDlg.BlueGrayFactor = 300
RasterColorDlg.UIFlags = COLOREDGRAY_SHOW_PREVIEW Or _
COLOREDGRAY_SHOW_TOOL_ZOOMLEVEL
RasterColorDlg.Bitmap = LEADRasterView1.Raster.Bitmap
nRet = RasterColorDlg.ShowColoredGrayDlg (hWnd)
If (nRet = 0 And RasterColorDlg.DialogStatus = DLG_OK) Then
RasterProc.ConvertToColoredGray LEADRasterView1.Raster, _
RasterColorDlg.RedFactor, _
RasterColorDlg.GreenFactor, _
RasterColorDlg.BlueFactor, _
RasterColorDlg.RedGrayFactor, _
RasterColorDlg.GreenGrayFactor, _
RasterColorDlg.BlueGrayFactor
End If
End Sub