Create a Program to Display Images in Visual Studio "Membuat Program untuk Menampilkan Gambar pada Visual Studio" 2 Language ENG -IND
[ENG]
Hallo Stemian's. This time I will explain a little about the basic Program displaying images in Visual Basic or Visual Studio applications
1. Open Microsoft Visual Studio 2010. With the following look:
2. Klik file – New – Project
3.Then type the project name and select the location for file storage and OK
4. When click Ok will exit form view
5.Click the toolbox located on the edge of the form view, then select Picturebox, CheckBox and Button.
6.Double click on checkbox and button with program listing:
"Before inserting the image in the debug folder inside our project folder, if not inserting the image in debug then saaat linsting program does not use" Application.StartupPath & "and when writing the image name type where the image you want to insert. For example: PictureBox1.Image = Image.FromFile ("E: \ IMG_8886.jpg"). "
Listing Program as follows:
Public Class Latihan_project_form1_dan_form2
Dim SW As Boolean = True
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles CheckBox1.CheckedChanged
PictureBox1.Image = Nothing
If CheckBox1.Checked = True Then
PictureBox1.Image = Image.FromFile(Application.StartupPath & "\IMG_1660.jpg")
PictureBox2.Image = Image.FromFile(Application.StartupPath & "\IMG_1566.jpg")
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton2.Click
End
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click
If SW = True Then
PictureBox3.Image = Image.FromFile(Application.StartupPath & "\IMG_1853.jpg")
PictureBox2.Image = Image.FromFile(Application.StartupPath & "\IMG_1566.jpg")
Button1.Text = "Gambar Disembunyikan"
SW = False
Else
Button1.Text = "Gambar Ditampilkan"
PictureBox2.Image = Nothing
PictureBox3.Image = Nothing
SW = True
End If
End Sub
End Class
7. Then save and start debugging
8. Click on Displays Images and Images Displayed. At the time of click Display Picture:
9. When clicked Displayed Image:
10. At the time of click Image Hidden:
11. And at the time of eliminating check on display image:
12. Finish.
Thanks to @aiqabrago and @levycore for all the help and support.
Thanks also to Stemian friends who have joined @alfarisi @rizaldamti @afriaulia @usammiismi @muhammadzairil @aizulkamal @barvon@amirullah @amrudah @kemal13 @fajarsdq @makhzar @toniesteem@mirzacho @rahmathidayat097 @nisarunnisah88 @mahathiruddin @bewe @kakilasak @Hadimemories @jodipamungkas @yandaalpiansyah
Regards Steemit Indonesia Community !!!
[IND]
Hallo Stemian's. Kali ini saya akan menjelaskan program dasar untuk menampilkan gambar dalam aplikasi Visual Basic atau Visual Studio
1.Buka program Microsoft Visual Studio 2010. Dengan tampilan seperti berikut :
2. Klik file – new – project
3.Lalu ketik nama project dan pilih lokasi untuk penyimpanan file dan OK
4.Saat klik Ok akan keluar tampilan form
5.Klik toolbox yang terdapat pada pinggiran tampilan form, lalu pilih Picturebox, CheckBox dan Button.
6.Klik double klik pada checkbox dan botton dengan listing program :
Note :
“sebelum nya masukkan gambar dalam folder debug didalam folder project kita, jika tidak memasukkan gambar pada debug maka saaat linsting program tidak menggunakan “Application.StartupPath &” dan saat menulis nama image ketik dimana letak gambar yg ingin Anda masukkan. Contohnya : PictureBox1.Image =Image.FromFile("E:\IMG_8886.jpg").”
Listing Program sebagai berikut :
Public Class Latihan_project_form1_dan_form2
Dim SW As Boolean = True
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles CheckBox1.CheckedChanged
PictureBox1.Image = Nothing
If CheckBox1.Checked = True Then
PictureBox1.Image = Image.FromFile(Application.StartupPath & "\IMG_1660.jpg")
PictureBox2.Image = Image.FromFile(Application.StartupPath & "\IMG_1566.jpg")
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton2.Click
End
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click
If SW = True Then
PictureBox3.Image = Image.FromFile(Application.StartupPath & "\IMG_1853.jpg")
PictureBox2.Image = Image.FromFile(Application.StartupPath & "\IMG_1566.jpg")
Button1.Text = "Gambar Disembunyikan"
SW = False
Else
Button1.Text = "Gambar Ditampilkan"
PictureBox2.Image = Nothing
PictureBox3.Image = Nothing
SW = True
End If
End Sub
End Class
7.Lalu save and start debugging
8.Klik di Menampilkan Gambar dan Gambar Ditampilkan. Pada saat klik Menampilkan Gambar :
9. Pada saat klik Gambar Ditampilkan :
10. Pada saat klik Gambar Disembunyikan :
11. Dan pada saat menghilangkan check pada menampilkan gambar :
12. Selesai.
Terima kasih untuk @aiqabrago dan @levycore atas semua bantuan dan dukungannya.
Terima kasih juga untuk teman teman Stemian's yang telah bergabung @alfarisi @rizaldamti @afriaulia @usammiismi @muhammadzairil@aizulkamal @barvon @amirullah @amrulfahmi @kemal13 @fajarsdq @makhzar @toniesteem @mirzacho @rahmathidayat097 @nisarunnisah88 @mahathiruddin @bewe @kakilasak @hadimemories @jodipamungkas @yandaalpiansyah
Salam Komunitas Steemit Indonesia!!!
Salam Kompak Komunitas Steemit Indonesia
Salam kompak bang :D
bagus @teukufajar :D
terima kasih bang :D
Program yang bagus @teukufajar 👍
terima kasih bang :D
bagus sekali @teukufajar
terima kasih bang jo
sama-sama
Nanti kalo kita ketemu
Ajarin saya dong
hehe iya bang nanti kita duduk sama sama ya
Kek mana tu jar?
susah di jelasin itu nisa, nanti ya kalo ada kesempatan duduk sama sama :D
Wow
makasi bang bor
Congratulations @teukufajar! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the number of upvotes received
Click on any badge to view your own Board of Honnor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
By upvoting this notification, you can help all Steemit users. Learn how here!