LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange behavior of Multi column List box Background Color based on User logged in

Solved!
Go to solution

I've come across a strange issue which I'm wondering if anyone else has seen before.  I have a built application which reads data from a database, and displays a list of jobs to the shop floor.  The jobs have a due date, so it is a simple matter to determine which are late.  I display the list of jobs in a multicolumn listbox, and change the background color of any overdue dates to pink from default. I built the application and deployed it to a target laptop PC on the shop floor. The program works perfectly and has run for weeks without issue (i.e. the correct cells are colored and the rest reset to the default) when the PC is logged in as me.  

 

However, when windows does an update, the PC is automatically logged out, and I then have to login again.  OK, you say, log in as a generic login that anyone can have access to.  However, here is my issue:

 

The program runs perfectly when logged in as a different user EXCEPT the background color for the overdue dates are ALL colored pink - no selectivity.  I've tried with two different users, one with admin privileges, but so far the only login which works is mine.

 

Any thoughts before I throw the PC out?

0 Kudos
Message 1 of 14
(2,050 Views)

Do all users use the same windows color theme?

0 Kudos
Message 2 of 14
(1,973 Views)

Thanks for replying.

 

All users run exactly the same program (I locate my exe files at C:\Apps\Labview and call from desktop shortcuts), the only difference is the Windows Login (i.e. User).  

 

I realize this is an odd post, but I was wondering if anyone had any experience of seeing this type of behavior and can attribute it to something like a bad sector on a disc (or something!)

 

 

0 Kudos
Message 3 of 14
(1,964 Views)

@MarkTTHSAS wrote:

The program runs perfectly when logged in as a different user EXCEPT the background color for the overdue dates are ALL colored pink - no selectivity.


Just trying to understand... Did you possibly mean to say that the background color for ALL dates are pink, not just the overdue ones?

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 4 of 14
(1,954 Views)

Correct. Hopefully the image shows up.  The promise date shows a pink background when overdue (Today is 19-Aug) when working correctly as shown below:

MarkTTHSAS_0-1597846145533.png

 

When logged in as a different user, all the promise date fields are pink...

 

0 Kudos
Message 5 of 14
(1,943 Views)

@MarkTTHSAS wrote:

 

All users run exactly the same program (I locate my exe files at C:\Apps\Labview and call from desktop shortcuts), the only difference is the Windows Login (i.e. User).  

 


I guess I wasn't clear. Each user login can have a different windows theme (settings...personalization). This has nothing to do with the LabVIEW and only depends on the user profile.

 

If a program has certain colors defined from the six "system colors" in the LabVIEW palette, they will change as a function of user if they use a different theme.  Can you make sure that the colors you are using for the cells are NOT system colors?

 

syscol.png

Message 6 of 14
(1,937 Views)

When logged in under an account that isn't yours, does all the data still display correctly? My first thought is some kind of permissions issue reading the DB but if everything appears correct no matter the user then it's not that.

 

Are you able to log in as a different account and run it in development environment in order to troubleshoot? Or possibly have a colleague/coworker who can run it in development environment on their machine/account?

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

0 Kudos
Message 7 of 14
(1,934 Views)
Solution
Accepted by topic author MarkTTHSAS

I'm guessing that you are reading in all of the "promise dates" from some database and then using the "system time" timestamp to check if the promise date exceeds the current system time date?  Are there maybe Windows user account settings that could affect the system time checking?  It kind of seems to me that all of the date checks are failing.  For instance, if the system time stamp is default, all of the "promise dates" will exceed the default timestamp and be colored pink.

Message 8 of 14
(1,917 Views)

@playerm1 wrote:

I'm guessing that you are reading in all of the "promise dates" from some database and then using the "system time" timestamp to check if the promise date exceeds the current system time date?  Are there maybe Windows user account settings that could affect the system time checking?  It kind of seems to me that all of the date checks are failing.  For instance, if the system time stamp is default, all of the "promise dates" will exceed the default timestamp and be colored pink.


I like that thought process!

 

You should add some code to debug.  Put a separate indicator in like an array of booleans that show the results of the decision logic as to whether the background should be pink or not.  This will help you to determine if it is a logic error or a graphic error in LabVIEW.

0 Kudos
Message 9 of 14
(1,903 Views)

Some great suggestions here!  I like the possibility that the time is being reported incorrectly based on the user - that had never previously crossed my mind! - but it is the most obvious explanation.  

 

If it looks like a duck...

0 Kudos
Message 10 of 14
(1,897 Views)