Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-25-2013, 10:25 AM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › Visual Basic v
« Previous 1 2 3 4 5 ... 14 Next »

[Ask] PictureBox

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
Ask PictureBox
01-09-2013, 06:58 PM
Post: #1
kenta Offline
./Devilz 1st Cadet
Posts: 43
Joined: Jul 2012
Reputation: 0
PictureBox
ada 1 picturebox dengan 1 button pada form ,
kk mau tanya fungsi code ni apa?belajar
pada code button :
PictureBox1.Image = Image.FromFile(Application .StartupPath.Tostring &"\Smile\"& CStr(Int(Rnd()*12) & ".gif")
Beep()

tolong penjelasan untuk fungsi dari tiap kode tersebut, tolong pencerahan nya terimakasih ngambek
Find all posts by this user
Quote this message in a reply
01-09-2013, 08:06 PM
Post: #2
nanda Away
Wahyu Adi Prasetyo
**
Moderators
Posts: 2,021
Joined: Aug 2011
Reputation: 119
RE: PictureBox
btw kalau dijalankan jadi gmana ya?
Find all posts by this user
Quote this message in a reply
01-09-2013, 09:04 PM
Post: #3
kenta Offline
./Devilz 1st Cadet
Posts: 43
Joined: Jul 2012
Reputation: 0
RE: PictureBox
(01-09-2013 08:06 PM)Nanda Wrote:  btw kalau dijalankan jadi gmana ya?

makanya di tutoria nya suruh masukkan folder berisi file gambar ke bin visua l basic.net , tpi waktu di jalanin error , nggk tahu maksut nya gmn ? tpi yang jelas gambarnya entar ganti2 berdasarkan gambar yang ada di folder berisi file gambar yang di taruh di folder bin milik visual basic tdi, di tombonya ada tuisan nya gambar acak. klu ganti gambarnya ku tahu pake cara lain tpi klu dari folder dan fungsi dari kode tersebut ku nggk tahu kk, tolong penjelasan nya, terima kasih
Find all posts by this user
Quote this message in a reply
01-10-2013, 12:26 AM
Post: #4
PutraVB Offline
./Devilz 1st Cadet
Posts: 2
Joined: Nov 2012
Reputation: 2
RE: PictureBox
(01-09-2013 06:58 PM)kenta Wrote:  ada 1 picturebox dengan 1 button pada form ,
kk mau tanya fungsi code ni apa?belajar
pada code button :
PictureBox1.Image = Image.FromFile(Application .StartupPath.Tostring &"\Smile\"& CStr(Int(Rnd()*12) & ".gif")
Beep()

tolong penjelasan untuk fungsi dari tiap kode tersebut, tolong pencerahan nya terimakasih ngambek

Yang jelas itu mengambil File gambar acak yang ada di folder Application .StartupPath.Tostring & "\Smile\"

Di folder tersebut terdapat banyak gambar, dimana tiap nama file gambar berupa angka, semisal "0.gif", "1.gif", "2.gif" s/d "12.gif"

Terakhir kode ini "CStr(Int(Rnd()*12)", digunakan untuk memberikan output yang tidak tetap / acak berupa angka, dengan jangkauan antara angka 0 s/d angka 12.
Find all posts by this user
Quote this message in a reply
 Reputed by :  nanda(+1)
01-10-2013, 03:30 AM (This post was last modified: 01-10-2013 03:33 AM by RUD1.)
Post: #5
RUD1 Offline
./Devilz Advisor
Posts: 550
Joined: Jan 2012
Reputation: 169
RE: PictureBox
Rnd = Acak angka.

Int = konversi angka ke bilangan bulat positif.

Cstr = konversi angka ke string karena alamat file harus berjenis string.

Beep = panggil suara.
Find all posts by this user
Quote this message in a reply
01-10-2013, 05:11 PM
Post: #6
bot_kaskus Offline
./Devilz 1st Cadet
Posts: 2
Joined: Jan 2013
Reputation: 0
RE: PictureBox
Rnd() << random ?
Find all posts by this user
Quote this message in a reply
01-13-2013, 06:14 AM
Post: #7
kenta Offline
./Devilz 1st Cadet
Posts: 43
Joined: Jul 2012
Reputation: 0
RE: PictureBox
ok,makasih banyak untuk ilmunya kk
belajar
Find all posts by this user
Quote this message in a reply
01-28-2013, 08:25 PM (This post was last modified: 01-28-2013 08:26 PM by Faizal97.)
Post: #8
Faizal97 Offline
./Devilz Officer
Posts: 51
Joined: Sep 2012
Reputation: 4
RE: PictureBox
itu mgkn Buat Nge Load Gambar Atau Picture Yg Berada di Satu Folder yg Bernama Smile Tp Belakangnya Ngacak bisa.... Smile1, Smile10. Smile 8, dll... Menurut ane sih gtu...

klo CStr Nya kan Biar Hasil Random(RND) nya itu Dibaca Sbg String, Bukan integer... Pendapat Ane sih gtu

intinya itu buat munculin Gambar Smile1 S/d Smile 12 Dgn Acak Menurut ane.....
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-25-2013, 10:25 AM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE