-
lz you asked the stupidest question :
option explicit
public pri as single
private sub command1_click()pri =
text1 = 1
csng(text1) *pri
end sub
-
You're typical of messing around.
Yes string, 1 is a number, and the default is an integer.
What does an integer pass to a string? It's the address.
If you have the intention to do the program, please write it strictly according to the grammar, and if you want to play us, just tell me to the fool.
-
...Is VB stupid or are you stupid yourself?
-
I don't know if you despise VB or despise your IQ!
-
dim r as long
public sub timer1_timer()r = r + 1
rend sub
public sub a() is still a sub-process, not universal, you define it this way, r is still a local variable that acts in the a process.
-
Create a new module, declare it as public in the module, and define it at the beginning of the module.
The public global variable in the module can be used throughout the project.
-
is to define global variables, which are defined on top of all events. And in the event you want to use, try redim a(n) to define global variables, both public and private.
-
In the generic section dim a() as integer
In this way, it can be used in this project. Do you understand?
public appears to be in a standard module. Do you understand?
-
Don't put it in the event, put it on top of all the **, the general declaration area.
-
If these 2 fields are not updated in real time, that's perfectly fine. Real-time updates may have a process of real-time changes in their status. It needs to be obtained at different times. If you don't need it, you can get it all at once.
-
There is no problem with the use of variables. If the one you send is the ** you use, then you made an error when assigning values to user and mi.
msgbox "1111", ,"11"
user mi
unload frmcnew
There are no user and mi assignments here, so they are always empty and should be user="1111"
mi="11"
msgbox user & mi
user mi
unload frmcnew
Then it is possible to verify that 1111 and 11 are entered at text1, text2 in frmdenl.
-
You add a module, and you need to write a public xx as long and it will be there until you quit the program.
The form shouldn't be called like this, it's just that vb does something bad to make you feel like you can call it this way, in fact, the normal way to write it should be:
dim tform as new form1 is implemented internally, so it's new every time, so your variable doesn't exist.
Love symbol vb6
-
I feel so troublesome to see other people's.,Draw a caption in form1 to store data.,form2 takes the value of the control in form1.,It should be??
-
The call is preceded by the module name
-
Use public to define variables in any module, for example, public a as integer, you can write a directly, if there is a variable with the same name in other modules, you must declare the module before the variable, for example:
-
In the declaration section of the standard module, the declaration using the keyword public or global can be used by any form in the project, any process or function in any module, and the same for arrays and variables.
For example: global variable declaration: public s as integer
Global array declaration: global s(10) as integer
Here are the definitions for the three different scoped variables:
1) Local Variables – Variables defined within a process (event process or generic process) that act on the process in which it is located. Used to store intermediate results or as a temporary variable. You can use the "process name."
Variable name" refers to variables with the same name in different processes. Defined by dim, static.
2) Module (form and standard) variables – defined in the module declaration section and can be used throughout the process of the module, defined with private, dim.
3) Global variables - In the declaration part of the standard module, the keyword public or global can be used by any form in the project, any process or function in any module.
-
You need to create a new module, and then define public a as long in the module, so that a can be called everywhere in the program.
-
1.Global variables: Create a row at the very beginning of the window and type pubic a as integer
Line break a = 1
2.Global Array Variables: Create a row at the very beginning of the ** window and enter pubic a(10) as integer
Assign a value to the array:
for i = 0 to 10
a(i) = 1
next
-
If it is a form-level global variable, you can write it at the top of the form. It's the same as a normal statement, e.g. dim a as integer
If it's an application-level global variable, you need to create a module and define it as public a as integer in the module
Added: The global variable array is the same as the declaration position of the global variable above, and the syntax is as follows: dim a(8) as string, public a(8) as string
-
Declare at the top of the form.
private formvar as variant'At this time, the list in the upper left corner of the window shows "General".
This window is available.
Build modules. Write before a function or procedure.
Public Genvar as Variant or Global Genvar as Variant or Dim Genvar as Variant
The entire project can be called.
-
Add a module.
Declaring variables in a module.
public abc as long
Then you can assign a value to it at any segment at startup.
-
You can add a module that declares variables in the module.
Such as public a as long
public represents a public variable.
Its main functions are:
2.From a space odyssey to a glimpse of a neighbor; >>>More
Although Sasuke is indeed very handsome, but I think our family Shinichi is more handsome than Sasuke, because Shinichi is the most handsome in my heart, if LZ thinks Sasuke is the most handsome, then he is the most handsome to you, you don't need to ask us, everyone thinks the most handsome person is different. >>>More
Every human being is a world. We will see a lot of different worlds, and we will find people from different worlds. We also pass through the world of many people, sometimes we don't even want to leave, and sometimes we can't. >>>More
dim i, j as boolean
i = false >>>More
Hello, the myths and legends about the moon include the Jade Rabbit Pounding Medicine, Wu Gang Fa Gui, Chang'e Running to the Moon, Tengu Eclipse of the Moon, Moon Goddess, etc. >>>More