Results 1 to 12 of 12
  1. #1
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397

    set appicon with msysresources image?

    When I distribute my apps, I sometimes provide an icon to replace the access one for forms and the application (tho' the latter is usually hidden).



    This is done by setting the application icon in options>current database. But requires including a separate icon/image file which means I have to provide two files (FE and image file). I have a workaround which is to store the icon in a config table as an attachment and when the app opens it checks if the image file exists and if not, exports the attachment.

    But to save a bit of code and reduce the risk of potential errors I was wondering if anyone knows of a way of setting the application icon to one that is stored in the msysresources table? It doesn't look like it is possible, but thought it was worth the ask.

    Many thanks in advance

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Add the icon to the image library - you have to change it to a bmp file first. Then reference the bmp image like this (with no file path but do include the .bmp)

    Click image for larger version. 

Name:	FormIcon.PNG 
Views:	26 
Size:	133.7 KB 
ID:	46847

    FWIW, its possible to have different icons for each form ... but from experience none of your users will notice (or care!)
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    what do you mean by the image library? Not something I've used before..

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Sorry - the correct name is Image Gallery (not Library)

    In case, that still means nothing to you, the Image Gallery was added in 2010 along with themes.
    It is particularly useful for attaching images to your database that you may want to use in more than one place e.g. logos, form icons etc

    Click image for larger version. 

Name:	Capture.png 
Views:	25 
Size:	72.7 KB 
ID:	46849

    The images (along with theme info) are stored in a deep hidden system table f_...._Data which is attached to the MSysResources table

    To avoid file bloating, I would only recommend only using it with small image files
    Such images are described as 'linked' on the property sheet which is somewhat misleading.

    Anyway to access the image gallery open a form in design view, go to the Form_Design ribbon and click the Insert Image dropdown.
    Click Browse & add one or more images. You can then use them anywhere in your app by just referencing the file name
    Beware adding the same image multiple times - its easy to do by mistake

    Hope that helps
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    hmm

    I had already tried that - the other way to add to msysresources is to create an image control, browse to the file and select then change the control picture type to shared which adds it

    Problem is even if I upload a .bmp, it saves it in mysysresources as a .png - changing the extension makes no difference
    Click image for larger version. 

Name:	image_2021-12-07_213338.png 
Views:	23 
Size:	8.5 KB 
ID:	46850Click image for larger version. 

Name:	image_2021-12-07_213653.png 
Views:	23 
Size:	10.5 KB 
ID:	46851
    nor does changing the type.

    Tried doing this through the image gallery and same problem
    Click image for larger version. 

Name:	image_2021-12-07_214140.png 
Views:	23 
Size:	6.4 KB 
ID:	46852

    so must be missing a trick somewhere

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Yes I agree that it does state its a png after you 'upload' a bmp ...
    No idea whether Access converts the bmp to png to reduce file size or just wrongly records as png. Either way, it works.

    Apologies. My previous email should have referred to images in the gallery as Shared (NOT linked).

    P.S. Looks like you originally dragged your image into your post which as I've found out from previous experience doesn't work in this forum
    This is a small part of my very lengthy notification email:
    Click image for larger version. 

Name:	Capture.jpg 
Views:	20 
Size:	290.7 KB 
ID:	46853


    @matrix
    It would be much appreciated if the forum software could be updated to make uploading images much more convenient.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    I did - but didn't see all that!

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    That was only a small part of it.
    I repeatedly drag & drop images on this site as I'm so used to doing it elsewhere. Sadly it produces gobbledygook on this site
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,860
    While we are talking about anomalies, what do you need to do to be able to add plain text after posting a link in a post?

    I end up having to write the plain text then post any links after.
    I have tried a space, Carriage Return and that does not work?

    https://www.accessforums.net/showthread.php?t=84923
    and here is the CR after the above line
    and here is the space after the above line
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  10. #10
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Hi Paul
    As an experiment...as well as a bit of product placement:
    ==================================================
    Here is a link to my new website - still work in progress - Isladogs on Access

    My old website was switched off permanently early this morning - RIP

    And here is a link to my currently almost identical (but now HTTPS secure) old website Mendip Data Systems

    I am aware there are glitches on both sites - currently working on these
    ==================================================

    I didn't do anything. Just carried on typing after each link.
    Perhaps try a different browser? I'm using Edge

    P.S. I'm going to email you in an hour or so regarding the 2 websites
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  11. #11
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Quote Originally Posted by Welshgasman View Post
    While we are talking about anomalies, what do you need to do to be able to add plain text after posting a link in a post?

    https://www.accessforums.net/showthread.php?t=84923
    and here is the CR after the above line
    and here is the space after the above line
    Either add carriage returns before pasting the link above them or select the rest and remove the link (toolbar>earth with red cross). In latter case, you'll be back to normal. The former gives you "normal" space in which to continue typing. I do that when posting Excel tables because it can be impossible to get the cursor out of the table and continue post typing.
    My apologies to Ajax if his thread goes way off track.
    Last edited by Micron; 12-08-2021 at 10:13 AM. Reason: added info
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  12. #12
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    @Paul,
    Further to micron's response - I had the same issue for a long time. I found that after adding the link, I click on the a/A button (see the picture), then put cursor after the [/URL] and carry on. You can leave the button on or close it (click a second time).

    Sample link
    Plain text here


    Click image for larger version. 

Name:	PlainTextAfterALink.jpg 
Views:	15 
Size:	40.0 KB 
ID:	46855

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

Similar Threads

  1. Replies: 6
    Last Post: 09-18-2020, 09:06 PM
  2. Replies: 5
    Last Post: 07-10-2020, 12:41 PM
  3. Replies: 6
    Last Post: 03-22-2018, 12:02 PM
  4. Replies: 1
    Last Post: 12-26-2016, 08:57 AM
  5. Replies: 3
    Last Post: 07-13-2015, 12:07 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