Results 1 to 2 of 2

Thread: Status Bar Panel Picture Problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Antrim
    Posts
    80
    Hi,

    I have a status bar on my form which I want to display a different icon or no icon at all depending on which page is in the web browser on the form (there are only three possible options).

    I am using the following code:

    'Ensure that status bar panels display the correct _
    information
    If wbrReport.LocationURL = _
    "G:\Wiz Add Ins\Energy Client\HTML\Statement.htm" Then
    sbrReport.Panels(1).Picture = LoadPicture _
    ("G:\Wiz Add Ins\Energy Client\Images\SStatement.ico")
    sbrReport.Panels(1).Text = "Statement view"
    ElseIf wbrReport.LocationURL = _
    "G:\Wiz Add Ins\Energy Client\HTML\Chart.htm" Then
    sbrReport.Panels(1).Picture = LoadPicture _
    ("G:\Wiz Add Ins\Energy Client\Images\SChart.ico")
    sbrReport.Panels(1).Text = "Chart view"
    Else
    sbrReport.Panels(1).Picture = (None)
    sbrReport.Panels(1).Text = ""
    End If
    sbrReport.Panels(2).Text = _
    CStr(Format(frmMain.datReportDate, "Long Date"))

    VB does not like the statement:

    sbrReport.Panels(1).Picture = (None)

    I've tried specifying the property as a string:

    "(None)" / "None".

    I've also tried setting the Type property of the Picture Object:

    sbrReport.Panels(1).Picture.Type = vbPicTypeNone

    None of this is working. I just want to remove the pictures from the panels when they are not relevant.

    Does anyone know how to do this?

    Any suggestions would be greatly appreciated.

    Best regards,

    Rob Brown.

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    If you call LoadPicture without any arguments the picture will disappear.
    Code:
    sbrReport.Panels(1).Picture = LoadPicture
    Good luck!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width