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

Thread: Visual Basic

  1. #1
    Join Date
    Jun 2001
    Location
    India
    Posts
    1

    Visual Basic

    1. I was using different controls on my form with the same prefix & are in a sequence. For example the components are like TextField1, TextField2, TextField3.... There are about 100 components in the entire application. Those are text & combo boxes.
    When I wanted to set the properties of the objects using an iterative loop, I was using it as

    For i = 1 to 100
    TextField & i & ".text" = "Field " & i
    Next i

    This was not giving me the required result. But I want the loop to perform like
    TextField1 = "Field 1"
    TextField2 = "Field 2"
    TextField3 = "Field 3".....

    Please help me to get the desired result.

    2. How can I connect to MS Access Database from a html file on a local system, without any servers running ?

    3. I want to use ASPs for my Intranet Application Development. Can I use Personal Web Server for the Commercial purpose?

    4. Are there any ActiveX Controls in Visual Basic which can provide me flexible Date Entry & Validation? I tried DTPicker & MaskEditBox, but I wanna more flexible thing to get my things done?

    5. Using Visual Basic, how can I control the Display Properties of the Desktop Panel? What APIs can I use to get the things done?


  2. #2
    Join Date
    Mar 2000
    Location
    Arizona, USA
    Posts
    493

    Re: Visual Basic

    Why not use control arrays instead?

    private Sub SetText ()
    Dim i as Integer

    on error resume next

    i=0
    for i = 0 to 100
    TextField(i).Text = "Field " & i
    next i

    End Sub





    Kris
    Software Engineer
    Phoenix,AZ
    Kris
    Software Engineer
    Phoenix, AZ USA

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