Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Arrays And List Boxes, VB6 Codes needed
tobimichigan
post Jun 21 2008, 12:22 PM
Post #1


Newbie
*

Group: Members
Posts: 2
Joined: 21-June 08
Member No.: 63,946



Hello Guys,

I am working on an application. It is such that there are 2 list boxes or combo boxes. One is Labeled Departure and the other is labeled Destination. The boxes contain various states in America and each state has its unique feature of distances. The difference of the distances has to be reflected on a label.
Where I need help is a code to execute the contents of the array into values For instance:

Option Explicit

Private Type Stateinfo
statedeparture as integer
stateDestination as integer
TotalDistance as integer
End Type
Dim StateDistance (10, 20) as stateinfo

How do I code the list-boxes to display the Form_Load values in a label?
Hope to hear from you soon.
TM
Go to the top of the page
 
+Quote Post
Galahad
post Jun 21 2008, 07:15 PM
Post #2


Neurotical Squirrel
*********

Group: [HOSTED]
Posts: 590
Joined: 4-November 04
From: Novi Sad, Vojvodina
Member No.: 2,127



Ok, you're going to have to be much clearer than this...

If I understand you correctly, you want a certain label to show distance between two destinations? The easiest way would be to have the distances encoded in a matrix, and just pull the stiff from it... For example, distance between state 1 and state 8 is 100.... So, array Distances(1,8) = 100.... And so on... Get the idea?

I just assumed this is what you want, if not, explain a little further and maybe I'll be able to help...
Go to the top of the page
 
+Quote Post
minimcmonkey
post Jun 23 2008, 09:05 PM
Post #3


Super Member
*********

Group: [HOSTED]
Posts: 223
Joined: 19-June 08
From: United Kingdom - Cornwall!!!!!
Member No.: 63,876



I havent done a lot of VB recently, but i use to use it a lot.
I would recoment for a smaller list, just have a list of distances between each desination, and departure.
you should probably plan that out first, by making a table like

# 1 2 3
_____
1|0 2 7
2|2 0 9
3|7 9 0




- some of the maths might not work in that above - i wasnt really thinking.

If there are lots of locations, you might have to use a graphical or grid appoach - i have never really used that before, so im not sure how you would do it. But just a list of distances would be the easiest method by far!

This post has been edited by minimcmonkey: Jun 23 2008, 09:08 PM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Good Freeware List(6)
  2. List Of Free Games(10)
  3. Telemarketing Block List - Canada(1)
  4. Free Classified Ads--no Hype(6)
  5. ---> Ftp Error Codes What They Mean <---(4)
  6. Flash Action Scripting Help Needed(6)
  7. A List Of Great Movies!(162)
  8. Css Menu -- A Little Help Needed(5)
  9. We Need More Members At Ipbgaming.com(29)
  10. Creating A Shortcut List Near The System Tray(4)
  11. Password Protecting My Webpage(3)
  12. Data Structures -- Linked List(9)
  13. Text Size In "fill-in" Form Blanks(2)
  14. Data Structures -- Linked List -- Reverse(5)
  15. Logging Into Cpanel [resolved](13)
  1. Web Surfing- Script Needed(2)
  2. Help Needed With Excel Formulas(5)
  3. Top 10 Geek Ways To Beat Boredom(12)
  4. Sony Handycam(15)
  5. Delphi & Assembly Forum(2)
  6. Visual Basic 6.0 Help Needed(15)
  7. Help Needed: Rewritting Uris From .htaccess(0)
  8. Free Sms Site(5)
  9. Ameran Portals?(1)
  10. Database Or Pdf(3)
  11. Postage Costs Problem For My Website(7)
  12. A List Of Animals And Their Meaning(1)
  13. Need Cheat Codes(36)
  14. Please Can You Review My Blog(3)
  15. Should I Call Him(28)


 



- Lo-Fi Version Time is now: 7th October 2008 - 06:36 AM