CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10

Threaded View

  1. #10
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: How to set values for textboxes that is not visible

    If your data were only this big:

    axx.Text = Sin(angle.Text * converter)
    ayx.Text = Round(Cos(angle.Text * converter), 2)
    azx.Text = Round(Cos(angle.Text * converter), 2)
    ac1.Text = 0
    axy.Text = Round(Cos(angle.Text * converter), 2)
    ayy.Text = Round(Cos(angle.Text * converter), 2)
    azy.Text = Sin(angle.Text * converter)
    ac2.Text = 0


    Looks like you have 4 erlements in the array, and in this case, 2 items.
    While you can store a 2-dimensional array both ways, it's better to declare it the way it's going to be used.

    In this case:
    Code:
    Dim txt(1,3) as String ' arrays start with (0,0)
    So, a loop thru:
    Code:
    Dim r as Integer, c a Integer
    for r = 0 to Ubound(txt,1) - 1
      for c = 0 to Ubound(txt,2) - 1
        msgbox(txt(r,c))
      next c
    next r
    Last edited by dglienna; March 6th, 2010 at 05:59 PM.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured