Private systray As New NotifyIcon()
Public Sub Main()
Dim mnu As New ContextMenu()
Dim mnuitem As New MenuItem()
mnuitem.Text = "Exit"
AddHandler mnuitem.Click, AddressOf EndApp
mnu.MenuItems.Add(mnuitem)
systray.ContextMenu = mnu
systray.Icon = New Icon(Application.StartupPath & "\systray.ico")
systray.Visible = True
Application.Run()
End Sub
Private Sub EndApp(ByVal sender As Object, ByVal e As EventArgs)
systray.Visible = False
Application.Exit()
End Sub
Topic: Information
———
https://www.codeproject.com/KB/vb/ZipDemo.aspx?display=Print
———
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Create a PrintDocument and attach it to PrintPreview dialog
ppdGameForm.Document = PreparePrintDocument()
'Preview the PrintDocument
'Anti-aliasing removes jagged lines when fonts are rendered, but slows down rendering
ppdGameForm.UseAntiAlias = True
ppdGameForm.WindowState = FormWindowState.Maximized
ppdGameForm.ShowDialog()
End Sub
Private Function PreparePrintDocument() As Printing.PrintDocument
' Make the PrintDocument object.
Dim objPrintDocument As New Printing.PrintDocument
objPrintDocument.DocumentName = "Shot Chart"
' Install the PrintPage event handler.
AddHandler objPrintDocument.PrintPage, AddressOf Print_PrintPage
' Return the object.
Return objPrintDocument
End Function
Private Sub Print_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs)
Using objGraphics As Graphics = e.Graphics
Dim iXAdjustment As Integer = 0
Dim iYAdjustment As Integer = 0
Dim strHeaderTitle As String = ""
Dim strPeriodHeader As String = ""
Dim objRectangle As Rectangle
Dim objPen As New Pen(Color:=Color.Black, Width:=3)
Dim objFont As Font
Dim stringFormat As New StringFormat()
'Align text Center/Top
stringFormat.Alignment = StringAlignment.Center
stringFormat.LineAlignment = StringAlignment.Center
'Create Document Header
objFont = New Font("Tahoma", 18, FontStyle.Bold, GraphicsUnit.Point)
objRectangle = New Rectangle(x:=0, y:=30, Width:=850, Height:=30)
'Draw the Header
If cboLocation.Text = "Away" Then
strHeaderTitle = mstrOpponentTeamNickname & " vs " & mstrOurTeamNickname & " Shot Chart"
Else
strHeaderTitle = mstrOurTeamNickname & " vs " & mstrOpponentTeamNickname & " Shot Chart"
End If
objGraphics.DrawString(mstrOurTeamNickname & " Shot Chart", objFont, Brushes.Black, objRectangle, stringFormat)
'Second and third header lines
objFont = New Font("Tahoma", 12, FontStyle.Regular, GraphicsUnit.Point)
objRectangle = New Rectangle(x:=0, y:=60, Width:=850, Height:=40)
If cboLocation.Text = "Away" Then
strHeaderTitle = mstrOpponentTeamNickname & " vs " & mstrOurTeamNickname
Else
strHeaderTitle = mstrOurTeamNickname & " vs " & mstrOpponentTeamNickname
End If
strHeaderTitle = strHeaderTitle & vbCrLf & dtpGameDate.Value
objGraphics.DrawString(strHeaderTitle, objFont, Brushes.Black, objRectangle, stringFormat)
For I As Integer = 1 To 4
'Draw a box around 1/2 court
If I = 1 Then
iYAdjustment = 120
Else
iYAdjustment = ((I - 1) * 220) + 120 '100 is placement of first print
End If
iXAdjustment = 45
'Draw court outline
objRectangle = New Rectangle(x:=iXAdjustment, y:=iYAdjustment, Width:=380, Height:=220)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
'Draw stat box outline
objRectangle = New Rectangle(x:=iXAdjustment + 380, y:=iYAdjustment, Width:=380, Height:=220)
'Draw the Period Title
strPeriodHeader = "Period " & I
'stringFormat.LineAlignment = StringAlignment.Near
objFont = New Font("Tahoma", 12, FontStyle.Underline, GraphicsUnit.Point)
objGraphics.DrawString(strPeriodHeader, objFont, Brushes.Black, objRectangle, stringFormat)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
'Draw the top of the key
objRectangle = New Rectangle(x:=iXAdjustment + 137, y:=iYAdjustment + 52, Width:=100, Height:=100)
objGraphics.DrawPie(pen:=objPen, rect:=objRectangle, _
startAngle:=0, sweepAngle:=180)
'DRAW THE PAINT
'Draw the 3 second area
objRectangle = New Rectangle(x:=iXAdjustment + 137, y:=iYAdjustment, Width:=100, Height:=102)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
'Left Block
objPen.Width = 3
objRectangle = New Rectangle(x:=iXAdjustment + 126, y:=iYAdjustment + 30, Width:=8, Height:=3)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
'Right Block
objRectangle = New Rectangle(x:=iXAdjustment + 240, y:=iYAdjustment + 30, Width:=8, Height:=3)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
objPen.Width = 1
'Left 1st thin
objRectangle = New Rectangle(x:=iXAdjustment + 125, y:=iYAdjustment + 47, Width:=10, Height:=1)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
'Right 1st thin
objRectangle = New Rectangle(x:=iXAdjustment + 239, y:=iYAdjustment + 47, Width:=10, Height:=1)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
'Left 2nd thin
objRectangle = New Rectangle(x:=iXAdjustment + 125, y:=iYAdjustment + 62, Width:=10, Height:=1)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
'Right 2nd thin
objRectangle = New Rectangle(x:=iXAdjustment + 239, y:=iYAdjustment + 62, Width:=10, Height:=1)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
'Left 3rd thin
objRectangle = New Rectangle(x:=iXAdjustment + 125, y:=iYAdjustment + 77, Width:=10, Height:=1)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
'Right 3rd thin
objRectangle = New Rectangle(x:=iXAdjustment + 239, y:=iYAdjustment + 77, Width:=10, Height:=1)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
objPen.Width = 3
'Draw the 3 point line, High School
objRectangle = New Rectangle(x:=iXAdjustment + 32, y:=iYAdjustment - 155, Width:=310, Height:=310)
objGraphics.DrawPie(pen:=objPen, rect:=objRectangle, _
startAngle:=0, sweepAngle:=180)
'DRAW THE BASKETBALL GOAL
'Draw the backboard
objRectangle = New Rectangle(x:=iXAdjustment + 167, y:=iYAdjustment + 7, Width:=40, Height:=1)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
'Draw the back of the rim
objRectangle = New Rectangle(x:=iXAdjustment + 184, y:=iYAdjustment + 10, Width:=6, Height:=3)
objGraphics.DrawRectangle(pen:=objPen, rect:=objRectangle)
'Draw the rim
objGraphics.DrawEllipse(pen:=New Pen(Color.Black, Width:=2), _
rect:=New Rectangle(x:=iXAdjustment + 178, y:=iYAdjustment + 13, Width:=18, Height:=18))
Next
'Create Document Footer
objFont = New Font("Tahoma", 8, FontStyle.Regular, GraphicsUnit.Point)
objRectangle = New Rectangle(x:=0, y:=1055, Width:=e.PageBounds.Right, Height:=20)
'Draw the Header
objGraphics.DrawString("Page 1", objFont, Brushes.Black, objRectangle, stringFormat)
End Using
e.HasMorePages = False
End Sub
———
https://www.linglom.com/2009/02/12/accessing-mysql-on-vbnet-using-mysql-connectornet-part-i-introduction/
———
if dr("Username")=textbox1.text and dr("Password")=textbox2.text then
'good move
else
'wrong move
end if
———
https://www.codeproject.com/KB/vb/VBnet_to_mySQL_Server.aspx
———
https://tv.yahoo.com/blog/americas-got-talent-ones-to-watch--1303
———
https://www.narutochuushin.com/main.php?category=multimedia&page=manga
———
https://www.codeproject.com/KB/vb/downloadFileswProgressbar.aspx
https://a1vbcode.com
———
https://www.codeproject.com/KB/vb/autoupdate.aspx