Raster layer transparency

Jun 6, 2011 at 5:05 PM



 Nowadays I am developing an application of telecommunications in which it is necessary to make transparent some of the layers, in order to . I have tried to make a raster  layer transparent by means of the code shown below, but it does not work.
 Can someone know how can alter the opacity of a raster layer?

 Thank you very much


    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll

        Dim sim As New RasterSymbolizer

        sim.Opacity = CDbl(1 / (TrackBar1.Maximum - TrackBar1.Minimum) * (TrackBar1.Value - TrackBar1.Minimum))

        imraster.Symbolizer = sim

        Label1.Text = (imraster.Symbolizer.Opacity).ToString


    End Sub