473,395 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Playing with Text Boxes in VB6.0

Ali Rizwan
925 512MB
Hello Every Body

I want to do if the first letter of textbox is M then textbox show it Muhammad and other data will remain constant.
i.e
if M Saleem is written in textbox then Muhammad Saleem wll written in textbox

And one thing more

If i edit some thing in textbox and then goto some other control and when i goto textbox the cursor will have to on the end of text in textbox
its urgent. Thanks in Advance
Aug 25 '07 #1
2 1984
QVeen72
1,445 Expert 1GB
Hi.

Write this code in Text1_Change Event:

Expand|Select|Wrap|Line Numbers
  1. If Left(Text1.Text,1) ="M" And Left(Text1.Text,2) <> "Mu" Then
  2.   Text1.Text = "Muhammad " & Mid(Text1.Text,2)
  3. End If
  4.  
Write this code in GotFocus Event of textbox:

Expand|Select|Wrap|Line Numbers
  1. Text1.SelStart =Len(Text1.Text)
  2.  
Regards
Veena
Aug 26 '07 #2
Ali Rizwan
925 512MB
Hi.

Write this code in Text1_Change Event:

Expand|Select|Wrap|Line Numbers
  1. If Left(Text1.Text,1) ="M" And Left(Text1.Text,2) <> "Mu" Then
  2.   Text1.Text = "Muhammad " & Mid(Text1.Text,2)
  3. End If
  4.  
Write this code in GotFocus Event of textbox:

Expand|Select|Wrap|Line Numbers
  1. Text1.SelStart =Len(Text1.Text)
  2.  


Regards
Veena


Thanks a lot Qveen 72 i m very thank full to you because i want to automate my textboxes with letters. it will help me alot i ll use it.
Thanks once again
Aug 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Dan | last post by:
Can anyone offer suggestions on how to do this or if it is possible? I have a form that uses a drop down box and 2 text fields. What I am trying to do is have the value of each text box set by...
7
by: Gertjan van Heijst | last post by:
Hi, I really hope someone can help me because I've already spend 2 days on this problem and I'm not getting anywhere. I think the problem is that I don't really understand how text boxes store...
2
by: John Kreps | last post by:
(acc 2002) I've got six unbound text boxes on a subform that has a white background. Each of those six boxes has an expression that when true, will change its background from white to another...
2
by: Gary | last post by:
Hello All, I have an editable data grid in my web form, this grid allows the user to add new records, edit existing records and also delete them. When a user adds a record the grid goes in to...
11
by: Edson Peacock | last post by:
I have a report with sub reports, one of the subreports have 12 text boxes that are 2" high and I want them all to grow if one goes to 3" high. If anyone has any suggestions they are very much...
6
by: BurntWithTime | last post by:
Hello everyone, Please can anyone tell me if it is possible for a VB.NET application to check a database and then create textboxes on a form that correspond to those records on the database? For...
4
by: Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+ | last post by:
I have created a report. This report needs to display records between two dates entered by the user. I put two text boxes on the report so I can enter the start and end date - I set them to use an...
6
by: =?Utf-8?B?Sm9obiBBdXN0aW4=?= | last post by:
I have an app that displays about 20 items of data in text boxes. Very occasionally I need to allow these to be used for data entry, but the bulk of the time they are solely for information. They...
11
by: jwessner | last post by:
I have a form (Form1) which contains basic Project data and a subform listing the personnel assigned to the Project as a continuous form. Selecting a person on that project and clicking on a command...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.