WinForm (VB. NET) obtains the username of the current logon, winformvb.net
Run Windows Task Manager and view the Users tab. Now all the Users logging on to the computer can be seen. To name Insus. NET, use the WinForm program of VB. NET to
sooner or later !" Include me!
Before learning VB. NET, I felt as hard as most of my classmates. It was a headache to hear the voice of my teacher. But then I learned more and more excited. Because I did not find how difficult it was when I was learning VB.net, but I felt like I had known each other, so I began to change my mindset. I encourage myself to find traces of old knowledge from these new knowled
just need to drag the control to the interface to complete the control we want.This control is equivalent to combining a label and a text box into a control that contains both properties and methods. Let's add it to the interface and modify our code a little bit: The public Sub isemptytext (ByVal form as form) ' iterates through all the user controls in the form for every txt as UserControl in form. Controls If txt. TextBox1.Text = "Then MsgBox" (txt. L
use parameters or with 0 parameters; but sub process is a set of code organized by a user-defined format, with no return value, function The process must have a return value. attributes are used to describe the state and characteristics of an object, and the values of data members in a class are generally used to represent the state and characteristics of an object, to flexibly use the values of data members and to secure data, to assoc
selected function must be the same as the set data type of the parameter, otherwise it will appear: Error prompt inside reportwe define the corresponding endDateAfter you have designed the report, close the Design Report window, select the report source by right-clicking the ReportViewer1 control's small triangle, and after selecting, we can see the database connection control in the lower corner of the form.We assign values to individual text boxes
have been using SqlHelper, but until now a little understanding of the magic of the data connection class really embodies the code reuse.Update for SQL statements insert Find DeleteInclude parametric, parameterless update insert find delete includesThe following is a detailed explanation of the code, now look at the understanding, wait until later to write more convenient."'Imports System.DataImports System.Data.SqlClientImports System.Configuration ' must add a reference to the manager”’"' The
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.
When developers want to place their classes in the specified. Net namespace, they need to use namespace.
Namespace
By default, every VB. NET applicationProgramIn a default namespace, this namespace is often referenced as an absolute namespace location of the application. Visual Studio. Net sets it to the top-level
1. UML diagram 2, three-tier architecture 3, sqlhelper 4, Configuration File 5, interface 6, design mode
Next I wrote a few articles, but the last design pattern was not mentioned. This article has been put on hold for a long time because there are some things that have been busy, so I am really sorry to send this article so late. Next, let's take a look at the last article in the series of. Net
In fact, this article has been put on hold for a long
There are three data types in VB. NET: Value Type, reference type, and nullable type. This article starts with the condition judgment and discusses the differences between the three. Value Type
Classes inherited from system. valuetype are generally called value types, including dates and numbers. The default value of a date object is "0001-01-01 00:00:00", and that of a number object is "0 ". There are two
;
V_pad2 (Smcount): =sm. Pad2;
V_pad3 (Smcount): =sm. Pad3;
V_pad4 (Smcount): =sm. PAD4;
V_PAD5 (Smcount): =sm. PAD5;
If Smcount=1 Then
Select COUNT (*)
Into V_count (Smcount)
From Sm_send_sm_list
where Rcompletehourbegin
Rcompletehourend>=v_nowbyminute and (Rcompletetimebegin is null or
Rcompletetimebeginand (Rcompletetimeend is null or rcompletetimeend>=sysdate-1)
and rownumEnd If;
smcount:= Smcount + 1;
End Loop;
End
End
/
Two. Use VB to invoke t
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
Data center billing system for VB. NET --- Report
A report is a report form. Simply put, a report dynamically displays data in tables, charts, and other formats. It can be expressed: "Report = diverse formats + Dynamic Data ". Before computers do, people use paper and pen to record data.
For example, the bean curd account that people often say is to record the bean curd that they sell in a notebook every da
file. Close () End Try End Sub This example is in D Drive to find a readme.txt document. Assuming we do not have this document set up in the D Drive, we run a Catch statement that pops up the source and cause of the error: watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdtaxmduzotm1mg==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">Let's say we're D disk to create a Readm E.txt documentation. Then there will be
Programming with previous bindings
Visual Basic 6.0 and Visual Basic.NET both support deferred binding of objects.
The method defines a variable to be an object data type beforehand and then sets it to a class at run time. However, during the upgrade process, you may have an error accessing the default properties of the deferred bound object. For example, suppose the project contains a label object named Label1 in the Form1,form1, and the following Visual Basic 6.0 code will label the caption
cause an error in the program code, but we can also use the throwing exception mechanism to capture abnormal values in a process or function, you can think of this method as a function that returns a special value and uses upper-layer functions to capture exceptions in the program. VB. NET uses the throw keyword to throw an exception in the program, so that the upper-level calling function that calls this
Hard disk
Vb. Several methods of obtaining hard disk information under net
1, using API function GetDiskFreeSpaceEx to obtain disk space
Private Declare Function GetDiskFreeSpaceEx Lib "kernel32" Alias "Getdiskfreespaceexa" _
(ByVal lpdirectoryname as String, ByRef Lpfreebytesavailabletocaller as Long, _
ByRef lptotalnumberofbytes As Long, ByRef lptotalnumberoffreebytes as long) as long
Vb. Implement IEnumerator interface in net
In object-oriented design, it is often used to have a parent-child relationship, such as in my current project, there are order objects, under an order contains more than one product, then I want to use iterator mode to encapsulate the product under the order, the DOT NET the IEnumerator interface is used to implement it
'We can use the declare statement to call the process in the external DLL. However, VB. NET provides us with another more advanced feature-dllimport.
For example:
Imports system. runtime. interopservices
End Function
End Function
Sub test () sub test ()
Dim hwnd as integer = findwindow (nothing, "untitled-nodepad ")
If hwnd
End sub
'In this way, external dll can be called without any code impleme
given application environment, create a database and its Application System on the database management system to effectively store data and meet various user needs. In the past and times, everyone has their own ideas about how to design a database. Therefore, there is no difference between database design and good or bad. Proper database design is the best.
Go through the test-database system principle, read the video from instructor Yan jianling, and have a little understanding of the database
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.