Belajar VB.Net : Common Dialog Control Vb.Net Pemula

Tutorial Belajar VB.Net : cara penggunaan Common Dialog Control, dialog boxes pada Vb.Net khusu Pemula, tutorial vb.net selengkapnya di blog sector code

Tutorial Vb.Net - Dalam pemrograman berbasis GUI, kita mengenal banyak sekali kotak dialog yang yang digunakan untuk berbagai tugas seperti membuka dan menyimpan file, untuk mencetak suatu halaman, memberikan pilihan warna, font, Jendela setup, dll, dalam sebuah aplikasi. Dialog Box akan berguna bagi pengguna dan memudahkan pengguna untuk memahami kesalahan atau perintah.

Tutorial Visual basic khusus pemula lainnya :

  1. Tutorial Vb.Net : Penggunaan Arrays di Vb.Net Lengkap
  2. CRUD VB.Net (Create,Read,Update, Delete) Database Ms Access
  3. Belajar Vb.Net : Looping Statement Vb.Net Lengkap
Dan masih banyak tutorial - turoial tentang vb.net yang sudah kami bahas, silahkan untuk selengkapnya klik pada label Belajar VB.Net Khusus pemula.

Dari sekian banyak dialog box, Semua itu memiliki kontrol class yang diwarisi dari class CommonDialog untuk box dialog tertentu.
Belajar VB.Net : Common Dialog Control Vb.Net Pemula

Untuk Metode ShowDialog digunakan untuk menampilkan semua kontrol dialog box pada saat aplikasi run-time. Akan Menjalankan nilai tipe DialogResult enumeration. Berikut Nilai-nilai DialogResult enumeration :
DialogResult
Description
Abort
Menjalankan nilai DialogResult.Abort, ketika pengguna mengklik tombol Abort
Cancel
Menjalankan DialogResult.Cancel, ketika pengguna mengklik tombol Batal
Ignore
Menjalankan DialogResult.Ignore, ketika pengguna mengklik tombol Ignore
No
Menjalankan DialogResult.No, ketika pengguna mengklik tombol No
None
Tidak menjalankan apa-apa, kotak dialog berjalan terus
OK
Menjalankan DialogResult.Ok, ketika pengguna mengklik tombol OK
Retry
Menjalankan DialogResult.Retry, ketika pengguna mengklik tombol Retry
Yes
Menjalankan DialogResult.Yes, ketika pengguna mengklik tombol Yes

Penggunaan ColorDialog Control Vb.Net

buat sebuah form menggunakan visual studio kamu dan beri 1 buah button dan label, untuk percobaan kita silahkan desain seperti tampilan berikut :
ColorDialog Control
Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If ColorDialog1.ShowDialog <> Windows.Forms.DialogResult.Cancel Then
            Label1.ForeColor = ColorDialog1.Color
        End If
    End Sub
End Class

Font Dialog Control dalam Vb.Net

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If FontDialog1.ShowDialog <> Windows.Forms.DialogResult.Cancel Then
            RichTextBox1.ForeColor = FontDialog1.Color
            RichTextBox1.Font = FontDialog1.Font
        End If
    End Sub
End Class
Font Dialog Control

Open File Dialog

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If OpenFileDialog1.ShowDialog <> Windows.Forms.DialogResult.Cancel Then
            PictureBox1.Image = Image.FromFile(OpenFileDialog1.FileName)
        End If
    End Sub
End Class
Open File Dialog

Save Dialog

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
   SaveFileDialog1.Filter = "TXT Files (*.txt*)|*.txt"
      If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK _
   Then
         My.Computer.FileSystem.WriteAllText _
         (SaveFileDialog1.FileName, RichTextBox1.Text, True)
      End If
    End Sub
End Class

Print Dialog Control

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        PrintDialog1.Document = PrintDocument1
        PrintDialog1.PrinterSettings = PrintDocument1.PrinterSettings
        PrintDialog1.AllowSomePages = True
        If PrintDialog1.ShowDialog = DialogResult.OK Then
            PrintDocument1.PrinterSettings = PrintDialog1.PrinterSettings
            PrintDocument1.Print()
        End If
    End Sub
End Class

Share jika bermanfaat ya, terima kasih

COMMENTS

Next Recomended


Feel free to code it up and send us a pull request.

Hi everyone, let's me know how much this lesson can help your work. Please Subscribe and Follow Our Social Media 'kodeajaib[dot]com' to get Latest tutorials and will be send to your email everyday for free!, Just hit a comment if you have confused. Nice to meet you and Happy coding :) all ^^



Follow by E-Mail


Name

ADO.NET,3,Ajax,6,Android,9,AngularJS,4,ASP.NET,4,Blogger Tutorials,7,Bootstrap,7,C++,1,Codeigniter,2,Cplusplus,6,Crystal Report,6,CSharp,25,Ebook Java,2,FlyExam,1,FSharp,3,Game Development,2,Java,35,JDBC,2,Laravel,84,Lumen,2,MariaDB,2,Ms Access,3,MySQL,31,ODBC,6,OleDB,1,PHP,14,PHP Framework,5,PHP MYSQLI,9,PHP OOP,5,Python,8,Python 3,4,SQL Server,4,SQLite,4,Uncategorized,5,Vb 6,2,Vb.Net,89,Video,48,Vue Js,4,WPF,2,Yii,3,
ltr
item
KODE AJAIB: Belajar VB.Net : Common Dialog Control Vb.Net Pemula
Belajar VB.Net : Common Dialog Control Vb.Net Pemula
Tutorial Belajar VB.Net : cara penggunaan Common Dialog Control, dialog boxes pada Vb.Net khusu Pemula, tutorial vb.net selengkapnya di blog sector code
http://3.bp.blogspot.com/-aofepmfPFts/VjyHXx-3nmI/AAAAAAAABE0/FhByu6r2tuA/s400/Commond-dialog-vb-net.jpg
http://3.bp.blogspot.com/-aofepmfPFts/VjyHXx-3nmI/AAAAAAAABE0/FhByu6r2tuA/s72-c/Commond-dialog-vb-net.jpg
KODE AJAIB
https://www.kodeajaib.com/2015/11/belajar-vbnet-common-dialog-control.html
https://www.kodeajaib.com/
https://www.kodeajaib.com/
https://www.kodeajaib.com/2015/11/belajar-vbnet-common-dialog-control.html
true
3214704946184383982
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy