Sunday, 20 March 2011

VB OUTPUT WITH CODING (conf man)

SCREEN1:-
Private Sub Form_Load()
ProgressBar1.Value = ProgressBar1.Min
End Sub


Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1.Value + 10
If ProgressBar1.Value = 50 Then
ProgressBar1.Value = ProgressBar1 + 50
If ProgressBar1.Value >= ProgressBar1.Max Then
Timer1.Enabled = False
Unload Me
Form1.Show

End If
End If
End Sub

SCREEN2:-
Private Sub Command1_Click()
Form4.Show
Unload Me
End Sub

Private Sub Command2_Click()
frmLogin.Show
Unload Me
End Sub

Private Sub Command3_Click()
Form5.Show
Unload Me
End Sub

SCREEN3:-






Option Explicit
Public LoginSucceeded As Boolean


Private Sub cmdCancel_Click()
    'set the global var to false
    'to denote a failed login
    LoginSucceeded = False
    Me.Hide
    Form1.Show
End Sub


Private Sub cmdOK_Click()
    'check for correct password
    If txtPassword = "password" And txtUserName = "admin" Then
        'place code to here to pass the
        'success to the calling sub
        'setting a global var is the easiest
        LoginSucceeded = True
        Me.Hide
        Form2.Show
    Else
        MsgBox "Invalid Password, try again!", , "Login"
        txtPassword.SetFocus
        SendKeys "{Home}+{End}"
    End If
End Sub

SCREEN4:-
Private Sub Command1_Click()
Form3.Show
Unload Me
End Sub

Private Sub Command2_Click()
Form1.Show
MsgBox "LOGIN OFF SUCCESSFUL", vbInformation, "INFORMATION "
Unload Me
End Sub

Private Sub Form_Load()
Dim oconn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strSQL As String
strSQL = "select * from conf"
Set oconn = New ADODB.Connection
oconn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\conference.mdb;Persist Security Info=False"
rs.CursorType = adOpenStatic
rs.CursorLocation = adUseClient
rs.LockType = adLockOptimistic
rs.Open strSQL, oconn, adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = rs
End Sub

SCREEN5:-
Private Sub Command1_Click()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\conference.mdb;Persist Security Info=False"
rs.Open "update conf set status='" + Text2.Text + "' where name='" + Text1.Text + "'", cn, adOpenKeyset, adLockOptimistic
MsgBox " Status Set Successfully..", vbInformation, "Recruitment System"
Unload Me
Me.Show
End Sub


Private Sub Command2_Click()
Form2.Show
Unload Me
End Sub

Private Sub Form_GotFocus()
Text1.Text = " "
Text2.Text = " "
End Sub

Private Sub Form_Load()
Text1.Text = " "
Text2.Text = " "
End Sub


SCREEN6:-
Private Sub Command1_Click()
Data1.Recordset.Update
MsgBox "successful registration", vbInformation, "INFORMATION"
Unload Me
Form1.Show
End Sub


Private Sub Command2_Click()
Unload Me
Form1.Show
End Sub


Private Sub Command3_Click()
Data1.Recordset.AddNew
End Sub



SCREEN7:-






Private Sub Command1_Click()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset

cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Microsoft Visual Studio\VB98\conference.mdb;Persist Security Info=False"
rs.Open "select * from conf where name='" & Text1.Text & "'", cn, adOpenKeyset, adLockOptimistic
MsgBox "You have been  " & rs(7).Value, vbInformation, "information"
Unload Me
Form1.Show
End Sub

Private Sub Command2_Click()
Form1.Show
Unload Me
End Sub


1 comment:

  1. gethu mams
    but how to take print out dont have in file format a

    ReplyDelete