Results 1 to 4 of 4

Thread: Form Icon (97)

  1. #1
    Lounger
    Join Date
    May 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form Icon (97)

    Is there a way to change the icon in the title bar of the form? I found something on www.mvps.org but I couldn't get it to work!
    thanks
    dgw

  2. #2
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Form Icon (97)

    If you use VB proper (vice VBA) you know it is simple task to set form icon property. No such luck in Access. Out of curiosity checked out sample code from the MVPS site, code seems to work OK (I tested in A2K/AXP), but works best only for pop-up & dialog type forms that are opened in a "restored" window - if form opened maximized did not always get good results (icon did not appear till form resized; custom icon "stuck" in active window when form closed). How are you implementing the SetFormIcon function?

    Example of use (with dialog type form): <pre>Private Sub Form_Open(Cancel As Integer)

    DoCmd.Restore
    Dim strIconPath As String
    strIconPath = "C:ACCESSICONSICONFILE.ico"
    SetFormIcon Me.hWnd, strIconPath

    End Sub</pre>

    For best results I would recommend using this function only for popup/dialog forms that cannot be maximized by user. Anyone interested, here is the link: http://www.mvps.org/access/api/api0043.htm
    HTH

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Form Icon (97)

    Title bar of a form, or title bar of the application?
    Charlotte

  4. #4
    Lounger
    Join Date
    May 2002
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Form Icon (97)

    Title bar on a form

Posting Permissions

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