locked
The common theme of Themes! RRS feed

  • Question

  • Hello!

    I am trying to get controls on an Outlook Form Region to display with the correct theme.  I have been trying to do this for years without success and had given up, but the recent reincarnation of the Black theme has bought this issue to a head for me.  I need to resolve it.  I am using Visual Studio 2013, VB and VSTO to create an Outlook COM Add-In.

    I have read on various forums that I need to add the line:

    System.Windows.Forms.Application.EnableVisualStyles()

    Which I’ve done, even though it’s already in the Form.Designer.Vb code.  I’ve tried adding this call to

    ThisAddIn_Startup and
    FormRegion_FormRegionShowing

    Neither made any difference.
    So I tried creating a new Outlook Add-In project (to eliminate any legacy code issues):
    1. Add a new Outlook Form Region item (as a Separate page)
    2. Add a simple Label (using the Visual Studio toolbox and editor)
    3. Build and run.
    Same problem - the label always draws as black text, even after adding the extra EnableVisualStyles calls.
    What am I doing wrong?  Is anyone able to put me out of my misery?!

    Tuesday, May 17, 2016 2:33 PM

Answers

  • Hi Charlie MCFC,

    we have again check and find that in Form Region Label does not support the Themes.

    There are no any property to implement the theme.

    as your provided link in that also mentioned that label is not supported.

    so it is not support theme.

    you can provide your feedback regarding this issue to Outlook User Voice.

    please visit the link below to give feedback.

    Outlook User Voice

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 31, 2016 10:03 AM

All replies

  • Hi Charlie MCFC,

    I have reproduce your issue by following the steps that you have mentioned above.

    I try to solve it and as soon as I find something I will provide you.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, May 18, 2016 10:23 AM
  • Wow, thank you Deepak!  I really appreciate your interest in this issue.

    Regards

    Charlie

    Wednesday, May 18, 2016 1:53 PM
  • Hello Charlie,

    Form regions don't use Office themes out of the box. You need to use custom or third-party controls for creating a similar UI. See Get current Office theme for more information.


    [custom.development]

    Wednesday, May 18, 2016 2:47 PM
  • Thank you Eugene. But the MSDN documentation says that it should work?  It states (referring to the Microsoft Outlook Controls) "These controls support Microsoft Windows themes".

    And Ken Slovak says "Using the OLK* controls will theme the controls correctly using visual styles" and similar on several posts.  I can't send links to these pages as this site won't let me as I'm not "verified".

    Charlie

    Wednesday, May 18, 2016 4:24 PM
  • Hi Charlie MCFC,

    I have also make a test and find that same issue occurs with different ms office application and different controls.

    I think It is not supported by the Form_region. you can see that if you try to put label on ribbon then it will change the formatting as per theme. without using Application.EnableVisualStyles.

    but with Form_Rigion it not supporting.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, May 19, 2016 8:14 AM
  • I appreciate your assistance but what you are saying is at odds with the Outlook 2013/2016 documentation and Ken Slovak's "Outlook 2007 Programming" book. The MSDN documentation also explicitly says that it will work:

    Outlook Controls:
    How displayed in a form region in Office Outlook 2007 or later?  Themed look

    https://msdn.microsoft.com/en-us/library/office/ff870136.aspx

    The simplest things always seem so difficult with Outlook! But thanks again to you both for your help.

    Friday, May 20, 2016 11:22 AM
  • And actually what makes this a really significant issue is that the form background changes color to match the theme.  This makes all the text invisible when the Black theme is used.  If the form background ignored the theme, like all the other controls, then this would be a purely visual problem, but now it's a usability problem.

    Is there any method to retrieve the Theme settings?  I know that you can retrieve the theme number from the registry, but this doesn't tell me what colors etc are used.  Clearly I can hard code this info, but that's hardly future proofed.

    Friday, May 20, 2016 1:56 PM
  • Hi Charlie MCFC,

    I will again make a try to find something that can help you to solve your issue.

    I also try to find some information regarding this issue but I did not find any useful information that I can provide you.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 24, 2016 6:35 AM
  • Hi Charlie MCFC,

    we have again check and find that in Form Region Label does not support the Themes.

    There are no any property to implement the theme.

    as your provided link in that also mentioned that label is not supported.

    so it is not support theme.

    you can provide your feedback regarding this issue to Outlook User Voice.

    please visit the link below to give feedback.

    Outlook User Voice

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, May 31, 2016 10:03 AM