Selecting Only Parts Of Text For Use (vb6 Coding)

free web hosting
Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > VB Programming

Selecting Only Parts Of Text For Use (vb6 Coding)

Plenoptic
Ok so I have a list and I am trying to make a click event that transfers the value of that item on the list to a text box to edit it. The only problem is I have a label for each item as Item 1: Item 2: etc; (not item exactly). So what I want to do is before the transfer is made have it select the "Item #" part and delete it so it is just the item name itself. It is sort of confusing but I was pretty sure it could be done. Any help would be appreciated.

Reply

ghostrider
QUOTE(Plenoptic @ Jul 14 2006, 10:03 PM) *

Ok so I have a list and I am trying to make a click event that transfers the value of that item on the list to a text box to edit it. The only problem is I have a label for each item as Item 1: Item 2: etc; (not item exactly). So what I want to do is before the transfer is made have it select the "Item #" part and delete it so it is just the item name itself. It is sort of confusing but I was pretty sure it could be done. Any help would be appreciated.


I've been programming in VB 6 for about 10 years now. I'm confused on exactly what you want. Could you explain it in different words?

Reply

pb-gnat
QUOTE(Plenoptic @ Jul 15 2006, 04:03 AM) *

Ok so I have a list and I am trying to make a click event that transfers the value of that item on the list to a text box to edit it. The only problem is I have a label for each item as Item 1: Item 2: etc; (not item exactly). So what I want to do is before the transfer is made have it select the "Item #" part and delete it so it is just the item name itself. It is sort of confusing but I was pretty sure it could be done. Any help would be appreciated.

I think I understand you. This is what I would do:
QUOTE
Private Sub Form_Load()

'additems to list1
With List1
.AddItem "abc", 0
.AddItem "def", 1
.AddItem "ghi", 2
.AddItem "jkl", 3
End With

'Name the Label1's
For x = 0 To 3 Step 1
Label1(x) = "Item #" & x + 1
Next x

End Sub

Private Sub List1_Click()

'restore the Label1 names
For x = 0 To 3 Step 1
Label1(x) = "Item #" & x + 1
Next x

'Set Label1's caption to the list1 selection
Label1(List1.ListIndex).Caption = List1.Text

'Text1's text is the selected item's name
Text1.Text = List1.Text

End Sub


Just create an array of labels named Label1(four of them), a listbox named List1, and a textbox named Text1. I think it is pretty straight-forward.

 

 

 


Reply

Plenoptic
Thanks for the help, although I found a different way which did have some of yours in there. You see I had items in a list but also extra text before the item name so it was labled "Question 1 = xxxxx" That in quotations is the whole item on the list. I wanted to make it so when people double clicked on the item it would transfer just the "xxxxx" to the text box for editting which I ended up doing with a search and replace script for strings.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : selecting, parts, text, vb6, coding

  1. An Ode To Gmail.
    A small text about how GMail is awesome. (5)
  2. Problem Getting Text To Align With Different Resolutions
    (4)
    Hey! I just like fiddling around with making websites, and I'm working on one at the moment.
    However, while I can the text box to align on the designated area on the background image on my
    monitor, I'm well aware that with other resolutions and web browsers, it doesn't. (I use
    Firefox) A buddy told me to looks up some CSS but I'm not very good with it at all. What do I
    need to do to get it to centre regardless of the screen resolution the viewer uses? The website is
    optimized for 1280x1024 resolution in Firefox.....
  3. Using Unknown Fonts For Text In Webpage
    (5)
    Example(Click) The concept behind this article came a few days ago when I was chatting in the
    shoutbox here. I was thinking about whether we could include fonts (.ttf) on server and with the
    help of some frameworks we could display text in browser. Unfortunately, after much chatting and
    pleasing google (it just didn't show any mercy that day), I finally understood its not possible.
    I actually wanted headings (h1, h2... you get it?) in a webpage to use a nice font which I have.
    The problem is visitors won't have that font installed in thier system. The secon....
  4. New Text Based Tactic Online Game
    it better than the old ones. (0)
    try www.ikariam.org its amazing! the only text online game with images! it's not like
    the others where your upgrade is just a click, you'll have to wait for hours even days. This
    create oppurtunity for newcomers and balance for the old players. a must try for bored of surfing
    and such /laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0" alt="laugh.gif" />....
  5. Text Editors Vs Word Processors
    (6)
    There are many differences between text editor and a word processor. One of those differences is
    that most text editors are universal in editing any text based documents, while word processors can
    only edit certain types of files like Open Office. So, because of that universal editing more text
    editors are very basic and so they carry few commands, such as copy and paste and being able to save
    the document. While word processors have hundreds of commands and come with many other features
    such as templates, thesaurus, spell checker etc etc. So with all those features....
  6. Text Based Rpg Game Maker
    (3)
    Well I need one, if you can help please do...I would like it so I can have people play online.....
  7. Coding A Web Design
    Need (a lot) of help with coding my web design (14)
    I have been here for some months and I have always wanted to get my page up and going. I have tried
    to learn HTML, but it was too hard. Getting my web design coded is the only thing that keeps me from
    actually being able to create the rest of my website. I know that many people find it fun to create
    a website, and yes; I do to. But coding it is something out of my reach. Therefore I am asking you
    for help. I am really hoping that there is some kind souls out there willing to use their time on a
    little lost bear. If anyone with the right skills are willing to help me, I ....
  8. Text Size Problem
    (6)
    Ok i have a skin for an ipb board that im working on, and there is just one problem left with the
    skin and that is that when you view it in Internet explore, the text comes out looking so small you
    cant read it. but it looks fine in every other browser. Any body no what might cause this and how i
    could fix it? if you need to see the css code just let me know and i will post it. Thanks....
  9. The Best Places For Electronics And Byos Parts
    cheap online computer/ parts and electronics retailers (1)
    hey everyone! Im pretty sure most you guys already know about most of the things im listing but
    these are my "tricks" to online shopping and etc. I have a bunch of websites that i go to to search
    prices for electronics and buy stuff instead of going to my local retailers. For the best online
    shopping comparisons, i would go to froogle.com just to see what the average prices of an item is.
    I have bought a lot of expensive stuff for a lot less than what most places sell them for! Here
    is a list of my favorite online (and some not online) stores to do electroni....
  10. Coding Help!
    Need Tutorial?! (3)
    Hey, guys... How can I build the following things. I already made the simple administrator page
    where I may add some news to the web-site, but I need to make one more things described below.
    Please, help me if you can. This is the way how it has to work. The process is described by two
    things of the illustrations: The first picture (or brief description of the news) will be
    somehow placed on the main page, the main page may have several of those things. On the first
    picture, you may see that is marked by red named : "Full Descr." that I mean full descriptio....
  11. Any Advice From Experts?
    wrapping text around pictures. (3)
    I was wondering if someone could help me. I know that when you mix text with pictures, when you use
    the "align" feature, the text will wrap around the picture, eg. when you want text to the left to
    wrap around a picture on the right, you just add 'align="right"' to the picture and vice
    cersa for text and pictures on the opposite side. However, it becomes totally different when you
    want 2 pictures, one underneath the other, or when you want a caption text underneath the
    picture(s), in which case the wrapping and formatting completely disappears. it is of course po....
  12. The Coding Group
    (23)
    I'm sure by now everybody knows the evil group, and I've been waiting for somebody to make a
    rival group to it and perhaps we could have a group battle. I was going to start one myself but I
    didn't feel it appropriate being in both groups rival to each other so to inspire people to make
    their own "groups" I created a neutral one. The coding group. The members and their tag lines are
    as follows: QUOTE OpaQue (CrYpToLoGiC, MaDScIenTIsT, l33t Programmer) , galexcd
    (Evil Programmer) , truefusion (Analyst Programmer) , ....
  13. Text Based Game
    (5)
    Is it possible to make a Text Based game with only HTML and some PHP for chat? I dunno any
    languages besides HTML. =.= yeah Im a newbie.....
  14. Text-link-ads
    (0)
    I wanted to know your experience? I just started using the program and so far found it to be a god
    send! I am rolling the dough with their affiliate program. I know bloggers like John Chow and
    celebrity copy cat John Cow make lots of cash using it hence I tried it out. I would personally say,
    so far so good. My campaign of promoting the link worked well. What are your thoughts?....
  15. Text Signature On K1m?
    (0)
    soo iive been looking everywere and i cant find out how to make a text signature on the k1m, i
    can make a MMS signature, but i cant find out how to make a normal onee.. can anyone help ?
    /rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> ....
  16. Photoshop Tut: Basic Text (video)
    (0)
    Same thing as my sig tut, but for text. http://youtube.com/watch?v=SDFfVDSBhrY ....
  17. How To Use Command Prompt As A Text Editor
    (6)
    In this tutorial, I will show you how you can use Command Prompt to create text files. It is very
    simple and you can also use it to write output from a command into a text file. This can be
    particularly useful when you need documentation from a DOS program in a text file when you use the
    help command or something similar. In order to do this you simply use this DOS command. echo
    Text >> test.txt This will create a new text file called test and echo the contents into it. If
    we wanted to write a 2 line document, we could do something like: echo Hello >> test.txt e....
  18. What Program Do You Use To Design Your Web?
    Frontpage, Dreamweaver, a good text editor? (92)
    I personaly choose frontpage because its easy to use but.....I use dreamweaver for PHP.....
  19. Photoshop -- Double Stroke
    Learn to create a neat-o text effect (2)
    Lets do this! 1. Create a new photoshop document with the dimensions 88x31. If your lost
    already... quit. 2.Alright make some random background and then put some random black-colored
    (#000000) text on it. Kind of like the picture below. 3. Select the text layer you have just
    created and click on the little f symbol near the bottom of the layer window. A sub menu should pop
    up. Click on stroke. 4. Some editing window should appear. Change all the values to what you
    see in the following image, make sure the stroke color is white (#FFFFFF). After this tu....
  20. Colors/styles For Text?
    How do we change colors? (2)
    How do i change colors or styles of text in c++? like for colors eg. : hello world for styles:
    Hello World ....
  21. Adding Shine To Text
    images say "Tiger Ads", but, the board is clsed, so, i'm r (1)
    OK, in this tut, I am going to show you how to add shine to any text. For this example I will be
    using the TigerAds affiliate button. (the board is since closed so, I'm not really advertising
    /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />) OK then,
    lets get started! 1. Open up the image that you will be using, this is mine: 2.
    Now that your image is open and making sure that its the .psd so you can edit the text on it. In
    your layers menu, hold down CTRL and click on the text layer so that only the te....
  22. Internet Site That Allows You To Send Text Messages
    (9)
    Does anyone know of an internet site that allows you to send text messages to mobil phones over the
    net? besides the phones service provider?....
  23. Qupis : Free Hosting With Php, Mysql, Cpanel. (one Line Text Ad At Bottom)
    a member of Xisto (41)
    Hello Members, We are proud to introduce a new member to Xisto group of sites.
    Qupis : Free Web Hosting 150 MB space, 5000 MB Bandwidth, php,
    mysql, CPanel (Latest). Emails, FTP, Addon domains, Parked Domains etc.
    http://www.Qupis.com
    Feel free to add your reviews and comments about it. -Trap17
    Management ....
  24. New Computer, Help With Parts?
    (12)
    so you may have heard that my pc died a while back, i was trying to see if anybody in this forum
    knew how to fix it lol. anyway, i've now decided to replace some parts in it, a simple upgrade.
    i'll start off by telling you what i'll be wanting from this pc so you get an idea of what
    parts i need; basically, i'll be using it for multimedia purposes (ie webdesign, flash, 3d
    studio mx, maya and sound apps) but i'll also want to play games at a decent level of quialty
    without it lagging to the core. my budget is about $700aud so lets just say $1....
  25. Sattelite,reseiver(star Sat),coding ....
    (5)
    Hello , in This topic first I tell you about RS 232 cable that you must have to upgrade your
    reciever: Cable RS 232 Secend about Star-sat Reciever i want to tell you: go to Menu>STB
    Status>h/w = ? if = 2.10 its 1 mb if = 3.10 or 3.00 its 2 mb if = 7 its 2 mb Then go to
    http://satdw.com and download your path and loader (EM upgrade) and Dream loader(for softcam) then
    read " Guide To Download" to knopw how to upgrade!! I Will tell sth else if you like!
    please tell your Idea about this /blink.gif" style="vertical-align:middle" emoid=":blink:"
    border="0" a....
  26. Speakonia Voice Synthesizer - Free Download
    A text to speech convertor that is really cool... (6)
    Download from their site: Speakonia Download page The Download page also has links for
    downloadable language packages for a couple of languages other than English and a pack for
    'British" English (for those of us using the Queen's English / different spellings than
    American English) and a link to download the Microsoft voices which I find to be better than the
    default voices supplied with the basic software, but you decide. Cut and paste your emails or any
    other text into the software and it will use the speakers on your computer to read it back to you.
    Way....
  27. Have You Heard Computers Sing?
    Text to speech... or Text to song? (19)
    I bumped into this page: http://research.microsoft.com/srg/whistmusic/ when I was browsing the
    internet /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Scroll
    down to the bottom, and you'll hear some pretty amazing songs! Sung by text to speech
    synthesized voices!....
  28. Darkthrone
    Text MMORPG (5)
    I'd like to share my favorite RPG with you guys. It's a text MMORPG and is still in it's
    beta stages (Almost Omega). It is very addicting so be warned, you may spend hours on here, trying
    to upgrade and level up. I am talking about Dark Throne . In Dark Throne you start off and choose
    1 of four classes and in each of those classes are sub-classes. What you do is train your army to
    great strength and popularity. You can battle other members and win gold off of them. The more gold
    you get, the more upgrades you can get. It is very addicting once you get into....
  29. The Best And Free Website/html Editors + Text Editors
    A good collection! Check it out. (48)
    Here they are, the best html editors. Just pick one because they are all free, or choose one of the
    ones i most recommend. WebCore Designer 2005 http://www.mpsoftware.dk/webcoredesigner.php
    HTMLGate Free http://www.mpsoftware.dk/htmlgate.php Ma Page Web http://www.aldweb.com
    MAX's HTML Beauty++ 2004 http://www.htmlbeauty.com WebWorks http://w1.213.telia.com
    PageBuilder HTML Editor http://www.tafweb.com Website Mentor http://www.dark-street.com
    Cascade DTP http://www.price-media.demon.co.uk BPlainPro http://home5.swipnet.se/~w-52253/hy....
  30. Adobe Photoshop Fire Text
    (5)
    1. Create a new image, any size will do, but I used 400x150 (standard sig size) 2. Fill the newly
    created image with black 3. Create a new text layer with whatever text you want to use 4.
    Merge the text layer with your background layer (Click on your text layer, press Ctrl + E) 5.
    Filter, Stylize, Wind...Use Settings Below 6. Repeat by pressing Ctrl + F 7. Repeat steps
    5-6, changing the direction of the wind to Right 8. Now rotate the canvas 90 degrees CW 9.
    Repeat steps 5-7 10. Rotate the canvas 90 degrees CCW, this will return you to the origina....

    1. Looking for selecting, parts, text, vb6, coding

Searching Video's for selecting, parts, text, vb6, coding
Similar
An Ode To
Gmail. - A
small text
about how
GMail is
awesome.
Problem
Getting Text
To Align
With
Different
Resolutions
Using
Unknown
Fonts For
Text In
Webpage
New Text
Based Tactic
Online Game
- it better
than the old
ones.
Text Editors
Vs Word
Processors
Text Based
Rpg Game
Maker
Coding A Web
Design -
Need (a lot)
of help with
coding my
web design
Text Size
Problem
The Best
Places For
Electronics
And Byos
Parts -
cheap online
computer/
parts and
electronics
retailers
Coding
Help! -
Need
Tutorial?
3;
Any Advice
From
Experts? -
wrapping
text around
pictures.
The Coding
Group
Text Based
Game
Text-link-ad
s
Text
Signature On
K1m?
Photoshop
Tut: Basic
Text (video)
How To Use
Command
Prompt As A
Text Editor
What Program
Do You Use
To Design
Your Web? -
Frontpage,
Dreamweaver,
a good text
editor?
Photoshop --
Double
Stroke -
Learn to
create a
neat-o text
effect
Colors/style
s For Text?
- How do we
change
colors?
Adding Shine
To Text -
images say
"Tiger
Ads",
but, the
board is
clsed, so,
i'm r
Internet
Site That
Allows You
To Send Text
Messages
Qupis : Free
Hosting With
Php, Mysql,
Cpanel. (one
Line Text Ad
At Bottom) -
a member of
Xisto
New
Computer,
Help With
Parts?
Sattelite,re
seiver(star
Sat),coding
....
Speakonia
Voice
Synthesizer
- Free
Download - A
text to
speech
convertor
that is
really
cool...
Have You
Heard
Computers
Sing? - Text
to speech...
or Text to
song?
Darkthrone -
Text MMORPG
The Best And
Free
Website/html
Editors +
Text Editors
- A good
collection&#
33; Check it
out.
Adobe
Photoshop
Fire Text
advertisement



Selecting Only Parts Of Text For Use (vb6 Coding)



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE