Monday, May 25, 2015

Contoh Login dengan Gambas

Posted by UJIAN PAS TAHUN AJARAN 2020/2021 on 3:08 AM


1. Buat Lah Tampilan Form Login sebaik Mungkin atau sebagai berikut : 
    - PictureBox1
    - ProgressBar1
    - Timer1
    - Label1
    - Label2
    - TextBox1
    - TextBox2
    - Button1
    - Button2


2. Klik 2x pada Timer1


PUBLIC SUB Timer1_Timer()

  ProgressBar1.value = ProgressBar1.value + 0.20
  IF ProgressBar1.value = 1 THEN
  ME.Close
  timer1.enabled = FALSE
  FMain.show
  ENDIF

END


3. Klik 2x pada Button2 atau Button Login

 PUBLIC SUB Button2_Click()

  IF TextBox1.text = "1" AND textbox2.text = "admin" THEN
  ProgressBar1.Visible = TRUE
  timer1.Enabled = TRUE
  TextBox1.height = 28
  TextBox1.border = FALSE
  ELSE
  SELECT Message.Question("password salah", "ulangi", "tidak")
  CASE 1
  TextBox1.text = ""
  CASE 2
  ME.Close
  END SELECT
  END IF

END


4. Klik 2x pada Button2 atau Button Exit


 PUBLIC SUB Button2_Click()

  ME.close

END


Selesai semoga bermanfaat. . .  :)
dan jangan lupa Komentarnya. . .
Like nya jugaya.





0 comments:

Post a Comment

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin

Search Site