-
It refers to the path where the current program is located, if the program is not compiled when it is executed, that is, when the program is run in the environment of VB, its current path is in the installation directory of VB, and yours" "There is no need to add a space before it.
Assuming that your program has been compiled and is in your program directory, you can use the following **::
if right$(,1) = "\" thendf = & ""
elsedf = & "\"
end if
Regardless of whether your program is in the root directory or other directories, you can specify the path correctly, because only when the root directory is used, the last digit is " " " other directories are not.
If your fixed position is on the C drive, you can directly use "C:".
-
df = & "/" & " "<=Here is data
There's a date text placed under the C drive.。 = You put the date
-
You can solve this problem like this:
First of all, you need to know that it refers to the path of the application, that is, the storage path of the VB program you wrote, not the storage path, so it will report an error.
The way to change this is to set df to the absolute path of the file, i.e. "c:"."Such.
-
df = & "/" & " "
Note two points: 1, the slash should be
2, if ="c:\"Then you add one"\"Isn't it redundant?
-
I can't understand what kind of bird text.
-
bp) is a file used to bring all the files together, i.e. a project file represents a project. The building blocks of the project mainly include the basic module (.).bas) and form modules (.).
frm)。The form file is the form you see when you run the program, and the saved space properties are divided into two parts. Some of the information that can be represented by strings, such as strings, numbers, etc., is stored in a file with the extension frm; The other part cannot be represented as a string, e.g. **, which is stored in a binary form file with the same name as frm, but with a frx extension.
Other common files in VB are:
BAS Basic Module.
CLS class module.
DDF Packaging and Wizard CAB Information Files.
DEP packaging and wizard dependencies.
Designer file for DSR activities.
A binary of the designer for the DSX activity.
dws Deployment Wizard script file.
log loading the wrong log file.
OCA control type library cache file.
res resource file.
VBG Visual Basic group project files. VBL Control License File.
VBR registers files remotely and automatically.
VBW Visual Basic project workspace file. ActiveX widget in DLL run.
An executable or ActiveX part. OCX ActiveX controls.
-
Teacher Zhang, you are careless!
It should be:1" & "2"As a result:"12"
I'll say a few words:
The so-called data in the program basically consists of two categories: numbers and words (VB terminology is called characters), such as:
dim a as integer
dim s as string
, variable A is declared as a numeric (integer) type, and s is declared as a character (string) type, so that the assignment of these two variables in the program has data type requirements: a can only store integers, and s can only store characters, for example:
a = 5s = "5"
or s ="China"
To assign a string to a variable, the string must be in double quotation marks.
With regard to the operators: & and +, you can join two strings end to end to become a string, for example:
s = "China" & "The people", so that in the variable is actually stored"Chinese people"
i.e. this sentence is the same as s ="Chinese people"with the same effect. Another example:
dim s1 as string
dim s2 as string
s = s1 & s2 will give the same result.
In the above examples, the & symbol is replaced with the + symbol, and the effect is the same.
Well, one might want to ask why print 1 & 2
As a result, what do you see as 12?
Reason, vb has the function of automatically converting types, when it sees &, it will automatically convert the integer type before and after to the character type. So this kind of tolerance of VB is not a good thing.
x 100) is calculated with a floating point that is of the double type, and the result is also a floating point, so that when the structure has a floating point for int conversion, the decimal rounding calculation method will be carried out, so that the result is different. >>>More
Create a new project with two forms: form1, form2
There are two controls on form1: command button command1 and timer1There are two controls on form2: label label1 and timer1 click the command button when the program is running, the command button disappears, wait for 1 second and then pop up form 2 display: >>>More
The decimal part of the date variable with a value of less than 1 corresponds to the time of day from 0:00:00 to 24:00:00 >>>More
Single-threaded assembly and element models.
All parts created by Visual Basic use the unit model, regardless of whether the part is single-threaded or multi-threaded. A single-threaded assembly has only one cell, which contains all the objects provided by the assembly. >>>More
s = "I want it.
The same goes for solar days. >>>More