PB declare global variables

Foreword

  In software development, we will use global variables, that in PB, how to use global variables?

demand

  In the login screen, you need to enter a user name, after the interface, you need to use the username login screen input.

achieve

  1. declare global variables

  Double-click the login screen, declare global variables.
Here Insert Picture Description

  2. Assignment to global variables

  Write code at the login screen, to a global variable.

GUserName = xm

  3. The use of global variables

  To use global variables in the future where it can be used directly.

// 命名窗体title
this.title = "考生 " + GUserName + " 实践考试科目"

effect

  Here Insert Picture Description

He published 194 original articles · won praise 118 · views 60000 +

Guess you like

Origin blog.csdn.net/m0_37508531/article/details/94353847
Recommended