PD rm PD rm
Y Y
Y
Y
er
er
ABB
ABB
y
y
bu
bu
2.0
2.0
to
to
re
re
he
he
k
k
lic
lic
C
C
w om w om
w
w
w. w.
A B B Y Y.c A B B Y Y.c
analog
Jam analog denagn VB.NET
Posted on September 16, 2007 by rawza
*** langsung copy pastekan code ini dan jgn lupa di compile….
Imports System.Math
Imports Microsoft.VisualBasic
Public Class Form1
Inherits System.Windows.Forms.Form
‘objek pen
Dim l As Label
Const ukrtengah = 150
Const jrmdetik = 100
Const jrmmenit = 80
Const jrmjam = 60
Dim pen As New Drawing.Pen(Color.Red, 2)
Dim detik, menit, jam As Integer
Dim x1, x2, y1, y2 As Integer
Y
er
er
ABB
ABB
y
y
bu
bu
2.0
2.0
to
to
re
re
he
he
k
k
lic
lic
C
C
w om w om
w
w
w. w.
A B B Y Y.c A B B Y Y.c
analog
Protected Overrides Sub onpaint(ByVal e As PaintEventArgs)
Dim gr As Graphics
gr = e.Graphics
gr.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias
Dim pe As New Pen(Color.Blue, 3)
gr.DrawEllipse(pe, 0, 5, 290, 290)
End Sub
End Class
Page 2