VorTechz Studios
Please login to access the forums + other content
VorTechz Studios
Please login to access the forums + other content
VorTechz Studios
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Programming forums, we love to do VB, HTML, Java, +more
 
HomeSearchLatest imagesRegisterLog in
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» My HTML Site / Project
{Tut.1.1}(Schylar's Visual Basic Guide) EmptyTue Apr 10, 2012 5:28 pm by Limes

» Hey guys, This is Admin | BringTheRain | Jordan!
{Tut.1.1}(Schylar's Visual Basic Guide) EmptyTue Apr 10, 2012 11:16 am by VorTechzStudios

» New Ranks And Badges
{Tut.1.1}(Schylar's Visual Basic Guide) EmptyTue Apr 10, 2012 12:56 am by Admin

» VTS Spammer, Help Center |Post Here|
{Tut.1.1}(Schylar's Visual Basic Guide) EmptyMon Apr 09, 2012 9:24 pm by Admin

» {Tut1.0}(Schylar's Fifa Long Goal Guide)
{Tut.1.1}(Schylar's Visual Basic Guide) EmptyMon Apr 09, 2012 7:12 pm by Werdwed

» Site Staff
{Tut.1.1}(Schylar's Visual Basic Guide) EmptyMon Apr 09, 2012 3:15 pm by VorTechzStudios

» Graphics Moderator {VzCre8}
{Tut.1.1}(Schylar's Visual Basic Guide) EmptyMon Apr 09, 2012 9:18 am by VzCre8

» Call of duty 4.5.6.7.8 Modded lobby rules (read or face the consequences)
{Tut.1.1}(Schylar's Visual Basic Guide) EmptyMon Apr 09, 2012 8:35 am by XeX

» Forum Rules
{Tut.1.1}(Schylar's Visual Basic Guide) EmptyMon Apr 09, 2012 7:59 am by VorTechzStudios

May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendarCalendar
Affiliates
free forum

Similar topics

 

 {Tut.1.1}(Schylar's Visual Basic Guide)

Go down 
AuthorMessage
Werdwed
Sectional Moderator
Sectional Moderator



Posts : 4
Join date : 2012-04-08

{Tut.1.1}(Schylar's Visual Basic Guide) Empty
PostSubject: {Tut.1.1}(Schylar's Visual Basic Guide)   {Tut.1.1}(Schylar's Visual Basic Guide) EmptySun Apr 08, 2012 11:38 pm

Okay Assuming you have read my first post im going to start where i left off. Even though i like using rnd function i am going to use the
Dim rand as new rand
This Subtopic is about random pictures, when learning vb one of my very first projects was a call of duty modern warfare 3 infected mini game random gun generator (i know try putting that in the title) Any way it actually took me a day or to to find how to do this. Fortunately i remember and im going to show you.
lets start out with what you need

Dim rand as new random
Dim intpic
Now manually make a picture box or just code it in which ever you prefer i do it manually.
Now make a button
Now make a imagelist (with multi pics){nameing them makes code cleaner}
In the button1 events you will need to
type

intpic = rand.next(0, # of picures u have)
picturebox1.image = imagelist.images(intpic)
To Give an example
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim intpic
Dim rand As New Random
intpic = rand.Next(0, 4)
PictureBox1.Image = ImageList1.Images(intpic)
End Sub
End Class

This has been another hopefully helpful topic. afro
--
Genius = Majestic Falcon + Werdwed

Serials.Guro:D

Need a Serial? Hit me up
Back to top Go down
 
{Tut.1.1}(Schylar's Visual Basic Guide)
Back to top 
Page 1 of 1
 Similar topics
-
»  {Tut.1}(Schylar's Visual Basic Guide)
» {Tut1.0}(Schylar's Fifa Long Goal Guide)

Permissions in this forum:You cannot reply to topics in this forum
VorTechz Studios :: Programming Lounge :: VB-
Jump to: