home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / mswindo / programm / tools / 1944 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.7 KB  |  41 lines

  1. Newsgroups: comp.os.ms-windows.programmer.tools
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!gatech!usenet.ins.cwru.edu!news.ysu.edu!do-not-reply-to-path
  3. From: af734@yfn.ysu.edu (Andy Klein)
  4. Subject: Visual Basic Win 2.0
  5. Message-ID: <1993Jan8.223222.16819@news.ysu.edu>
  6. Sender: news@news.ysu.edu (Usenet News Admin)
  7. Nntp-Posting-Host: yfn.ysu.edu
  8. Organization: Youngstown State University/Youngstown Free-Net
  9. Date: Fri, 8 Jan 1993 22:32:22 GMT
  10. Lines: 29
  11.  
  12.  
  13.      I'm using Visual BASIC Standard Edition v2.0 and I've run into
  14. the following dilemma.  I'm trying to create an array of string by
  15. concatenating two other values together, but would like the two
  16. columns of data to each be left justified.  However, the font that
  17. I am using contains letters of different widths.  For instance,
  18. assume an array of strings called Names$() and an array of integers
  19. called Num%() contain the following made-up data:
  20.  
  21.      Names$(1) = "Samuel"          Num%(1) = 15
  22.      Names$(2) = "Richard"         Num%(2) = 3
  23.      Names$(3) = "Al"              Num%(3) = 221
  24.      Names$(4) = "James"           Num%(4) = 54
  25.      Names$(5) = "Bob"             Num%(5) = 11
  26.  
  27. I would then like to create a second string array called Results$()
  28. that contained the following:
  29.  
  30.      Results$(1) = "Samuel   15"
  31.      Results$(2) = "Richard  3"
  32.      Results$(3) = "Al       221"
  33.      Results$(4) = "James    54"
  34.      Results$(5) = "Bob      11"
  35.  
  36. My problem is that since the characters in MS-Windows aren't all
  37. the same pixel width, the column of numbers is not vertically lined
  38. up correctly when I print the results.  Is there a way to get the
  39. second column of numbers to be lined up?  Thanks,
  40. Andy Klein
  41.