Results 1 to 5 of 5
  1. #1
    Forbes's Avatar
    Forbes is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    133

    Web Browser Background Transparent on Form Load

    Hello everyone, I have been playing around with GiFs in forms and I used a web browser to import the GiF and it animates fine, nothing is bogged down however I would like to make the web browser background transparent, I've googled as much as I could but nothing seemed to work any suggestions?

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,931
    I suspect you are wanting to apply transparency to the backcolor of a web page - but that is in the domain of the website and the browser and access has no control over that. You can apply transparency to access forms in their own window (i.e. you are using overlapping windows or the form is a popup), but not to individual controls on a form, unless it is an available property.

    Here's how to apply varying degrees of transparency to a whole form window. http://www.lebans.com/transparent.htm. It works, I use it myself with some adaptations for certain applications. But it provides transparency to the whole form, including text and graphics on that form which is probably not what you want. Setting transparency at say 70% is still readable depending on the underlying background and you can also set whether mouse events etc apply to the transparent form or the underlying form.

    So you could put your webbrowser control in a separate popup form with border style set to none and use code to place it where you want over the 'main form'. You'll need additional code to ensure it stays on top when the mainform has the focus and moves with the mainform window if it can be moved.

    One for you to investigate. Every control has its own window and if you look in the module code from this link http://www.lebans.com/SelectRow.htm, you will find code which loops through the form objects to identify a specific object 'window'. This code is looking for the scrollbar windows, but should think you can adapt it to find your webcontrol window. You can then see if applying transparency from the first link to the webcontrol window works. But as I said at the beginning, I suspect this is not what you are looking for.

    EDIT: perhaps you don't want to see the webbrowser control on form load, in which case why not just set its visible property to no?

  3. #3
    Forbes's Avatar
    Forbes is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    133
    What if the GiF file is local though and the GiF in the browser control has a default transparent background, I am looking through these links I appreciate the help.

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,931
    The usual way to solve this is to make the background of the gif (or any other image format) the same colour as the backcolor of the form where the control resides. However I have not played around with animated gifs so cannot advise.

  5. #5
    Forbes's Avatar
    Forbes is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    133
    Well, funny enough, I did just that Ajax until I can find another solution, this appears to be something a few people have played with but haven't really found a full proof method yet. I will mark this as solved unless anyone would like to see more input or until this becomes a problem and not just a simple I wonder if.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 12-17-2015, 02:54 AM
  2. Replies: 9
    Last Post: 11-22-2015, 11:19 AM
  3. Can't make the Tab transparent
    By panoss in forum Forms
    Replies: 4
    Last Post: 11-06-2014, 09:33 AM
  4. How to run an access form in web browser
    By developer8 in forum Access
    Replies: 1
    Last Post: 01-18-2014, 11:38 AM
  5. Transparent text box title on Form?
    By LostInAccess in forum Forms
    Replies: 5
    Last Post: 06-29-2012, 02:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums