473,396 Members | 1,748 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,396 software developers and data experts.

how to put dynamic comma in textbox at runtime

sir,
how to put dynamic comma after 12 characters in textbox means 13th char is comma.... can u plz suggest me ...how i should do it...
thanx...
prem prakash...
Apr 13 '09 #1
3 2378
kadghar
1,295 Expert 1GB
if you're writing it from a string, why dont you check the MID function. For newer VB versions, the SUBSTRING property or the INSERT method might be of help.
Apr 14 '09 #2
QVeen72
1,445 Expert 1GB
Hi,

Write This in TextBox's Lost Focus Event:

Expand|Select|Wrap|Line Numbers
  1. Dim i As Integer
  2. Dim NewText As String
  3. Dim OldText As String
  4. OldText = Text1.Text
  5. NewText = ""
  6. For i = 13 To Len(OldText) Step 12
  7. NewText = NewText & Left(OldText, 12) & ","
  8. OldText = Mid(OldText, 13)
  9. Next
  10. NewText = NewText & OldText
  11. Text1.Text = NewText
  12.  
Just a Pseudo-Code, you can reifne it accordingly..

Regards
Veena
Apr 15 '09 #3
Thanks sir,
i got it...
Apr 15 '09 #4

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

Similar topics

1
by: krs | last post by:
I am using XML/XSL to build a dynamic asp.net control at runtime. So the result of the XML/XSL transformation may result in a string such as: <asp:TextBox id="TextBox1" runat="server">...
3
by: RSB | last post by:
Hi Every one Having tuff time creating web controls Dynamically. All i am trying to do is read a table and generate a list of ASP TEXT Box. So how do i create this Control dynamically and where...
6
by: dhnriverside | last post by:
Hi peeps, I'm trying to create some controls textboxes at runtime, based on the number of items in a IETreeView that are checked. That I can do, I've got a place holder and I can create the...
0
by: Slam via DotNetMonster.com | last post by:
I want to create a couple of dynamic controls and the controls definitions are stored in a database. Once the the controls are created, I want to fill any dropdownlist with database values. And...
1
by: arun.hallan | last post by:
I want to add at runtime, a textbox which when clicked in, displays a calender which returns a value to that textbox. Not sure how to do this dynamically at runtime. Any ideas?
0
by: Mike Collins | last post by:
I have a form where I create dynamic controls at runtime. With this, I am adding a dynamic required field validators to each control as needed, but the validators are not firing when I click...
2
by: Mike Collins | last post by:
I have a form where I create dynamic controls at runtime. With this, I am adding a dynamic required field validator to each control as needed, but the validators are not firing when I click submit....
2
by: remya1000 | last post by:
hai i'm using Vb.net. i'm creating 64 dynamic created buttons of 8 rows and 8 columns. And i have 1 Go button, 1 textbox. those were created dynamically. if i enter one number inside textbox and...
2
by: bharathi228 | last post by:
my code for retrieving values from database Dim da As New SqlDataAdapter("select parameter_name,parameter_units from sys_params", con) If con.State = ConnectionState.Closed Then con.Open()...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.