473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Need help with random picture array VB6

swatmajor1
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 "Picsolution". What I want it to do is have random picture boxes in the array "PicQuestion" equal the matching picture boxes in the "Picsolution" Array.

If anyone can help me it would be very Appreciated.

Swatmajor1

PS please ignore any bad spelling
Oct 19 '06 #1
2 2742
willakawill
1,646 1GB
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 "Picsolution". What I want it to do is have random picture boxes in the array "PicQuestion" equal the matching picture boxes in the "Picsolution" 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
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
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...
2
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...
4
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...
3
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...
4
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...
3
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...
4
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...
1
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...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.