Wednesday 3 July 2013

Tuesday 2 July 2013

Date Difference Am to Pm Visual Basic.NET


Instructions To Operate Date Difference Am to Pm 

* First Enter Date 'Hr', 'Min' and 'Sec' TextBox In First Row
* Also Choose "Am/Pm" from ComboBox In first Row
* Now Put Check Mark on  "Submit checkbox "
* Similarly Enter 'Hr', 'Min' and 'Sec' TextBox In Second Row
 * Choose "Am/Pm" from ComboBox In Second Row
* Then click on Submit checkbox in second Row

NOTE :- It is must to Click on Submit ChekBox After Entering Data at Respective Rows

* Finally click on "Get Date diff" Button .


Download Date Difference Am to Pm App

Download Date diff

Working Date Difference Am to Pm :-

1. In Fig.1 you can see the structure of Date diff App.

 . 


2. It also consist of combo Box To select Am/Pm Time . 



 3. After filling values in Text Boxes Its necessary to put check mark on check box "submit" .
 It display date entered .

 4. Finally click on Button Get date diff and it display date on Date-Diff labelled textboxes.

 CODE FOR Date Difference Am to Pm 


 
Public Class Form1
    Public gethr, getmin, getsec, gethr1, getmin1, getsec1, total1, total2, finaltotal, hr1, hr2, diffhr, min1, sec1 As Integer
    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked = True Then
            TextBox10.Text = TextBox10.Text + "-" + TextBox1.Text + "-" + TextBox2.Text + "-" + TextBox3.Text + "-" + ComboBox1.SelectedText
            gethr = Val(TextBox1.Text.ToString)
            getmin = Val(TextBox2.Text.ToString)
            getsec = Val(TextBox3.Text.ToString)
            total1 = (gethr * 3600) + (getmin * 60) + (getsec)
        End If
    End Sub
    Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
        If CheckBox2.Checked = True Then
            TextBox11.Text = TextBox11.Text + "-" + TextBox4.Text + "-" + TextBox5.Text + "-" + TextBox6.Text + "-" + ComboBox2.SelectedText
            gethr1 = Val(TextBox4.Text.ToString)
            getmin1 = Val(TextBox5.Text.ToString)
            getsec1 = Val(TextBox6.Text.ToString)
            total2 = (gethr1 * 3600) + (getmin1 * 60) + (getsec1)
            If ComboBox1.SelectedIndex = 0 And ComboBox2.SelectedIndex = 1 Then
                total1 = total1 + 12 * 3600
            ElseIf ComboBox1.SelectedIndex = 1 And ComboBox2.SelectedIndex = 0 Then
                total1 = total1 + 12 * 3600
            ElseIf ComboBox1.SelectedIndex = 0 And ComboBox2.SelectedIndex = 0 Then
                total1 = total1
            ElseIf ComboBox2.SelectedIndex = 0 And ComboBox1.SelectedIndex = 0 Then
                total1 = total1
            End If
            finaltotal = (Math.Abs(total1 - total2))
        End If
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ComboBox1.Items.Add("Am")
        ComboBox1.Items.Add("Pm")
        ComboBox2.Items.Add("Am")
        ComboBox2.Items.Add("Pm6")
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If finaltotal <= 60 Then
            TextBox7.Text = "0"
            TextBox8.Text = "0"
            TextBox9.Text = Math.Floor(finaltotal)
        ElseIf finaltotal > 60 And finaltotal < 3600 Then
            TextBox7.Text = "0"
            TextBox8.Text = Math.Floor(finaltotal / 60)
            TextBox9.Text = Math.Floor(finaltotal Mod 60)
        ElseIf finaltotal >= 3600 Then
            hr1 = Math.Floor(finaltotal / 3600)
            TextBox7.Text = hr1
            hr2 = hr1 * 3600
            diffhr = finaltotal - hr2
            min1 = Math.Floor(diffhr / 60)
            TextBox8.Text = min1
            sec1 = finaltotal Mod 60
            TextBox9.Text = sec1
        End If
    End Sub
End Class

Monday 1 July 2013

Friday 28 June 2013

Thursday 27 June 2013

Wednesday 26 June 2013

Tuesday 25 June 2013

FROM VB6 TO VB.NET

The switch form the old visual studio versiom6 to newer Visual Studio .NET to Create Visual BAsic
programs represents a update in technology . It represents far more than changing of a version name. When upgrading from Visual Studio 6 , Instead of naming it version , Microsoft used the term .NET as the name of the new version to denate the difference that it carries from the older technology .Faculty members teaching programming courses in visual  basic have to learn about the changes in new version of visual basic in order to Switch from teaching the older vb6.

Monday 24 June 2013

Friday 21 June 2013

Thursday 20 June 2013

INTRODUCTION TO VISUAL STUDIO 2010


Visual Basic 2010 is the latest version of Visual Basic launched by Microsoft in 2010. It 
is almost similar to Visual Basic 2008 but it has added many new features. Visual Basic 
has gone through many phases of development since the days of BASIC that was built 
for DOS. BASIC stands for Beginners' All-purpose Symbolic Instruction Code.

Wednesday 19 June 2013

Introduction To C++ Programming Language

C++ is object oriented programming language . But in this we can do Structured Programming also. Initially named "C with Classes" . C++ was developed By Bjarne Stroustrup at Bell-Laboratories in 1980s . Stroustrup take the best feature of simula 67 and C, and designed a language which support object oriented programming feature.