473,626 Members | 3,093 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help with random picture array VB6

swatmajor1
40 New Member
I have been creating a basic sodoku game as a school assignment. Basically to load a puzzle, a pre-set arrangment of numbers are loaded into a hidden picture box array called "Picsolutio n". What I want it to do is have random picture boxes in the array "PicQuestio n" equal the matching picture boxes in the "Picsolutio n" Array.

If anyone can help me it would be very Appreciated.

Swatmajor1

PS please ignore any bad spelling
Oct 19 '06 #1
2 2748
willakawill
1,646 Top Contributor
I have been creating a basic sodoku game as a school assignment. Basically to load a puzzle, a pre-set arrangment of numbers are loaded into a hidden picture box array called "Picsolutio n". What I want it to do is have random picture boxes in the array "PicQuestio n" equal the matching picture boxes in the "Picsolutio n" Array.

If anyone can help me it would be very Appreciated.

Swatmajor1

PS please ignore any bad spelling
Sounds like you are asking for an entire solution rather than assistance to get through where you are stuck. Can you post some code and tell us where you are stuck?
Oct 19 '06 #2
swatmajor1
40 New Member
Never mind i used a Label, as shown in the code below

Expand|Select|Wrap|Line Numbers
  1. Public Sub Random()
  2.     Do Until lblReveal.Caption = 50
  3.         Index = Int(Rnd * 80) - 5
  4.         If Index < 0 Then Index = 0                                 'If the value of Index is less than 0 then sets index value to 0
  5.         If Index > 80 Then Index = 80                               'If the value of Index is greater than 80 then sets index value to 80
  6.         PicQuestion(Index).Picture = picSolusion(Index).Picture     'sets PicQuestion picturebox to the corresponding PicSolusion Picture box
  7.         lblReveal.Caption = lblReveal.Caption + 1
  8.     Loop
  9.     If lblReveal.Caption = 50 Then lblReveal.Caption = 0
  10. End Sub
  11.  
Thanks anyway

Swatmajor1
Oct 21 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
1631
by: has | last post by:
<BLUSH> Careless talk costs lives, as they say. In my case, a throwaway comment that Python could trounce the notoriously underpowered and undersupported AppleScript language for "serious number crunching". (And Perl could beat Python, and Fortran could kick all their butts, etc...) Well, you'd think me and the other guy would be old enough to know better, or at least have more important things to do, but nooooo... Ah well, too late...
2
5086
by: and | last post by:
Hi I have been validating all day most things are cool but I cant get by this problem. One I have listed the script (JAVASCRIPT ) in all the right placesnot a prob but the validator insists on going through t findind < (less than) in the code. why is it going through the script the scripts been tagged correctly? Also in the body where the link to the script is there is a table givng
4
16766
by: Phillo | last post by:
Hello, I'm new at Javascript, and have written a script for a series of random roll-over button images, but one thing I would like to add is a function that checks to make sure that there are no duplicates in the randomly generated variables that choose the pictures. Can anyone give me a hand with this? One other thing I can't seem to figure out is how to manage the "onLoad" aspect of caching my roll-over images (DW has locked the...
3
6064
by: VenuGopal | last post by:
hi, i have a WELCOME screen. here i have a PICTURE BOX. there are 8 pictures that go into this Picture Box. At every 5 seconds i want to RANDOMLY load a new Picture. this is what i am using but it is not loading the new picture. Can any one help? public void Presentation_Load(object sender, System.EventArgs e)
4
1633
by: UMstudent | last post by:
I'm working on this program for class where I have to an amount of numbers that are randomly picked from 0 - 50. So what I have done is say there are 20 slots in my array so I'm trying to generator 20 random numbers for the array between 0-50 however I've ran into a few problems. Mainly figuring out how to make it print 20 seperate completely random numbers into the array. So here is what I have any help will be greatly appreciated. Thank you. ...
3
1562
tpgames
by: tpgames | last post by:
2x2 Sudoku doesn't work at all. The images don't show up on the grid. I don't understand JavaScript very well. Just learning it. Thanks! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Sudoku 9</title> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link type="text/css" rel="stylesheet" href="http://www.tpgames.net/gaming/2/game.css">
4
2966
toxicpaint
by: toxicpaint | last post by:
Hi, can anyone give me a hand. I'm currently displaying 4 random images at the top of a page. I did this using an array of 35 pictures and then writing them to page. The problem I have is that in theory you could get the same image 4 times. I quite often get 2 of the same picture come up. What's the easiest way of saying "once an image is assigned to a variable, take it out of the array"? Here's my code so far.. images = new Array(34);...
1
2089
by: javabeginner123 | last post by:
i have a java prob, and i have to solve it fast, but i'm just getting to know it, so plz help me solve it with full code completed, thanks so much. the prob is to create a monter fight and there is the description: The monsters are of a very strange kind, called "Bigmon". They have some basic characteristics, like attack and defense power, life points, a name, and a bonus factor that is used in special occasions. In this initial phase of the...
4
3170
by: hollywoood69 | last post by:
Hi I have an assignment to create a random array to store pictures. Each time that you click on one of the buttons in the header a new picture will appear. I know how to set up an array, and i also know how to setup up a random array. From what i understand an array is for data, so how do i store a picture in it. I don't know if this is making any sense, but my instructor isn't helping much either. Just a push in the right direction could...
0
8259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8192
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8696
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8637
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7188
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5571
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4195
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1504
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.