N
N
nait1233212016-05-07 14:41:43
C++ / C#
nait123321, 2016-05-07 14:41:43

How to pass variable to another form in visual studio C++/CLR?

Hello, I am writing this question here, since Google did not help (there are examples / videos and answers for C # for VS everywhere). How to pass the value of a variable from 1 form to another? At first I tried to connect the library 2 forms to 1, but then there was an error with the transition between forms (something related to classes). I need the following principle of operation: If the user logs in as an admin (enters the correct data), then the boolean variable takes the value - true, and goes to another form. But if the user logs in not as an admin, then the variable will take the value - false, and go to another form, in which the admin functions will be hidden
pfHPL1RBNp0.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rou1997, 2016-05-07
@Rou1997

"because Google didn't help"
Yes? Or maybe you just need to have a head? She is also a link in the chain. Google doesn't have to do the work of your head.
google.ru/search?q=c%2B%2B%2Fcli+pass+value+to+form
"there are examples/videos and answers in C# for VS everywhere"
Well, then they would do it in C# first. They would understand the general principle, and then they would implement it themselves in C ++ / CLI, on IronPython, on IronBrainf*ck.

Z
Zelimkhan Beltoev, 2016-05-07
@Beltoev

Have you thought about creating a static class, for example, Settings, in which there will be a boolean field IsAdmin, which is set to true / false at the entrance, and will be available at any time in any other form?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question