Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Web Control, List Boxes, Text Boxes, Please Help This Is Winding Me Up!


Hi guys i need some help with the webcontrol function in VB6

Part of my program needs to put listbox data from the program into a text box on the web and then click a submit button...

The list box i have has a list of multiple directories in (for the location of my files), from there i just want the program to put the top directory of the list box into a text box on the web and click a submit button on the web (its for uploading a queue of files), then after that has finished uploading, do the next directory in the list box... etc

It sounds pretty simple but i have no idea how to do it...

Thanks for any help you can give me, i will write a really good review about you and good rating etc.

Any knowledge of this would be greatly appreciated

thanks a bunch

toodle pipples

Alex




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
All Things In Form Text Boxes List Boxes...Saving
Is the a command thats save every thing that is changed changed in form ...all text boxes all list boxes ...everything that has changed

Combo And List Boxes To Text Boxes?
Connecting sub-menus to rich text boxes is fine is most cases but the user does not always want to use menus to load and display text. Applying the same technique as sub menus to text boxes with combo or list boxes just wont work could someone please help me out with this one.

Both combo and list boxes will for example:

Contain an alphabetic list.
When the user clicks on a file it should locate the text file from the drive.
It should then open it into a rich text box on the same form.

Could this be possible?

Please any help will greatly be appreciated.

List Boxes And Text Boxes
Ok i have a list box that has a list of movies to choose from then you choose how many tickets you want i want to know how to display them in a text box and how to clear the dat file that i saved it in

List Boxes And Text Boxes
I have a list box with a bunch of items in it. I'm trying to make it so that when you click on an item in a list, the text appears in a text box. I don't know too much.. but what I have so far is

Private Sub List1_Click()
Dim i As Integer
Text1.Text = List1.List(i)
End Sub

What this does is when I click an item, it makes the text of the textbox the first item in the list. How do I change it so that I can pick an item from the list and have the text of that item displayed in the text box? Thanks in advance!

List Boxes = Text Boxes
Hi I'm new here (and to VB). I'm using VB in Excel and trying to get a list box to write to a series of three text boxes. I have a mobile phone user form and the list box has a selection of phones in it. I want the user to be able to choose three phones from the same list box and have the results display - one in each box. Can I do this and, if so, how?

Add Text To Text Boxes Like List Boxes
ill explain this the best i can i want the user to type in some text then click "Add" and the text will be added to a textbox i know you can do this alot easyier with list boxes with the .AddItem but how would i do it so far if got this


VB Code:
Text1.Text = "" & Text2.Text


But as you notice it just overwrites the text allready in the box and doesnt ass it

How To Get My List In Several Text Boxes
in my project i get my list in a list box
bt i want to get my list in different textbox

heres the code

Dim roomString As String
Dim roomData As String
Dim roomDataHex As String
roomData = Left(strData, 3)
roomDataHex = HextoAscii("02 02 C4")
If roomData = roomDataHex Then Text1.Text = strData

Dim dataUser As String
Dim rstring() As String
Dim a As Integer

If Len(Text1) > 27 Then
dataUser = Mid(Text1, 16, Len(Text1) - (Len(Room.Text) + 21))
rstring = Split(dataUser, ";")

Dim values As Variant

List1.Clear
values = rstring
For a = LBound(values) To UBound(values)
List1.AddItem values(a)
Next a
End If

please help me..

Text && List Boxes
Hey there everyone, by viewing the image below you can see a screen of the GUI of my application, basically im making a little something to make my life a bit easier.. I would like the text from text boxes 1, 2 and 3 to be listed in the listbox when a command button is clicked, however i dont want the text to appear in the list box like Text1Text2Text3 as i would prefer the words to be divided by spaces or a symbol.. Refer to the image for more in-depth information. Help is more than appreciated.

Text And List Boxes
Howdy All

My question is how do you scroll down a text box in code? and how to you highlight an item in a listbox and then scroll down to the next one and highlight that so you can sort of check a listboxes content line by line.

thanx

------------------
Mooose

Can You Have Multiple Colours In Text Boxes, Or Richtext Boxes(etc)?
Is there anyway you can have each word in a text box a different colour? Like:

[RED] My Name [/RED]
[BLUE] What's up! [/BLUE]

or something similar?

I don't care if you can't do it in a text box but is there anyway to do it in any type of "text box"?

If sub classing is involved could you please point me to a tutorial?


Thanks a lot.

Combo Boxes Or List Boxes?????
A bit of a beginners question. Hope it makes sense

I dont know which is the best to use. Here is the problem:

I want some kind of drop down list that allows the user to pick one of 12 items. Then that item is linked to a set of numbers. For e.g. if user chooses the item "A" then this means the numbers 0.025689 and 0.85696 is linked to each. Now do i use a combo or a list item or something else.

In addition what kind of code do you use to enter new items in a combo box or list item box. I tried to use:

ComboBox1.AddItem "A"
ComboBox1.AddItem "B"

within the combo box private sub - but when i play it back the combo box is empty. Any ideas???

Thanks

List Boxes Vs Check Boxes
How much harder are List boxes to program compared to Check boxes?

DataList Boxes Vs. List Boxes
OK - I currently have a DataList box which displays all of my records using the "List Field" Property. I need to enable a multiselect feature though. So I decided to use the REGULAR List Box, since it has a multiselect property. Yet, I cant seem to get the list box to have all of the records in there (or any of them for that matter). Is there a similar property in regular list boxes like the "List Field" Property, or is there a similar property in DataList Boxes which can enable multiselect?

Someone help!

Text Files && List Boxes
i know someone will probably laugh and solve this with 3 lines of code, but i have to ask because it's bugging me.

I have a listbox which i want to use as a favourites section. I also have a text file which contains ip addresses, each one on a new line. I have the script to write to the file to add new "favourites" however i need a piece of code to read each line of the text file, then show each one in the list box.

i have all the rest sorted (the double click script to load the game etc, the favourites are for counterstrike btw) but i just need this code to read the file and create the list

thanks in advance

{EDIT}

found the code i needed guys, thanks to anyone who looked anyway

Text Bolding And List Boxes
Hello again all. I have a very interesting question. Is it possible to bold or change font colors for text segments in a listbox? (i.e. Listbox1 has the following item in it:
11/19 - Test Data) I would either like to bold or change the font color of the date only. Is that possible? Thanx

List Boxes .Text Property
I was planning on changing the text in listboxes using:

ListBox.Text = "new text"

...but yeah that didn't work.

Is possible to change the text of an item in the listbox once it has been added or change their indexes without rebuilding the listbox?

List Boxes && Text Files
I am making an MP3 player and am storing the playlist in a txt file.
When the app loads I need it to go through the file and add an entry into List1 when it reaches a line break, so the list box contains what the the txt file contains, with a new entry for each line.

Any one know how?

List Boxes Text Formatting
Thanks Mathew for your help on previous query!

If I'm transferring items from list to list, as in a questionnaire, and say listbox2 has category "Height", when you click on that listbox 3 allows selecting say "tall" and list box4 is where the final selections are listed. How can I have the text "Height:" waiting or appearing in listbox4 so that when the user selects tall it appears in listbox 4 as Height: Tall, and so on for weight, age etc...

Detecting Same Text In List Boxes
i have this problem: i made a chat program (like IRC) and its supposed to show everyone's names (whoever is online) in a listbox called lstName. and i'm wondering how i could detect if a name has been added to the list that already exists, it would be automaticaly deleted. this problem has been driving me insane!

Aligning Text In List Boxes
Just a quickie, how can i centre the text in my list boxes? does it need coding or is there an option somewhere?

cheers, pk



Edited by - kilgour on 3/9/2004 3:36:48 PM

HOW ADD CHECK BOXES AND TEXT BOXES IN FLEXGRID
Hi,

i use flexgrid for data entry. i want to add text boxes in column and check boxes in another column. how to add this .

help me.
thanks in advance
bye.

Reading From An XML Into Various Text Boxes And A Combo List
HI, I've done lots of searching in the forum and others trying to find a solution to my problem but I can't seem to grasp the logic or find a suitable example. Just wondered if someone could help.

My program loads and is passed an xml file automatically, the structure is something like this

<customer>
<dob>08/08/1990</dob>
<sex>Female</sex>
<forename>Sally</forename>
<surname>SMITH</surname>
<custom_id>12345</custom_id>
<address>
<housename>The Cottage</housename>
<housenumber>20</housenumber>
<roadname>Harrow Road</roadname>
<locality>coleswood</locality>
<county>W yorkshire</county>
<postcode>LT12 3NQ</postcode>
</address>
<books><book><isdn>1234</isdn><author>D. SMITH</author><issuedate>21.11.2006</issuedate></book><book><isdn>3456></isdn><author>E. JONES</author><issuedate>17.10.2006</issuedate></book></books>

etc

My problem is how do I assign each entry to a text box, i.e. txtDOB.Text=08/08/1990
txtForename.Text=Sally
etc
and also when it gets to the <books> section I want to be able to put each entry into a list, this one can be variable, it could have one or two books or as many as a hundred.

I would appreciate an example as the ones I've seen don't really cover what I want to do, or more likely I'm missing what I'm supposed to be doing.

Greatly appreciate any help / advice, many thanks

Adding Multiple Text Boxes To A List
im lost with this..
basically what i have is 4 text boxes that im trying to add to a list depending on if they have text in them or not..


Code:
If Text1.text = "" Or Text2.text = "" Then
MsgBox ("you must provide a question/answer!")
Exit Sub
ElseIf Len(Text1.text & Text2.text & Text3.text & Text4.text) > 0 Then
List1.AddItem (Text1.text) & ":" & (Text2.text) & ":" & (Text3.text) & ":" & (Text4.text)
ElseIf Text3.text = "" Then
List1.AddItem (Text1.text) & ":" & (Text2.text) & ":" & (Text4.text)
ElseIf Text3.text = "" And Text4.text = "" Then
List1.AddItem (Text1.text) & ":" & (Text2.text)
End If
so what its saying is first, if all the text boxes have data, add them all. that works fine
the next lines are, if theres no text in the text3, then just add 1,2, and 4 etc..
the problem with this is, if theres not text in text3, it still adds the ":"
what i get is this in my list
cow:dog::cat
the problem is the same with all the other if's. im sure this is confusing.. cuz im confused writting it, but it was worth a shot

Saving Text For List/combo Boxes
I'm still having trouble with something, i need to save simple words to a file, not a type or nethin like that, just a list of words

how do i do that...also its for later use to load the words into a combo or list, how would i make it so that was possible?

im stuck! ¬_¬

Xtrava

Split Text- Then Place Into Two List Boxes
Hi,
I am looking for an answer on the following:

I have in List Box(lstTrolley) for example "pears $0.50". I would like to place(by clicking once) "pears" into List Box(lstProduct) and "$0.50" into List Box(lstPrice).

Thanks a million for your help
Andonny

Problems Clearing Text And List Boxes
I had to make a code for a form. I included a CLEAR button to clear everything in the form. But for some reason I am getting an error. Its the "invalid procedure call or arguement". it highlights a line of code that i used to seperate the first and last names that were loaded into a listbox from a text file. this is the line of code that is highlighted. let me know if you all need a different part of my code.


Code:
'show first name
strTemp = lstEmployees.Text
intSpacePos = InStr(1, strTemp, " ")
strFirstName = Left(strTemp, intSpacePos - 1)


Anyone have any ideas?

List Boxes: Text On Left, Numbers On Right, But On Same Row
I have a list box with strings and numbers, i want to know if its possible to have the string part alligned on the left and the numbers on the right side of the list box. I used:

list.AddItem "string: " & variableamount

i used a TAB space after the : to try to set all the numbers, but they are always a few spaces off. But if i can put the numbers against the right side of the box, it will look better anyway. Well thanks.
Red

Chaning Text Attributes In List Boxes
Is there a way to change the colour and style of text in a lost box indipendantly from the other items in the box? So you could have....

ITEM 1
ITEM 2
ITEM 3
ITEM 4

... ?

Grabbing Text, Scrolling Down List Boxes
Hi,

I want code or help with a few things, Firstly.

Whats the API to click a button a specific window(I have the windows handle, and i want to click a button on that window, its a text button if that makes a difference).

Next i want to scroll through a list box and then grab text from the text box below it. I can grab the text from the text box but i'm having trouble coding API to scroll through (down) a list box.

Thanks.

[02/03] List Box Selection Not Populating Text Boxes
I have a customer form that has several text boxes and a list box. When the user fills out the customer information and clicks the save button the customer name gets added to the list box. So if there are 3 customer names in the list box and the user selects the first line, the last line added shows up. I have my text boxes saved to a class and then pulling from an array when selecting from the list box. Can anyone look at some of my code to see if my logic is wrong?

'Global Variable - customerclass is the class name
Dim CustArray(5) As CustomerClass

'Save button - saves to class then adds to the list box
Customer.CustID = Integer.Parse(txtCustNum.text)
Customer.LName = txtLastName.text
Customer.FName = txtFirstName.text
Customer.CustStreet = txtStreet.text

lstCustomer.Items.Add(Customer.FName & " " & Customer.LName)
CustArray(lstCustomer.Items.Count) = Customer

'CustFields Procedure to populate the txtbxs when item in list box is selected
txtCustNum.Text = Customer.CustID
txtLastName.Text = Customer.LName
txtFirstName.Text = Customer.FName
txtStreet.Text = Customer.CustStreet

'Find button
If lstCustomer.SelectedIndex = -1 Then
MessageBox.Show("Blah, Blah, Blah") Exit Sub
End If
Customer = CustArray(lstCustomer.SelectedIndex)
CustFields()

Filtering A Text File To List Boxes
Hey,
i need some help with a VB project,

2 list boxes and a text file with all of the peoples names in them, they also have small codes next to them for example, 12Y7 and 43G2

i need to filter the text file so it puts all the codes with Y into one list and the ones with G into the other, with the names they are saved with


i'm not sure if that makes much sence

thanks

Populate Text Boxes From List Box - RESOLVED
Hi all,

I have a list box which displays information from an Access DB. I want to be able to click on an item in the list box and have information corresponding to my choice pulled from the DB and displayed in the text boxes.

Really haev no clue how to do this and any help would be greatly appreciated!

Heres code for my list box:


VB Code:
Private Sub cmdSearchNow_Click()Srch = txtSearchgcomDentware.CommandText = "SELECT Patient_ID, Surname, First_Name, Address FROM tblPatient_Details WHERE Surname like '" & Srch & "%' ORDER BY Surname ASC"Set grsDentware = gcomDentware.Execute If (Not grsDentware.EOF) Then    'If there are drug names in the table then call fill list box in module code      'lblID.Caption = grsDentware!Patient_ID      Call Fill_ListBox(lstNames, "FNameSurnameAdd")      txtSearch = ""   Else      MsgBox "There are no clients in the DB with that name", vbExclamation    'If the specified field is blank then show this message   End If   grsDentware.Close End Sub  Public Sub Fill_ListBox(ListBox As ListBox, Field As String)If (Field = "FNameSurnameAdd") Then         FNameSurname = grsDentware!First_Name & " " & grsDentware!Surname & " - " & grsDentware!Address         ListBox.AddItem FNameSurnameEnd Sub

Disabling HTML In Text/list Boxes
Is there a way to hide HTML code in a list box? Look at the pic.

I dont want the html to be there, just the message.

List Boxes And Filtering Using Text Box Criteria
Hope someone out there can help me. I have a database and have created a form that has a List box that is populated by 4 columns from a database table. I used the wizard to do this. There approximately 250 records.

What I’d like to do is have a Search Button on the form and a Text Box that the user can enter search criteria into.

The idea being that the Search Button is pressed and the records are filtered using the search criteria.

The user should then click on a result to open up further detail in another form (that bit I’ve achieved).

I have been completely unsuccessful in achieving the search.

Form = FrmSearch
List = lstBox
Command Button = cmdSearch
Text Box = txtSearch

Be grateful for any tips or code anyone can suggest.

Linking List Box To Text Boxes With ADO Controls
We are struggling with data list boxes. We are trying to have the data in selected text boxes change to the current record source when a particular item is selected from a list box.

We are using the Biblio Database that comes the VB6 to prove it out. We have created a ADO connection and have the Titles as a list box and when we select a particular title we are trying to have 3 text boxes, (ISBN, Comments, Year Publilshed) update to the data associated with the selected title in the list box.

Any help would be greatly appreciated

Sean Gearin
sgearin@modicon.com
978 975-9348

Thanks in advance

DBGrid Control: How To Create Different List Boxes Using Different Cells?
At the moment i am using DBGrid control. Here R means Row and C means Column. i should be able to insert Text box in R1C1 and list box in R1C2 dynamically(during the run time). In each row i have two columns. I need to create dynamically infinite number of rows and each row should contain text box and list box. I should be able to add and update the information during the run time.

My problem is i am unable to insert different attributes in each list box using DBGrid control. Do you have any ideas you can through? please advise me.

regards,
Vijay.

Output Of 2 Text Files Stored In List Boxes
Morning to all...this is a homeowrk problem. I'm looking for some help involving two text files that are loaded into list boxes at run-time. When the user clicks the button, a female name and a male name from each list box should output to a picture box. I have the program working for the first set of names, but nothing more will print out. I'm sorry if my code is sloppy, we haven't gone over using multiple text files, so I'm not sure if I'm coding this properly or not. Thanks to anyone that can help!

Private Sub cmdPairOff_Click() 'display female and male names in picture box
Dim female As String '.txt list of females
Dim male As String '.txt list of males
Dim i As Integer 'index number

female = lstWomen.ListCount
male = lstMen.ListCount
i = 0
Do While i > 0
i = i + 1

If female = "" Then
picResults.Print "There arn't any women's names left..."
Else
male = ""
picResults.Print "There arn't any men's names left..."
End If
Loop
picResults.Print lstWomen.List(i); " and "; lstMen.List(i); " are going to the dance."
End Sub

Private Sub Form_Load() 'input names from text files into list boxes
Dim women As String 'female text file names
Dim men As String 'male text file names

Open "c:CisVb98women.txt" For Input As #1
Open "c:CisVb98men.txt" For Input As #2

Do While Not EOF(1)
Input #1, women
lstWomen.AddItem women
Loop
Do While Not EOF(2)
Input #2, men
lstMen.AddItem men
Loop
Close #1
Close #2
End Sub

List View Selected Items In Text Boxes
Dear Friends,

When I select one item {because I have only one coloumn in listview } (eg: Name) from a listview which is connected to DB2.MDB (Table Name is : TB2) and displays the data from TB2, I would like all the text boxes to show all the records pertaining to the selected name. I have four fields in TB2.

What code should be written:

Reading From Two Text Files Into Different List Boxes [PROBLEM HELP PLEASE]
hi,

I have the following code and I am trying to read two different text files into two different list boxes on the form.

I cant figure out what the problem is


Option Explicit

Private Sub cmdcalculate_Click()
Dim location As String
Dim room_type As String
Dim Num_of_Nights As Integer
Dim fsp_yes As Boolean
Dim fsp_no As Boolean
Dim non_member As String
Dim txtdiscount_nights As Integer
Dim lbltotal_cost As Currency

End Sub

Private Sub cmdclearall_Click()
    txtNum_of_Nights = ""
    txtdiscount_nights = ""
    lstLocation = ""
    lstRoom_Type = ""
    lstnon_member = ""
    lbltotal_cost = ""
End Sub

Private Sub cmdExit_Click()
    End
End Sub


Private Sub form_load()

Dim f As Integer
Dim FName, batch1 As String
Dim fld As Variant

FName = App.Path + "location.Txt"
f = FreeFile
Open FName For Input As f

If EOF(1) Then
MsgBox ("The Textfile dont have the path")
Close #f
Close f
Exit Sub
End If

While Not EOF(1)
Line Input #f, batch1
   
If batch1 <> "" Then
'split the fields
fld = Split(batch1, ",")
lstLocation.AddItem fld(0)
End If
Wend

Close #f
Close f


Dim g As Integer
Dim FName1, batch2 As String
Dim fld1 As Variant

FName1 = App.Path + "
oom_type.Txt"
g = FreeFile
Open FName1 For Input As g

If EOF(1) Then
MsgBox ("The Textfile dont have the path")
Close #g
Close g
Exit Sub
End If

While Not EOF(1)
Line Input #g, batch2
   
If batch2 <> "" Then
'split the fields
fld1 = Split(batch2, ",")
lstRoom_Type.AddItem fld(0)
End If
Wend

Close #g
Close g



End Sub

Text && List Boxes Going Flat + Scrollbars Disappear
I am having a problem where some text boxes & list boxes on a VB6 form are going flat, their border is gone, and vertical scroll bars are disappearing on 2 list boxes. I have the text box Appearance and Border properties set to "1 - 3D" and "1 - Fixed Single" respectively.

This problem occurs only on 1 tab of an SStab control. If the program starts on the tab where the controls are located, they appear properly. But if I change tabs and then return, they are messed up.

Initially, I wasn't writing to the Appearance and Border properties of the text boxes. But, after this problem occurred, I added code in the SSTab1_Click event to force the Appearance and Border properties to the correct values. It had no effect.

Does anyone know of any VB6 bug or Windows 2000 bugs that could cause this?

(I am using VB6 Professional with SP5)

Thanks to anyone who can help.

Cute Little Check Boxes That Appear In List Boxes... How To Use (check/uncheck) Those With Code?
how can i set my list box up so when theres an error with some item int eh lsitbox (that the user added), the check box will select.. or deselect...

note: the checkbox style is 1 - checkbox =)

-joe

?

Reading From Two Text Files Into Different List Boxes [PROBLEM HELP PLEASE] (uploaded)
 
 
 
 
Kudiphil
(New Member)

    

 
hi,

I have the following code and I am trying to read two different text files into two different list boxes on the form.

I cant figure out what the problem is (i have not finished the project yet.)

 
 

Check Boxes And Text Boxes
Using Excel 2000...

I have two questions; one, is it possible to "lock" a text box so that a user cannot enter/change data. I have a text box that is populated within the VB code, but I don't want the user to be able to click in the text box (BTW the textbox is in a userform) and change the entry.

Second question. Is it possible to "lock" a check box once a user selects it. So the user can select a checkbox, but once it is selected, he/she cannot uncheck the box.

Any advice or quidance would be appreciated. TIA

Help With Combo Boxes And Text Boxes
Hello, I am making a little test program and I want it so I can click on a item in my combo box and that word appears in my text box... any ideas? help please.

Text Boxes And Combo Boxes
I am trying to create a system that will allow you to pick a name from a combo box and then other information about the person will appear in labels when a command button is clicked. The problem is, is that i do not know how to get the databar to link the correct information with the labels and with the right name.

Any Help??

Check Boxes And Text Boxes
Is there any way to use a checkbox in a rich text box. Or another way to do what I need which is....
when someone double clicks on a url (not hyperlink) in my textbox, through an SQL statement if finds the matching url in my database and displays the article that matches that url? This was easy using a listbox, but I don't know how to specify the text in a text box that was double clicked. I hope this makes sense, if not I will try to clarify.
Thanks,
Cady

I was wondering about the check box cuz then I could match the url beside the checkbox, maybe?

Question About Control Text Boxes
Hi,

I have three text boxes on a sheet that get populated when I run my program. I had to use 'Control' text boxes rather than 'Drawing' text boxes, because using drawing text boxes only allowed 255 characters.

My problem is that I have them set them to certain sizes, but occasionally, not all the text will fit in, so I would like to resize them to be bigger if they need be. The three boxes are one after another so if I use 'Autosize' to resize it, it will overlap the ones below it. Also, I want them to stay the size that they are if there is only, say one line of text, not become smaller.

Hopefully this makes sense. I'm open to trying any different ways that you can come up wih.

Thanks,
Dawn

Control Array For Text Boxes
Can someone tell me how to write a control array for text boxes that will show only when the previous text box has changed?

Control Array Of Text Boxes
I'm calling a function within a class in which I want to pass in a control array of text boxes. My function prototype looks like this:

private function readMP3Tag(ByVal strMP3Path as string, ByRef txtBox() as textbox)

'bunch of code

end function

And when I call this function it's like this

dim objMP3 as mp3Player

objMP3.readMP3Tag strPath, txtInfo()


Can anyone tell me why this will not work?

Copyright © 2005-08 www.BigResource.com, All rights reserved