Posts

Showing posts from April, 2017
Q. Design a five page personal website using ASP.NET web project. The different pages should include Default.aspx, Resume.aspx, Contact.aspx, Gallery.aspx and About.aspx. Source Code: LOGIN: Imports System.Data.SqlClient Imports System.Data Public Class login1     Inherits System.Web.UI.Page     Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click         Dim strcon As String = "Data Source=MCA1-085\SQLEXPRESS;Integrated Security=True"         Dim con As New SqlConnection(strcon)         Dim com As New SqlCommand("CheckUser", con)         com.CommandType = CommandType.StoredProcedure         Dim p1 As New SqlParameter("username", txtUserName.Text)         Dim p2 As New SqlParameter("password", textPassw...
Q. Generate different reports from Address Book using Microsoft Report and Microsoft Report Viewer. Source Code: Public Class Form1     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         'TODO: This line of code loads data into the 'DataSet1.bca' table. You can move, or remove it, as needed.         Me.bcaTableAdapter.Fill(Me.DataSet1.bca)         Me.ReportViewer1.RefreshReport()     End Sub     Public Shared Sub getFilterValues(ByVal type As Integer, ByVal value As String)         Try             Select Case type                 Case 0              ...
Q. Add status bar control to any of your existing application and display date and time on the status bar. Source Code: Public Class Form1     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         Application.Exit()     End Sub     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load         MaximizeBox = False         FirstNameTextBox.Focus()     End Sub     Private Sub SubmitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitButton.Click         If FirstNameTextBox.Text = "Tommy" And MiddleNameTextBox.Text = "LS" And LastNameTextBox.Text = "Colney" Then             Form2...
Q. Create your own Notepad or text editor for the demonstration of different types of dialog controls such as SaveDialog, OpenDialog, FontDialog, ColorDialog, FolderBrowserDialog and PrintDialog where all dialogs must be fully functioning. Source Code: Public Class NotePad     Private Sub NewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewToolStripMenuItem.Click         If TextBox1.Modified Then             Dim ask As MsgBoxResult             ask = MsgBox("I save duh e?", MsgBoxStyle.YesNoCancel, "New Document")             If ask = MsgBoxResult.No Then                 TextBox1.Clear()            ...
 Q. Develop simple Music Player for the demonstration of ArrayList where playlist items will be store in ArrayLists and the Music Player will have fully function different music player related commands. Source Code: Public Class Form1     Private Sub MNUOpen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MNUOpen.Click         If OPD.ShowDialog = Windows.Forms.DialogResult.OK Then             WMP.URL = OPD.FileName         End If     End Sub     Private Sub MNUPlaylist_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MNUPlaylist.Click         Form2.Show()     End Sub End Class ******************************************************************************** Public Class Form2     Private Sub F...
Q. Implement a program for the demonstration of Array in Visual Basic 2010 where sorting and reversing of array can be performed by the user. Source Code: Public Class Form1     Dim i As Integer     Dim ary(5) As Integer     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         ListBox1.Items.Add(TextBox1.Text)         TextBox1.Text = ""     End Sub     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click         For Me.i = 0 To ListBox1.Items.Count - 1             ary(i) = ListBox1.Items(i)         Next     End Sub     Private Sub Button3_Click(ByVal sender As System.Obje...
Q. Develop windows application having one combo box at the middle with at least 5 color names in it. When user selects any color from the list, the background color of the application has to change as per the selection using the select...case statement. Source Code: Public Class Form1     Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged         Select Case ComboBox1.SelectedIndex             Case 0                 Me.BackColor = System.Drawing.Color.FromName(ComboBox1.SelectedItem)             Case 1                 Me.BackColor = System.Drawing.Color.FromName(ComboBox1.SelectedItem)     ...
Q. Write a software using Visual Basic 2010 for login purpose with two input boxes for username and password and appropriate buttons. When the user click login button, the software will check the password with the password set by you and then display message box accordingly. Source Code: Public Class Form1     Private Sub LoginButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LoginButton.Click         If UserNameTextBox.Text = "Tommy" And PasswordTextBox.Text = "Tommy" Then             MessageBox.Show("You Are Login", "Login", MessageBoxButtons.OK, MessageBoxIcon.Information)         Else             MessageBox.Show("Wrong User Name and Password", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error)         End If  ...
Q. Develop windows application for calculating simple interest where Simple Interest = (Principal x Time x Rate) / 100. Calculate the simple interest at least up to three decimal accuracy. Source Code: Public Class Form1     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click         Dim SI As Double         SI = (TextBox1.Text * TextBox2.Text * TextBox3.Text) / 100         TextBox4.Text = SI     End Sub     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click         Me.Close()     End Sub     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load     End Sub End Class
Q. Write windows application with three input boxes - two for inputting numbers and one for displaying result. Perform four basic mathematical operating such as plus, minus, multiply and divide using their respective buttons. Source Code: Public Class Form1     Dim num1 As Integer     Dim num2 As Integer     Dim ans As Double     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddButton.Click         num1 = FirstNumberTextBox.Text         num2 = SecondNumberTextBox.Text         ans = num1 + num2         AnswerTextBox.Text = ans     End Sub     Private Sub SubButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubButton.Click         n...