Click here to Skip to main content
15,890,123 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Public Class ChangeMemNo
Public Sub refresh1()
Dim i As Integer = Me.Controls(0).Controls.Count
Dim j As Integer
For j = 0 To i - 1
If (Me.Controls(0).Controls(j).Name).Substring(0, 3) = "txt" Then
Me.Controls(0).Controls(j).Text = ""
End If
Next
End Sub
Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click
refresh1()
TextBox1.Text = ""
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Try
Dim eno As String
eno = InputBox("Pleasen enter the enrollment no ", "Search1")
If eno = "" Then
Exit Sub
End If
Dim dm As New dmregistration
Dim ds As New DataSet

ds = dm.search(Val(eno))
If ds Is Nothing Then
Exit Sub
End If
txtno.Text = ds.Tables(0).Rows(0)(0)
dtpadmission.Text = FormatDateTime(ds.Tables(0).Rows(0)(3), DateFormat.ShortDate)
txtaddress.Text = ds.Tables(0).Rows(0)(13)
txtcourse.Text = ds.Tables(0).Rows(0)(7)
dtpdob.Text = FormatDateTime(ds.Tables(0).Rows(0)(3), DateFormat.ShortDate)
txtfather.Text = ds.Tables(0).Rows(0)(11)
txtfname.Text = ds.Tables(0).Rows(0)(1)
txtlname.Text = ds.Tables(0).Rows(0)(2)
txtmobile.Text = ds.Tables(0).Rows(0)(15)
txtphno.Text = ds.Tables(0).Rows(0)(14)
txtreligion.Text = ds.Tables(0).Rows(0)(5)

Catch ex As Exception
MsgBox(ex.Message)
End Try

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If txtno.Text = "" Then
MsgBox("Please Search the Record !", MsgBoxStyle.Information)
Exit Sub
End If
If TextBox1.Text = "" Then
MsgBox("Please fill the new value for Membership No!", MsgBoxStyle.Information)
Exit Sub
End If
Dim dm As New dmregistration
dm.change_memeno(Val(txtno.Text), Val(TextBox1.Text))
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub
End Class
Posted

1 solution

Problem was in images used as background in form.change background image which i was using change its extension from bitmap to jpeg and saved then,
select form -> background image -> import from local resources -> ok.
solved.. :)
 
Share this answer
 
Comments
AlenGdnt123 11-Oct-16 7:10am    
solved my issue, quite good,thanks a lot
MayankSemwal 29-Nov-16 9:25am    
I am glad if it helped you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900