Skip to main content

AccessTr.neT


Numaratör

#1
ne lazım, ne lazım, hele bu aralık ayında muhasebecilere numaratör lazım dedim. Minik bir uygulama hazırladım. Gerçi her muhasebe programında olmasına rağmen, yinede lazım olacağını düşünerek ekliyorum.
Ekli dosya exe.dir

Kaynak kodları:


Public Class Form1
    Dim i As Integer = 0
    Private Sub D2Button1_Click(sender As System.Object, e As System.EventArgs) Handles D2Button1.Click
        Dim ilksayi As Integer = CInt(DAlfabetikTextBox1.Text)
        Dim sonsayi As Integer = CInt(DAlfabetikTextBox2.Text)

        If CInt(DAlfabetikTextBox1.Text) <= "0" Then
            MsgBox("İlk Sayfa Numaralasını Girmediniz")
        ElseIf CInt(DAlfabetikTextBox2.Text) <= "0" Then
            MsgBox("Son Sayfa Numaralasını Girmediniz")

        ElseIf CInt(DAlfabetikTextBox2.Text) < CInt(DAlfabetikTextBox1.Text) Then
            MsgBox("Son Sayfa İlk Sayfadan Küçük Olamaz")
        Else
            Dim pdx As Integer
            For pdx = 1 To DComboBox1.Text
                Dim pd As New System.Drawing.Printing.PrintDocument
                AddHandler pd.PrintPage, AddressOf PrintDocument_PrintPage
                pd.Print()
            Next
        End If
    End Sub
    Private Sub PrintDocument_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs)

        Dim ilksayi As Integer = CInt(DAlfabetikTextBox1.Text)
        Dim sonsayi As Integer = CInt(DAlfabetikTextBox2.Text)
        Dim fark As Integer = sonsayi - ilksayi
        While i < fark + 1
            e.Graphics.DrawString((i + ilksayi).ToString, New Font("Tahoma", 14, FontStyle.Bold), Brushes.Black, e.PageSettings.PaperSize.Width - 73, 20)

            i = i + 1
            Exit While
        End While
        If i < fark + 1 Then e.HasMorePages = True Else e.HasMorePages = False : i = 0
    End Sub

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        DComboBox1.Text = "1"
    End Sub

    Private Sub D1Button1_Click(sender As System.Object, e As System.EventArgs) Handles D1Button1.Click
        Application.ExitThread()
    End Sub
.rar Numarator.rar (Dosya Boyutu: 268,56 KB | İndirme Sayısı: 85)
drummers, 11-05-2009 tarihinden beri AccessTr.neT üyesidir.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Numaratör - Yazar: drummers - 22/12/2013, 18:03
Cvp: Numaratör - Yazar: mahmut18 - 22/12/2013, 21:21
Cvp: Numaratör - Yazar: metbal - 22/12/2013, 23:58
Cvp: Numaratör - Yazar: C*e*l*o*y*c*e - 23/12/2013, 00:59
Cvp: Numaratör - Yazar: yorum70 - 23/12/2013, 09:42