LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem occurs when log in "User"&"Password" Panel!

Pls see the attached CVI project. I designed a "User" and "password" Panel, which is to be loaded when operating the Number Control in the main panel.I want use it to limit on the project run only under the permission. That means i give the "user" and "Password". Now i want design the "user" to be "cvi" and the approate "password" to be "cvi2003".Pls see the CVI programm. But when i run the project, it tells me a error about string format. I don't know how to modify it. What problem lies in my programm? Another question is that i just want to run the "User"&"Password" Panel just one time when begin to run programm,but the way that i use now seems not to be a good idea.Do u have any other better idea for it??The thi
rd question is that i don't hope that the number control cannot be operated when displaying the "User"&"Password" Panel .Now when you run my programm , you can still operate the number control of the main panel. How to solve it? Thanks a lot!!
0 Kudos
Message 1 of 2
(3,035 Views)
Well, what a bit list of questions!

Let's start from string processing. The error you are getting in GetCtrlVal is because you have put &username: since "username" is an array of chars, its name is the actual address of the array, and is not necessary to add the & operator.

As per the general behaviour of the program, I would prefer to add a "Login" button that displays the user input panel and, if all checks are correct, enables controls on the main panel. I have modified your project in this way and attach it back. By the way, you are loading the user input panel as a child of the main panel, but it is not possible to display a child panel as a modal window, and that is why the controls on the main panel are stil operable when the login p
anes is shown.

Last item, it is not necessary to load all panels at startup. I suggest you to use the MessagePopup function for warnings and to load rarely used panel only when you need them and discard them immediately after.

Hope this helps
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(3,035 Views)