Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help With Visual Basic Coding Issue

    Hi Basicly i have A Few Comboboxs that When i Click a button the selected item in each of the combo boxes will will appear as text in a textbox like this:

    (.....[combobox1.selecteditem] [space] [combobox2.selecteditem] [space] [combobox3.selecteditem]....)

    I have made attempts as i am new to programming i could not seem to figure this out if anyone understands what im talking about please feel free to provide some guidance:

    My attempt please tell me where im going wrong or what i need to add thanks

    Code:
        If Timer1.Interval = 100 Then
                txtDrop.Text = cmbMonster.SelectedItem
                SendKeys.Send("{tab}")
                SendKeys.Send(cmbCharms.SelectedItem.ToString(txtDrop.Text))
                End If

  • #2
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    6
    Thanks
    1
    Thanked 1 Time in 1 Post
    vbtab is the tab character:
    Code:
    If Timer1.Interval = 100 Then
                txtDrop.Text = cmbMonster.SelectedItem & vbtab
                End If
    Just use the & character to build the txtDrop.Text value.

    There are other vb characters, like vbcrlf (carriage return linefeed, for next line) so you don't have to emulate keypresses.


  •  

    Posting Permissions

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