29 Kasım 2017 Çarşamba

VB.Net ile D3D Menü yapımı

Hiç yorum yok
Merhaba arkadaşlar bugün sizlere Visual Basic'de D3D Menü kodlamasını göstereceğim.


İlk olarak formumuza



6 Adet Label

2 Adet Timer

Timer enabled = True olucaktır 'Her iki Timerde'

Label1 Rengi = Orange
Label2 ve 6 = White
Label3-4-5 = Red Olucaktır.

Label1 = İstediğinizi Yazın.
Label2 = İstediğinizi Yazın.
Label6 = İstediğinizi Yazın.
Label3 = [OFF]
Label4 = [OFF]
Label5 = [OFF]
Ekleyin.





Kullanılan Kodlar;


Public Class Form1 ' Form kaçsa yazın
    Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
        Try
            Interaction.AppActivate("Wolfteam.bin") ' çalışacak uygulama !! cemal !!
            Me.TopMost = True
        Catch
            Me.TopMost = True
        End Try
    End Sub

    Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
        If GetAsyncKeyState(Keys.Down) = -32767 Then


            If Label1.ForeColor = Color.Orange Then
                Label1.ForeColor = Color.White
                Label2.ForeColor = Color.Orange
                Exit Sub
            End If
            
            If Label2.ForeColor = Color.Orange Then
                Label2.ForeColor = Color.White
                Label6.ForeColor = Color.Orange
                Exit Sub
            End If
            If Label6.ForeColor = Color.Orange Then
                Label6.ForeColor = Color.Orange
                Exit Sub
            End If
        End If

        If GetAsyncKeyState(Keys.Up) = -32767 Then
            If Label2.ForeColor = Color.Orange Then
                Label2.ForeColor = Color.White
                Label1.ForeColor = Color.Orange
                Exit Sub
            End If

            If Label1.ForeColor = Color.Orange Then
                Label1.ForeColor = Color.Orange

            End If
            If Label6.ForeColor = Color.Orange Then
                Label6.ForeColor = Color.White
                Label2.ForeColor = Color.Orange
                Exit Sub
            End If

            If Label2.ForeColor = Color.Orange Then
                Label2.ForeColor = Color.Orange

            End If

        End If
        If GetAsyncKeyState(Keys.Insert) = -32767 Then
            If Label1.Visible = False Then
                Label1.Visible = True
                Me.Show()
                Exit Sub
            End If
            If Label1.Visible = True Then
                Label1.Visible = False
                Me.Hide()
                Exit Sub
            End If
        End If
        If GetAsyncKeyState(Keys.Delete) = -32767 Then
            Application.Exit()
            Exit Sub
        End If
    End Sub

    Private Sub Timer2_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer2.Tick
        If GetAsyncKeyState(Keys.Right) = -32767 Then
            If Label1.ForeColor = Color.Orange Then
                Label3.ForeColor = Color.White
                Label3.Text = "[ON]"
                Exit Sub
            End If
            If Label2.ForeColor = Color.Orange Then
                Label4.ForeColor = Color.White
                Label4.Text = "[ON]"
                Exit Sub
            End If
            If Label6.ForeColor = Color.Orange Then
                Label5.ForeColor = Color.White
                Label5.Text = "[ON]"
                Exit Sub
            End If
        End If

        If GetAsyncKeyState(Keys.Left) = -32767 Then
            If Label1.ForeColor = Color.Orange Then
                Label3.ForeColor = Color.Red
                Label3.Text = "[OFF]"
                Exit Sub
            End If
            If Label2.ForeColor = Color.Orange Then
                Label4.ForeColor = Color.Red
                Label4.Text = "[OFF]"
                Exit Sub
            End If
            If Label6.ForeColor = Color.Orange Then
                Label5.ForeColor = Color.Red
                Label5.Text = "[OFF]"
                Exit Sub
            End If
        End If
    End Sub
End Class


Hiç yorum yok :

Yorum Gönder

b2b yazılım vois media