04-22-2009 03:33 AM
Hi all,
I am facing a strange problem when using Expression Edit Control with a tab control.
When I put Expression Edit Controls on multiple tabs in a tab control, and when I run the application, the Expression Edit controls from only ONE tab are visible, the others get invisible!!! I am not doing ANYTHING with them, but they simply dont show up!
I first faced this problem while using Expr Edit controls in Visual Studio C#. NET - with Tab controls. To cross-check, I created a simple VI is LabVIEW to see if the problem is with my application / problem with Expression Edit controls in C# etc. But voila! Similar behavior in LabVIEW too!
Am I doing something wrong? OR not doing something right?? Request some one to please help ASAP!
Thanks a ton, in advance!
dasi
PS: Attached the VI here (LabVIEW 8.5) Just download it and run it, and you'll probably see what i'm talking about!
Solved! Go to Solution.
04-22-2009 10:54 AM
What version of TestStand are you using? I'm having trouble reproducing the problem.
-Doug
04-23-2009 01:30 AM
Doug,
I am using TestStand 4.0, LabVIEW 8.5 and Microsoft Visual Studio 2005 C#.NET development environments. I faced the similar problems in both C# and LabVIEW.
I have attached the screenshots of the LabVIEW VI, as I found them during edit-time and run-time. Please have a look.
Thanks a lot,
dasi
04-23-2009 01:49 PM
So far I am still unable to reproduce this problem, both with the VI you have given us and with a simple C# application. I've tried on both XP and Vista with TestStand 4.0 and newer and with classic theme mode like I see in your screen shot. Please include all details about what you are doing when you see this problem. Even small details might make a difference, like how you are inserting the ActiveX controls on the form. Also, are you seeing this reproducibly every single time or only occasionally? What OS are you using? Do you have any unusual non-default settings for the OS?
One thing you might try is making sure you have the latest supported graphics driver from your computer manufacturer (e.g. DELL, HP etc. usually have driver updates available on their websites) as well as making sure you are up to date with Windows updates and service packs.
Also, when this happens, if you move a different window over that window and then move it away does it refresh and then correctly show the control?
-Doug
04-30-2009 04:06 AM
Doug,
Here are the answers to your questions:
"..Like how you are inserting the ActiveX controls on the form. Also, are you seeing this reproducibly every single time or only occasionally?
Yes I find this problem every single time. Both in LabVIEW and C#, when using Expression Edits in multiple tabs of a tab control. The inserting mechanism is simple - I am inserting it from the tools palette. Just like any other control.
What OS are you using?Do you have any unusual non-default settings for the OS?
I am using Windows XP SP2. There aren't any specific non-default settings I can think of - the "classic" environment is because I have set my desktop to optimize the performance.
One thing you might try is making sure you have the latest supported graphics driver from your computer manufacturer (e.g.. DELL, HP etc. Usually have driver updates available on their websites) as well as making sure you are up to date with Windows updates and service packs.
that might not be the problem. This is my office desktop, set to automatically download all the latest updates, SPs etc.
Also, when this happens, if you move a different window over that window and then move it away does it refresh and then correctly show the control?
I tried the same experiment on 2 other independent machines which have the same tools - LabVIEW 8.5 and TestStand 4.0.1. The problem is still present. The expression edit in the tab which is "active" at the edit time, shows up at the run time, the expression edits in the other tabs disappear (as seen in the screenshots in my previous post)
when this happens, if you move a different window over that window and then move it away does it refresh and then correctly show the control?
Tried this, but no - nothing seems to be working.
I have another observation I made. I opened my saved VI and ran it. It works!! BUT, if I create a new VI, exactly duplicate of my first one, and run it, the second VI shows up the same problem. Now if I run my first VI again, it some times works, some times does not. If I close the VI / LabVIEW, then open the VI again - it works fine! I do not know what to make out of it - but that's my observation. I tried this too, on two machines, and could reproduce this strange behavior.. So my guess is, this might be the reason why you could not reproduce my problem - Please recreate that VI yourself, and see if you get this error.
Thanks a lot,
dasi
04-30-2009 06:14 PM
What do you mean by "optimize performance". Is there a specific Windows setting for this? If so it might be a factor.
SP3 is the latest service pack for Windows XP. Are you sure you have SP2? If so then you might not be getting all of the latest updates from Windows Update.
Also, graphics card driver updates are generally gotten from the hardware manufacturer (i.e. DELL/HP) and are not always provided via windows updates (at least the latest versions are not always provided). I'd still check the manufacturer's website just in case. Especially if all machines you are seeing this problem on have the same graphics card.
Can you click where the control should be and get a cursor when this happens?
I tried dynamically creating a VI with a tab control and a TestStand expression edit control from the TestStand palette on each tab and I am still unable to reproduce this on both Vista and Windows XP SP3, both with the VI running with a while loop and in edit mode. I haven't tried the exact versions you are using again yet, but I will do so and let you know. Perhaps I will try with SP2 of XP if you are sure that is the one you are using. Also perhaps if you can give me exact step by step details of what you are doing, even small details might make a difference, I might be able to reproduce it. It's always possible we aren't doing exactly the same thing. Also it could be a timing issue where the speed of the computer is a factor.
Anyway, still trying, but haven't reproduced this yet.
-Doug
05-01-2009 06:58 PM
Dasi,
Just want to let you know I was finally able to reproduce this problem on a clean machine. One thing that is odd is once I installed a newer version of TestStand, the problem went away. Even for the older version of TestStand (I version switched back to the older version and could no longer reproduce the problem). I suspect that the installer for the newer version of TestStand is replacing a system component that fixes the problem. I will try and narrow down what is actually being updated that's fixing the problem sometime next week.
-Doug
05-05-2009 03:04 AM
Thanks a lot Doug! That will be a really great help! I will be awaiting your reply!
Best regards
dasi
05-05-2009 04:32 PM
The problem you are seeing in LabVIEW may not be the same as the one you are seeing in .NET even though both result in the ActiveX control (expression edit control) disappearing.
1) The problem you are seeing in LabVIEW is apparently fixed with a newer version of a National Instruments shared component (ActiveX container related) that you can get by installing the LabVIEW 8.6.1 runtime engine. Once you install this runtime engine, the problem should be fixed in LabVIEW 8.5 as well since they both use the same shared component. Here's a link to the installer: http://joule.ni.com/nidu/cds/view/p/id/1244/lang/en
2) I was unable to reproduce the problem the same way in C#/.NET however there is a known issue with ActiveX controls in the .NET designer that results in disappearing controls that you might be experiencing. Basically, whenever you move an ActiveX control (not just TestStand ActiveX controls, but all ActiveX controls) into or out of a .NET Windows Form panel (and other Windows Form panels that are similar such as the layout panels) they will seem to disappear. The workaround is to close and reopen the form in the designer. I think this problem only occurs in the designer though so should not effect the program at runtime unless perhaps you programmatically move controls. Here is a link to more details: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=341366
3) If you think the problem you were seeing in .NET is not the same as the one described in 2) above then please attach an example and/or provide as much detail as you can on how to reproduce the problem.
Anyway, hope this information is helpful. Please let us know if this resolves the problems you are seeing.
-Doug
05-13-2009 08:14 AM - edited 05-13-2009 08:15 AM
doug,
Sorry for the delay in replying. I was trying to make a demo C# program to reproduce the error and it took me some time to figure out what scenario was actually leading to it.
I have attached the sample C# project with this reply. Here is what I have done - In a Windows form, inserted a combo box and a panel. Created a custom user control which has a tab control with 3 tabs and Expression Edit controls in them (like in the LabVIEW example). On selection change in the combo box, I am adding the custom user control to the Panel on the form and showing it. This is where the controls are disappearing.
I do not know if I am doing something in terms of the logic or whether it is a bug of some sort. Please look at my example and let me know
Thanks a lot, in advance!
best regards,
dasi