To use List (of T), we need to know how to deploy the. NET Framework. This will also be the content of this article. I have compiled three examples -- using ForEach, FindAll, and Sort -- to illustrate how the same list class works.The first step is to create a shared list. You can obtain data in multiple ways, but the simplest way is to add data. In the text, we will write code to classify the set in the example
if
End sub
Private sub btnexit_click (byval sender as system. Object, byval e as system. eventargs) handles button1.click
'Close the form
Me. Close ()
End sub
End Class
Ii. Mutual calls between multiple forms
In VB6, multiple forms can be easily called to each other. For example, in form1, you only need to use a "form2.show" statement to display the form form2. However, in VB.
project> right-click and choose Properties> Generate tab> Register com InterOP, in this way, the COM component is automatically registered when the project is created. After the project is generated, you can call COM. Here, we use VB as an example to create an EXE project and add references to comlib. TLB. Some files are in the bin directory. Then use the following code to call
Option explicit pri
Henry's VB. NET journey (7)-vulnerable base class
Han Rui
"Since it is fragile, it means it is as vulnerable as an eggshell. This problem is actually very understandable. The program is always designed and written by people, so it is normal that some problems are not considered at the beginning of work. Therefore, after a period of work, you may find that the base class needs to be changed. If I have
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, i
Comparison | key word | function VB. NET vs. VB6: deactivated keywords and functions
The development of history is a process of continuous sublation, VB. NET is the same. It does not hesitate to delete a number of keywords and functions, many of which are many VB6 programmers will never miss. For
Data is rich in information, and data is a resource.Different languages, due to their own grammatical characteristics, There are some small differences in the connection operation of SQL database. One thing, though , is that the SQL statements are generally the same for SQL Database operations statements . This period is being vb. NET vb.net sql database of the increase, deletion, change, check
table into a table in fact, there is a transitive dependency, separate is right. Design Database: The basic thing is to pay attention to the data type. This still needs to look at the code, my first version of the system d all the date and time. are all used for datetime data types. Be sure to see if there is a problem in the vb.net. In conclusion, we must learn to apply our knowledge, I learn the database is too shallow, very much or based on the original database. But I believe that when we
planned quantity and unfinished quantity of each product model. Then, read the sortedlist data and write it to the statistical table.
Note that the format of each production report must be standardized and unified, because the program reads data at a fixed cell location.
Sortedlist class
In addition to the basic knowledge of using VB. NET to call excel, this exam
In the C/S stage, we learned software engineering, UML, and VB. net, the design model, three-tier architecture, and a simple understanding of the C # language basics. With the accumulation of these theories, we began to use the data room charging system for practice, only by practicing this knowledge can you become a real person, because you can understand it deeply only when you are a real person.
The ind
VB. Date-time conversion in net
Just learn vb.net soon, in doing a few small examples when found often to the date time and the conversion between the string, now sorted as follows, if there is not the right place please point out.
1. Conversion between character type and date type
The conversion of date type to character type is the simplest and can be directly converted. Dim dt as Date = NowDebug.WriteLi
,barr.length=36
Array.clear (Iarr, 0, Iarr.length-1)
For I as Int32 = Iarr.getupperbound (0) to 0 Step-1 ' iarr.getupperbound (0) =5
' The elements of the array are
Iarr.setvalue (i, i)
Next
Array.Sort (Iarr) ' array elements sorted to 0,1,2,3,4,5
For i as Int32 = 0 to Iarr.getupperbound (0)
' Output array element
Next
ArrayList objects
The capacity of the Ayyar is fixed, VB. NET
Create a control array in VB. Net
First, create a Button control array:
1. Create a project of the "Windows application" type, add a class named ButtonArray, and make the class inherit the System. Collection. CollectionBase class. System. collections. the CollectionBase class is. NET Framework Class Library provides abstract base classes for set operations. By in
Next, I will describe the UML diagram in the previous article. Today, let's take a look at the three-tier architecture I learned in VB. NET
1. UML diagram 2, three-layer structure 3, sqlhelper 4, Configuration File 5, interface 6, design mode
In fact, the learning of the three-tier structure takes a long time. The reason is not the content of my three-tier architecture, but that I will not function. Famil
Division operators in VB. NET and division operators in C,
The Division operators in VB. NET include:/(floating point Division) and \ (integer division)
There is only one division operator in C #:/(Division)
Division operators andDivision operator in C #There are many differences, so pay attention to the difference dur
PreviousArticleI introduced the use of reports that are not restricted by the database in VB, and also agreed to release the. NET version in the future,However, because I have been too busy recently, I have always been jumping tickets.After I started to write the original version, I found that there are similarCode,So I just made a simple modification on the basis of it.Run the following code in vs2003 and
expert, it is difficult to figure out the rules for member function name modification, so you have to rely on the compiler itself to figure out the decorated name.6. Edit the Mydll1.def file as follows:Libraryexports Add = [email protected]@[email protected] Shuchu = [email protected] @YGXXZ 7. Compile the project once again.This completes a Mydll1.DLL file that can be called by the vb.net, and copies the file into the \Bin\Debug folder under the VB.net project you want to invoke.8.
Recently read the code or write code, often the VB and C # Basic grammar mixed, for the convenience of viewing, a comparison of its similarities and differences:Initialization of variablesVB.net automatically initializes all the variables to 0 or nothing. C # You are not allowed to use the variables until you initialize the variables.Select parameters (Optional parameters)C # does not provide a function selection parameter, but can still use overloade
. Such as:2. Import the Object library (in VB, for example) in your code.1) Add the Imports statement at the front of the code:Imports ProductstructuretypelibImports MecmodImports PARTITFImports Hybridshapetypelib2) Defining CATIA ObjectsOn Error Resume NextDim CATIA as INFITF. ApplicationCATIA = GetObject (, "CATIA. Application ")If Err.Number CATIA = CreateObject ("CATIA. Application ")Catia. Visible = Tr
Vb. The Division operators in net have two:/(floating-point division), \ (integer division)The division operator in C # has only one:/(Division)Vb. The division operator in net differs greatly from the division operator in C # , and is differentiated when used.Introduction to the division operator in vb.net (from MSDN)
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.