Monday 8 June 2015

MEMBUAT BUTTO VB.NET MENJADI USERFRIENDLY

hai kawan Vb.net...,
from question in above website, i get a ide to clear my problem solving:
https://www.daniweb.com/software-development/vbnet/threads/203770/call-a-button-click-event-under-another-sub-procedure

From my friend,  at the long a way i can learn someting,
and this seasion i try to answer her question about queue in the banking (antrian di bank) with VB.Net 2010, in this solving i am adopting  from VB 6 where i get from searching in internet,

Mohon ma'af kalo b. inggrisnya masih salah ya kawan mohon bantuannya buat benerin , saya masih belajar b. inggris. :)
 ok let's go to solving this problem,

Step 1. let's design on the form, i creat design form like this :


Step 2. to get sound when we click button at the keyboard i applay this source code in the form1_load :
 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.KeyPreview = True 'untuk mepreview atau memunculkan suara
end Sub

The and step is applay this code in the form1_Keypress :

 Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
        If Asc(e.KeyChar) = 49 Then '49 is button 1 from keyboard in ascii code
            Call Button1_Click(sender, New System.EventArgs())
        End If
        If Asc(e.KeyChar) = 50 Then '50 is button 2 from keyboard in ascii code
            Call Button5_Click(sender, New System.EventArgs())
        End If
    End Sub

Semoga bermanfaat , terimakasih buat mesin pencarian yang telah memertemukan kita, :) bay...
Thank you , I ALWAYS HOPE THIS NOTE ARE YOU SEARCH.

0 comments:

Post a Comment