Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the VB.NET functions?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article is to share with you what the VB.NET function has. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Summary of VB.NET function:

Int (x): find a * integer not greater than the independent variable x

Fix (x): removes the fractional part of a floating point number and retains its integer part

Hex$ (x): converts a decimal number to a hexadecimal number

Oct$ (x): converts a decimal number to octal

Asc (x$): returns the ASCII character of * characters in the string x$

CHR$ (x): converts the value of x to the corresponding ASCII character

Str$ (x): converts the value of x to a string

Cint (x): rounds the fractional portion of x to an integer

Ccur (x): converts the value of x to a currency type value, retains up to 4 decimal places and is automatically rounded

CDbl (x): convert x value to double precision number

CLng (x): converts the fractional portion of x rounded to a long integer

CSng (x): convert x value to single precision number

Cvar (x): convert x values to variant type values

VarPtr (var): gets the pointer to the variable var

Sin (x): returns the sine of the argument x

Cos (x): returns the cosine of the argument x

Tan (x): returns the tangent of the argument x

Atn (x): returns the arc tangent of the argument x

Abs (x): returns the absolute value of the argument x

Sgn (x): returns the symbol of the independent variable x, that is,-1 when x is negative, 0 when x is 0, and 1 when x is positive

Sqr (x): returns the square root of the argument x, which must be greater than or equal to 0

Exp (x): returns the value with e as the base and x as the exponent, that is, to find the x power of e

Day (Now): returns the current date

WeekDay (Now): returns the current week

Month (Now): returns the current month

Year (Now): returns the current year

Hour (Now): returns the hour (0,23)

Minute (Now): returns the score (0,59)

Second (Now): returns seconds (0,59)

Rnd [(x)]: generate a single precision random number between 0 and 1

Randmize [(x)]: the function is the same as above, but better

String function

1. LTrim$ (string): remove the white space character on the left side of the string

2. Rtrim$ (string): remove the white space character on the right side of the string

3. Left$ (string, n): take n characters from the left part of the string

4. Right$ (string, n): take n characters from the right part of the string

5. Mid$ (string, pforce n): take n characters of the string starting from position p

6. Len (string): test the length of the string

7. String$ (n, string): returns a string of n characters

Space$ (n): returns n spaces

InStr (string 1, string 2): find string 2 in string 1

Ucase$ (string): converts lowercase letters to uppercase letters

Lcase$ (string): converts uppercase letters to lowercase letters

Print (string): when the form outputs a string, you can concatenate the variable with "&" and then output it.

Tab (n): move the cursor to the position where n begins on the line

Spc (n): skip n spaces

Cls: clears the display in the current window

Move upper left corner x, upper left corner y, width, height: mobile form or control

InputBox (prompt, …) Jump out of a data input window, and the return value is the input value of the window

MsgBox (msg, [type] …) A prompt window pops up

Open file name [For mode] [Access access type] [lock] AS [#] file number [Len= record length]

Thank you for reading! This is the end of this article on "what are the VB.NET functions?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report