Learning VB. NET is not as difficult as you think. Teacher Mi said that all languages are figured out. If you master one of them, you will find similar things when learning other languages. Learning VB. NET is like this, because it is very similar to C.
We learned VB6 in th
Vb. NET Create irregular form Montaque (original)
In general, the form of an application is a regular, rectangular form. Sometimes for a particular purpose, we want to change the shape of the application form, such as being a MP3 player, a small clock, and so on, which requires "customizing" our Application. In addition, specially shaped forms can sometimes attract the attention of users, making them pay s
Generating thumbnails during website development is a very common and practical function. previously, ASP can only be implemented using COM components. net can be easily implemented using the powerful class libraries of the framework. I posted the complete code (with detailed comments) in the following post. I have read some articles on the Internet and the content related to the Asp.net SDK. I have sorted out C # and
Vb. NET Audio playback Montaque (original)
After the VB6 upgrade to. NET, some people are not clear about the sound processing, such as when the program is wrong, customizing a sound playback, or the program's background music, including game music, and so on. Here are some simple and achievable solutions in vb.net:
the upper bound of the BARR subscript, which can have 6 elements
Dim Larr () as Long = New Long (3) {100, 200, 300, 400}
Dim CARR () as String = New String () {"A", "B", "C"}
Dim Darr ( -1) as Double
End Class
More features about arrays are described in detail in the later introduction of arrays.
Compound assignment
Now vb.net is starting to support compound assignment statements. Unlike a fully expanded expression, a variable on the left side of a compound assignment statement is
Concept approached vb.net (v) VB. NET Core concept
Vb. NET Chinese tutorials in the wording of some repetition too much even some long-winded, so that people read uninteresting, but, this vb.net Chinese tutorial is indeed very difficult to even be said to be a classic vb.net article. To be honest, apart from reading mo
Const snd_filename as Integer = h20000
Const Snd_alias as Integer = h10000
Const Snd_sync as Integer = h0
There are many more constants, not one list, the following is the example of playing a WAV file
Dim mstrfilename as String = "C:\eagle2.wav"
PlaySound (mstrfilename, 0, Snd_filename)
Note that the above playback is not synchronized, that is, it will not be finished playing. If you write the above code in a Button.Click event handler, it interrupts the first playback and starts ov
an array of 10 integers, indexed from
0 to 9.
Based on the changes above, Option Base 0|1 has been removed from the Visual Basic.NET
deleted.
When your code is upgraded to Visual Basic.NET, an array with a lower bound of 0 will not
Change. If the lower bound of the array is not 0, the array is upgraded to a compatible class, as follows:
Dim A (1 to ten) as Integer
Change to:
Dim A as Object = New VB6. Array (GetType (short), 1,10)
Compatible arr
Vb. NET converts the decimal system to a 16-way
' Use: Converts decimal to hexadecimal' Input: Dec (decimal number)' Input data type: Long' Output: Dec_to_hex (hexadecimal number)' Output data type: String"The maximum number entered is 2147483647 and the maximum output is 7FFFFFFF.Public Function Dec_to_hex (DEC as Long) as StringDim A as StringDec_to_hex = ""Do While Dec > 0A = CSTR (Dec Mod 16)Select Case
With Microsoft. the launch of the NET development platform has undoubtedly brought great news to countless VB developers, including no inheritance, ugly error capturing, no object pool, and no underlying development, it is followed by a complete OO-oriented feature, a wide range of class libraries that support XML. When someone prefers C #, C ++ developers are dismissive about it, but what is more important
1. How to drag a form without borders?
This function can be implemented in VB6 only by using API functions. In VB. NET, You can implement it with your own functions. First, set the formborderstyle attribute of the form to none to remove the border of the form, and then add a button on the form. The code in the form is as follows:Code:
Public class form1
Inheri
The component-based design has many advantages:ProgramCode reuse, support for group development, and independence. Com is a component-based development model of Microsoft. net uses a brand new model to replace COM, which has nothing to do with programming languages.
In. Net, a component is called a component .. In the. NET program, the "category library" project
I. Try ......... Catch ......... Finally ......... End try catch error: place a possibly erroneous statement behind try. If an error occurs, execute the catch statement. There can be multiple catch statements. The first catch cannot catch errors, will be captured by the next catch statement. After all processing is completed, run the finally statement. In a try ......... You can use either catch or finally in the end try process,
2. The three keywords protected, private, and public encapsulation
Vb. NET form Operation technique Two
2003-03-18 Liu Hongjun Liu Lekun Yesky
How do I drag a form without a border?
This function can be implemented in VB6 by means of API functions. In vb.net, it can be realized by its own function. First set the form's FormBorderStyle property to none to remove the border from the form, and then add a button to the form. Th
Abstract: In VB6, Treeview is often used to represent hierarchical data.
Code , Requires a large number of manual encoding; in VB. net, due to the enhancement of the Data Binding function and the enhancement of the language features, it is easy to bind the Treeview and hierarchical data. This article will first create a dbtreeview inherited from the Treeview, th
now, VB. NET improves these features,. Net The System.Threading namespace contained in the SDK is designed to implement multi-threaded functionality and is fairly simple: you have the properties and methods to implement free threading simply by taking advantage of the thread class in the System.Threading name space.
An example of creating a free thread parsing
This method extracts Youku's album ID, and then cyclically collects webpage code by ID to extract the title tag and VID. There is no technical content. =... =The HttpWebRequest and HttpWebResponse classes in. NET are applied in the collection. Regular expressions are used for code analysis.This code is not very efficient. The resolution time for a webpage is between 0.5 and ~ Within 2 seconds, not suitable for massive collection. It may be faster to
Next
V. Process and Function
Public Sub function name (ByVal/ByRef parameter name As Integer) as type
End Sub
Public Function Name (ByVal/ByRef parameter name As Integer) as type
'Vb6. 0: function writing with return values
Dim str1 As String = "111"
'Result = str1
'You can also use the key value Return in vb.net to Return.
Dim str2 As String = "222"
Return str2
End Function
6. modules in vb.net are generally used only to define global var
When starting external applications, we usually use Win32 application programming interfaces or vB Shell functions. Now, there is a system. Diagnostics. Process class in the. NET Framework. You will find it much easier to perform this operation through this class.
In traditional vbprograms, you can use shell functions to start an application. When you transfer a data file name,
Since the age of VB6, the method of writing and registering COM + components was not very complex, but it entered. net World, the process of writing has become more complicated.
Follow these steps:
Assume that you want to write a data access component of the data table (tdmomenu) in the database ddmo. You need to generate a package named [kdmo1000] in the component service, which contains a component pd
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.