-
Notifications
You must be signed in to change notification settings - Fork 0
/
HolidayCountdownMain.vb
41 lines (40 loc) · 1.88 KB
/
HolidayCountdownMain.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Imports System.Drawing.Printing
Public Class HolidayCountdownMain
Dim MI As Bitmap
'HolidayCountdownToolStrip subroutines
Private Sub NewYearsDayButtonTS_Click(sender As Object, e As EventArgs) Handles NewYearsDayButtonTS.Click
Dim LNYD As New HolidayCountdownNewYearsDay With {.MdiParent = Me}
LNYD.Show()
End Sub
Private Sub EasterButtonTS_Click(sender As Object, e As EventArgs) Handles EasterButtonTS.Click
Dim LE As New HolidayCountdownEaster With {.MdiParent = Me}
LE.Show()
End Sub
Private Sub ThanksgivingButtonTS_Click(sender As Object, e As EventArgs) Handles ThanksgivingButtonTS.Click
Dim LT As New HolidayCountdownThanksgiving With {.MdiParent = Me}
LT.Show()
End Sub
Private Sub ChristmasButtonTS_Click(sender As Object, e As EventArgs) Handles ChristmasButtonTS.Click
Dim LC As New HolidayCountdownChristmas With {.MdiParent = Me}
LC.Show()
End Sub
Private Sub NewYearsEveButtonTS_Click(sender As Object, e As EventArgs) Handles NewYearsEveButtonTS.Click
Dim LNYE As New HolidayCountdownNewYearsEve With {.MdiParent = Me}
LNYE.Show()
End Sub
Private Sub NewWindowButtonTS_Click(sender As Object, e As EventArgs) Handles NewWindowButtonTS.Click
Dim NW As New HolidayCountdownMain
NW.Show()
End Sub
Private Sub PrintDocument1_PrintPage(sender As Object, e As PrintPageEventArgs) Handles PrintDocument1.PrintPage
e.Graphics.DrawImage(MI, 0, 0)
End Sub
Private Sub PrintButtonTS_Click(sender As Object, e As EventArgs) Handles PrintButtonTS.Click
Dim MG As Graphics = CreateGraphics()
Dim S As Size = Size
MI = New Bitmap(S.Width, S.Height, MG)
Dim MEMG As Graphics = Graphics.FromImage(MI)
MEMG.CopyFromScreen(Location.X, Location.Y, 0, 0, S)
PrintDocument1.Print()
End Sub
End Class