web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Visual Studio C# Change form background color does not work

(0) ShareShare
ReportReport
Posted on by 75,848 Moderator
I have a very basic VS C# project built on a Dynamics GP windows form. The usual color change code does not work. 
Is there something different that has to be done for a Dynamics GP windows form to change the background color?

private void frmARCreditCheckSummary_Load(object sender, EventArgs e) {     this.BackColor = System.Drawing.Color.Red; }

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    I don't think you can change GP window background color like that.

    Edit: I thought you are trying to do so for GP form, my above comment is for GP window. for VS form I am not sure, maybe we have some option.

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    I see this in the VS Programmer's Guide but I do not see where in the code to change the color.

    AutoSetDexColors

    The AutoSetDexColors property controls whether the colors used for the WinForm

    will automatically match the color scheme selected in the user preferences within

    Microsoft Dynamics GP. Set this property to True to match the Microsoft Dynamics

    GP appearance.

  • Verified answer
    Almas Mahfooz Profile Picture
    11,009 User Group Leader on at

    I can not see any property with the help of which i can change GP window back color to blue,red, green etc. I can only set backcolor = true/false, If false then it has white back ground and with true gray color. So I your form is rendering gp forms properties then may be that's the reason it's not showing color change. I tried this with one VS Tools form and getting color changed.

  • Tim Wappat Profile Picture
    5,711 on at

    You don't have the control that you get with windows forms on GP forms. You also have to use sanscript - not a pleasant journey.

    Some background reading in the reference section at the end of this post:

    www.timwappat.info/.../test-company-test-database-live-company-in-test-database-test-company-in-live-database%E2%80%A6

    I would go and rethink whatever it is you are trying to achieve, see if there is another way.

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    Since this is just a warning box about a customer being over their credit limit I will switch to a plain Windows form.

  • Tim Wappat Profile Picture
    5,711 on at

    ..Or  just stick to the exiting GP UI conventions! 

    I wonder, would it really benefit from the colour? I doubt after the first time it is seen it would, users get blind to no matter now gaudy you make it, or how many have you read this, click to confirms you have, that you put in the app!

  • Richard Wheeler Profile Picture
    75,848 Moderator on at

    I know but at least I could say I have done all that I can do. This routine does log all of these events so management knows, as best as possible, when this happens and who approved it. I have been looking into how to add electric shock to the effect or perhaps auto-deduction from their paycheck.

  • Tim Wappat Profile Picture
    5,711 on at

    I always bring up the example where I got asked to add an "Are you really certain?" to the "Do you want to apply these changes?" dialog.

    Joking suggest I code in an extra layer of "Are you really certain" to click through for each month from a start date, alternating the yes/no ok/cancel etc for each layer to keep them on their toes!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans