Imports System.Drawing.Drawing2D
'formu deiştirmek için bu zorunlu!!!!!!
Public Class Form2
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
Friend WithEvents TextBox6 As System.Windows.Forms.TextBox
Friend WithEvents Button3 As System.Windows.Forms.Button
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
Friend WithEvents contextmenu1 As System.Windows.Forms.ContextMenu
Friend WithEvents cd1 As System.Windows.Forms.ColorDialog
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.TextBox1 = New System.Windows.Forms.TextBox
Me.TextBox2 = New System.Windows.Forms.TextBox
Me.TextBox3 = New System.Windows.Forms.TextBox
Me.TextBox4 = New System.Windows.Forms.TextBox
Me.TextBox5 = New System.Windows.Forms.TextBox
Me.TextBox6 = New System.Windows.Forms.TextBox
Me.Button3 = New System.Windows.Forms.Button
Me.contextmenu1 = New System.Windows.Forms.ContextMenu
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.MenuItem2 = New System.Windows.Forms.MenuItem
Me.cd1 = New System.Windows.Forms.ColorDialog
Me.SuspendLayout()
'
'Button1
'
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Location = New System.Drawing.Point(72, 96)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 0
Me.Button1.Text = "Oyna"
'
'Button2
'
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.Location = New System.Drawing.Point(160, 96)
Me.Button2.Name = "Button2"
Me.Button2.TabIndex = 1
Me.Button2.Text = "Temizle"
'
'TextBox1
'
Me.TextBox1.BackColor = System.Drawing.Color.FromArgb(CType(64, Byte), CType(64, Byte), CType(64, Byte))
Me.TextBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(162, Byte))
Me.TextBox1.ForeColor = System.Drawing.Color.White
Me.TextBox1.Location = New System.Drawing.Point(48, 136)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(24, 22)
Me.TextBox1.TabIndex = 2
Me.TextBox1.Text = ""
'
'TextBox2
'
Me.TextBox2.BackColor = System.Drawing.Color.FromArgb(CType(64, Byte), CType(64, Byte), CType(64, Byte))
Me.TextBox2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(162, Byte))
Me.TextBox2.ForeColor = System.Drawing.Color.White
Me.TextBox2.Location = New System.Drawing.Point(80, 136)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(24, 22)
Me.TextBox2.TabIndex = 3
Me.TextBox2.Text = ""
'
'TextBox3
'
Me.TextBox3.BackColor = System.Drawing.Color.FromArgb(CType(64, Byte), CType(64, Byte), CType(64, Byte))
Me.TextBox3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(162, Byte))
Me.TextBox3.ForeColor = System.Drawing.Color.White
Me.TextBox3.Location = New System.Drawing.Point(112, 136)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.Size = New System.Drawing.Size(24, 22)
Me.TextBox3.TabIndex = 4
Me.TextBox3.Text = ""
'
'TextBox4
'
Me.TextBox4.BackColor = System.Drawing.Color.FromArgb(CType(64, Byte), CType(64, Byte), CType(64, Byte))
Me.TextBox4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(162, Byte))
Me.TextBox4.ForeColor = System.Drawing.Color.White
Me.TextBox4.Location = New System.Drawing.Point(152, 136)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.Size = New System.Drawing.Size(24, 22)
Me.TextBox4.TabIndex = 5
Me.TextBox4.Text = ""
'
'TextBox5
'
Me.TextBox5.BackColor = System.Drawing.Color.FromArgb(CType(64, Byte), CType(64, Byte), CType(64, Byte))
Me.TextBox5.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(162, Byte))
Me.TextBox5.ForeColor = System.Drawing.Color.White
Me.TextBox5.Location = New System.Drawing.Point(224, 136)
Me.TextBox5.Name = "TextBox5"
Me.TextBox5.Size = New System.Drawing.Size(24, 22)
Me.TextBox5.TabIndex = 6
Me.TextBox5.Text = ""
'
'TextBox6
'
Me.TextBox6.BackColor = System.Drawing.Color.FromArgb(CType(64, Byte), CType(64, Byte), CType(64, Byte))
Me.TextBox6.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(162, Byte))
Me.TextBox6.ForeColor = System.Drawing.Color.White
Me.TextBox6.Location = New System.Drawing.Point(192, 136)
Me.TextBox6.Name = "TextBox6"
Me.TextBox6.Size = New System.Drawing.Size(24, 22)
Me.TextBox6.TabIndex = 7
Me.TextBox6.Text = ""
'
'Button3
'
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button3.Location = New System.Drawing.Point(232, 48)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(24, 16)
Me.Button3.TabIndex = 8
Me.Button3.Text = "X"
'
'contextmenu1
'
Me.contextmenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.Text = "Yazı Rengi"
'
'MenuItem2
'
Me.MenuItem2.Index = 1
Me.MenuItem2.Text = "Zemin Rengi"
'
'Form2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.Lime
Me.ClientSize = New System.Drawing.Size(296, 264)
Me.ContextMenu = Me.contextmenu1
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.TextBox6)
Me.Controls.Add(Me.TextBox5)
Me.Controls.Add(Me.TextBox4)
Me.Controls.Add(Me.TextBox3)
Me.Controls.Add(Me.TextBox2)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "Form2"
Me.Opacity = 0.7
Me.Text = "Form2"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form2_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim s As New GraphicsPath
s.AddEllipse(0, 0, Me.Width, Me.Height)
Me.Region = New System.Drawing.Region(s)
'formu yuvarlak yapar
End Sub
Dim k As Point
'bu olmazsa olmaz.üstteki yani
Private Sub Form2_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
k = New Point(-e.X, -e.Y)
End Sub
Private Sub Form2_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
If e.Button = MouseButtons.Left Then
Dim z As Point = Control.MousePosition
z.Offset(k.X, k.Y)
Location = z
End If
'formun mouse tarafından hareketlendirilmesine yarar.tutup sürüklemeye.
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Randomize()
TextBox1.Text = Int(Rnd() * 49) + 1
TextBox2.Text = Int(Rnd() * 49) + 1
TextBox3.Text = Int(Rnd() * 49) + 1
TextBox4.Text = Int(Rnd() * 49) + 1
TextBox5.Text = Int(Rnd() * 49) + 1
TextBox6.Text = Int(Rnd() * 49) + 1
End Sub
Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.Click
cd1.ShowDialog()
ForeColor = cd1.Color
End Sub
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
cd1.ShowDialog()
BackColor = cd1.Color
End Sub
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class