ActiveReports 18 .NET Edition
MESCIUS.ActiveReports Assembly / GrapeCity.ActiveReports.SectionReportModel Namespace / Picture Class / ResetImage Method
Example

In This Topic
    ResetImage Method
    In This Topic
    Sets the current image to null.
    Syntax
    'Declaration
     
    Public Sub ResetImage() 
    public void ResetImage()
    Example
    private void groupHeader1_Format(object sender, System.EventArgs eArgs)
    {
        if (this.txtCountry.Value.ToString() == "France")
        {
            this.picture1.ResetImage();
        }
        else
        {
            this.picture1.Image = GrapeCity.ActiveReports.Document.Drawing.Image.FromStream(new FileInfo("c:\\DSCF2183.JPG").OpenRead());
        }
    }
    Private Sub GroupHeader1_Format(ByVal sender As Object, ByVal e As System.EventArgs) Handles GroupHeader1.Format
        If Me.txtCountry.Value.ToString = "France" Then
            Me.Picture1.ResetImage()
        Else
            Me.Picture1.Image = GrapeCity.ActiveReports.Document.Drawing.Image.FromStream(New FileInfo("c:\DSCF2183.JPG").OpenRead())
        End If
    End Sub
    See Also