Skip to main content

AccessTr.neT


Eğitim Planlama Programı

Eğitim Planlama Programı

#5
çok teşekkürler ellerinize sağlık
bir de resize olayına bakabilir misiniz şu kodu bu forma uyarlamam lazım

Public Sub SizeControls()
Dim lFWidth As Single, lFHeight As Single
Dim lLeft As Single, lTop As Single, lWidth As Single, lHeight As Single
Dim lDayLeft As Single, lDayTop As Single, lDayWidth As Single, lDayHeight As Single
Dim lWeekdayHeight As Single

Dim i As Integer, X As Integer, iT As Integer
Dim bAbbreviate As Boolean
Dim UF As Form

Const lPano As Single = 3000

    On Error Resume Next
    DoEvents
    If bHaftaAcik Then
        lWeekdayHeight = lblkw1.Width
    Else
        lWeekdayHeight = 0
    End If
    With Me
        .Painting = False
        lFWidth = .InsideWidth
        lFHeight = .InsideHeight - (.Section(acHeader).Height + .Section(acFooter).Height)
        lFHeight = lFHeight - 100

        lLeft = 50
        lTop = 50
        lWidth = IIf(bNavigasyonPanosu, lFWidth - (lPano + 50), lFWidth - 100)
        lHeight = lFHeight
        .lblBaslik.Width = lFWidth

        If TakvimTipi = enHafta Then
            lDayLeft = lLeft
            lDayTop = lTop + 205
            lDayHeight = lHeight - 250
            lDayWidth = lWidth \ 6

            For i = 1 To 42
                With Me("altfrmGun" & i)
                    Select Case i
                        Case 1 To 5
                            .Left = lLeft
                            .Top = lTop + 250
                            .Height = lDayHeight
                            With Me("lblGun" & i)
                                .Left = lLeft
                                .Top = lTop
                                .Width = lDayWidth
                                .Height = 250
                            End With
                        Case 6
                            .Left = lLeft
                            .Top = lTop + 250
                            .Height = (lHeight \ 2) - 250
                            With Me("lblGun" & i)
                                .Left = lLeft
                                .Top = lTop
                                .Width = lDayWidth
                                .Height = 250
                            End With
                        Case 7
                            .Left = Me("altfrmGun" & i - 1).Left
                            .Top = (lTop + (lHeight \ 2)) + 250
                            .Height = (lHeight \ 2) - 250
                            With Me("lblGun" & i)
                                .Left = Me("altfrmGun" & i).Left
                                .Top = Me("altfrmGun" & i).Top - 250
                                .Width = lDayWidth
                                .Height = 250
                            End With
                    End Select
                    .Width = lDayWidth
                    .Visible = (i < 8)
                End With
                lLeft = lLeft + lDayWidth
            Next i
        Else
            lDayLeft = lLeft + lWeekdayHeight
            lDayTop = lTop + 250
            lDayHeight = (lHeight - 250) / 6
            lDayWidth = (lWidth - lWeekdayHeight) / 7
            bAbbreviate = lDayWidth < 900

            For i = 1 To 6
                For X = 1 To 7
                    If i = 1 Then
                        With Me("lblGun" & X)
                            .Left = lDayLeft
                            .Top = lTop
                            .Width = lDayWidth
                            .Height = 250
                            .Caption = WeekdayName(CLng(X), bAbbreviate)
                        End With
                        lDayLeft = lDayLeft + lDayWidth
                    End If
                    With Me("altfrmGun" & X + iT)
                        .Width = lDayWidth
                        .Left = Me("lblGun" & X).Left
                        .Height = lDayHeight
                        .Top = lDayTop
                        On Error Resume Next
                        Set UF = .Form
                        Call FormBars(UF)
                        .Visible = True
                    End With
                Next X
                If bHaftaAcik Then
                    With Me("lblkw" & i)
                        .Left = lLeft + 10
                        .Top = lDayTop
                        .Height = lDayHeight
                    End With
                End If
                iT = iT + 7
                lDayTop = lDayTop + lDayHeight
            Next i
        End If
        .altfrmPano.Move lFWidth - lPano, 50, lPano, lFHeight
        .altfrmPano.Visible = bNavigasyonPanosu
        .Painting = True
        .Repaint
    End With

End Sub



bundaki gereksizleri çıkarıp forma uydurmam gerekiyor
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
Eğitim Planlama Programı - Yazar: accessman - 22/01/2020, 11:45
Cvp: Eğitim Planlama Programı - Yazar: accessman - 22/01/2020, 11:49
Cvp: Eğitim Planlama Programı - Yazar: accessman - 22/01/2020, 12:00
Cvp: Eğitim Planlama Programı - Yazar: berduş - 22/01/2020, 13:26
Cvp: Eğitim Planlama Programı - Yazar: accessman - 22/01/2020, 13:59
Task