
Forma eklemeniz gereken araçlarımız şunlar:
2 Adet TextBox + 3 Adet Label ve 1 Adet Button Ekleyin
Kodlar:
Public Class Form1 Dim i As Byte Dim hak As Byte Dim objdocument As Object Dim objword As Object Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click hak = 3 If TextBox1.Text = "iF" And TextBox2.Text = "123456" Then objdocument = objword.documents.add() MsgBox("Welcome İF!") objword.visible = True Close() Else TextBox1.Text = "" TextBox2.Text = "" MsgBox("Hatalı Kullanıcı Adı Veya Şifre") i = i + 1 Label3.Text = (hak - i & " Yanlış Girme Hakkınız kaldı") End If If Label3.Text = (0 & " Yanlış Girme Hakkınız Var") Then Close() End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load objword = CreateObject("Word.Application") End Sub End Class
ads
Hiç yorum yok: