Describe The Process of Compiling and Running A Visual Basic Application
Describe The Process of Compiling and Running A Visual Basic Application
(i) Value type (implicit data types, Structure and Enumeration) (ii) Reference Type (objects,delegates) Value types are passed to methods by passing an exact copy while Reference types are passed to methods by passing only their reference (handle), Implicit data types are defined in the language core by the language vendor, while explicit data types are types that are made by using or composing implicit data types. As seen in the first unit, implicit data types in .net compliant languages are mapped to types in Common Type System (CTS) and CLS(Common Language Specification). Hence, each implicit data type in VB.Net has its corresponding .Net type. The implicit data types in VB.Net are:
Implicit data types are represented in language using keywords; so each of above is a keyword in VB.Net (keyword are the words defined by the language and can not be used as identifiers). It is worthnoting that string is also an implicit data type in VB.Net, so String is a keyword in VB.Net. Last point about implicit data types is that they are value types and thus stored at the stack, while user defined types or referenced types are stored at heap. Stack is a data structure that store items in last in first out (LIFO) fashion. It is an area of memory supported by the processor and its size is determined at the compile time. Heap is the total memory available at run time. Reference types are allocated at heap dynamically (during the execution of program). Garbage collector searches for non-referenced data in heap during the execution of program and returns that space to Operating System. Variables During the execution of program, data is temporarily stored in memory. A variable is the name given to a memory location holding particular type of data. So, each variable has associated with it a data type and value. In VB.Net, a variable is declared as: Dim<variable> as <data type> Example: Dim I As Integer The above line will reserve an area of 4 bytes in memory to store integer type values, which will be referred in the rest of program by identifier i. You can initialize the variable as you declare it (on the fly) and can also declare/initialize multiple variables of same type in a single statement. Examples: Dim isReady As Boolean = True Dim percentage = 87.88, average = 42.5 As Single
3. With the help of suitable example, describe the development of single document and multi-document interface.
Ans. With the example of the two versions of the Financial Calculations application, we can describe the development of single document and multi-document interface.These applications let the user calculate an investment or depreciation using forms. Also, each application includes a third form that provides a way for the user to access the other forms. Single Document Interface: In an SDI application, each form runs in its own application window, and this window is usually shown in the Windows taskbar. To switch between the open forms, the taskbar buttons are clicked. In this interface, each form can have its own menus and tools. A main form called startup form provides access to other forms.eg.Fig. SDI
Multi-Document Interface: In an MDI application, a container form called a parent form contains one or more child forms. Then, the menus and toolbars on the parent form contains the commands thatmake opening and viewing of forms possible. Its Window menu is used to switch between the open forms. When the parent form is closed, all of its child forms are closed.
BC0053 VB.NET & XML Gohil Devendrasinh Part: Data Source = c:\AddressBook.mdb The first part specifies which provider technology we want to use to do the connecting (JET). The second part, typed after a semi-colon, points to where the database is. In the above code, the database is on the C drive, in the root folder. The name of the Access file we want to connect to is called AddressBook.mdb. (Note that Data Source is two words, and not one.) But your coding window should now look like this: Private Sub btnLoad_Click(ByVal sender as Object,_ By Val e as System.EventArgs)_ Handles btnLoad.Click Dim con as new OleDb.OleDbConnection Con.ConnetionString = Provider = Microsoft.Jet.Oledb.4.0; DataSource = C:\AddressBook.mdb This assumes that you have copied the AddressBook database over to the root folder of your C Drive. If youve copied it to another folder, change the Data Source part to match. For example, if you copied it to a folder called databases youd put this: Data Source = C:\databases\AddressBook.mdb In our code, though, ConnectionString is a property of the con variable. The con variable holds our Connection Object. Were passing the Connection String the name of a data provider, and a path to the database.