Array is the group or collection of similar datatypes object and it is member of the system namespace whereas ‘Arraylist’ is the group of variables or object with different datatypes and it implement the ‘IList’ interface using an array whose size is dynamically increased as required.
Continue reading “How to Convert Arraylist to Array in .net”
We can change the size of an array after creating them. The ReDim statement assigns a completely new array object to the specified array variable. You use ReDim statement to change the number of elements in an array. See Code sample:
Continue reading “Redim statement of Array in vb.net”
Windows API are the dlls that are the part of microsoft windows operation system. There are many task in the application development that are very difficult to handle in your own code for example if we have need to change background of your desktop via your application than what you do? Simple you can use User32 windows api for that.
.Net framework use plateform invocation services for it.plateform invocation services is the process by which .net framework communicate unmanaged code of api.
in this article we will discuss how to use User32 windows api for set the background of desktop or desktop wallpaper.
Continue reading “How to set desktop background in vb.net”
You can use WriteXml method of the Dataset for saving the dataset data in xml format. And you can call ReadXml method for getting dataset from the xml file. In this article we will discuss about both methods.
Continue reading “Code for Creating xml file from a Dataset in vb.net”
Following code is for detaching sql database programmatically
VB.Net Code :
Dim conn As SqlClient.SqlConnection
Dim cmd As New SqlClient.SqlCommand()
Dim ConnectionString As String = “Data Source=” & Server name & “;Initial Catalog=master;Integrated Security=True” ‘ Connection string
conn = New SqlClient.SqlConnection
conn.ConnectionString = ConnectionString
conn.Open() ‘Open connection
Dim sqlDetech As String = “sp_detach_db ‘”& database name &”‘, ‘true'” ‘ Sql query for detaching database
cmd.CommandText = sqlDetech
cmd.Connection = conn
cmd.ExecuteNonQuery() ‘execute query
In this article we will discuss about notify icon control in vb.net, basically notify control is used for showing process that run in the background and don’t have their own interface. In Windows Services, we can use these notify icon’s to associate various functionality. Continue reading “How to use Notify icon in VB.NET”