473,793 Members | 2,742 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Text box formating in vb 6.0

26 New Member
Hai, I wana to format a text box.

TextBox Name is txt_amount

So i want when the program in run mode then the text box has automaticly 0.00 will appear and when i worte any number then first 0 will delete and there will be my pressed number and when i press . point (.) then cursor will automaticly come after point and new neurmaric value will after the point.

i. e . 25.36
Dec 1 '07 #1
5 2575
CyberSoftHari
487 Recognized Expert Contributor
Use
Expand|Select|Wrap|Line Numbers
  1. SendKeys "{End}"
Dec 1 '07 #2
godhulirbalaka
26 New Member
Use
Expand|Select|Wrap|Line Numbers
  1. SendKeys "{End}"

Hi would you please clear more
Dec 2 '07 #3
Mohan Krishna
115 New Member
Hi godhulirbalaka!

May this help you...

ALL THE BEST!
Respond if it helps u
Attached Files
File Type: zip ex.zip (1.7 KB, 208 views)
Dec 2 '07 #4
CyberSoftHari
487 Recognized Expert Contributor
Good work Mohan Krishna. Let him try, Donot post Detail source code.

@godhulirbalaka : You can use mask textbox which is already formated as you require.
Dec 3 '07 #5
9815402440
180 New Member
hi

if the length of the number to be input is fixed or known then use MaskEDBox instead. set its Mask Property to "99.99" this will display __.__ as input mask at run time. if the length of the text is not known you can try the method suggested by mohan krishna. or can use following code in the lost_focus event of the text box.


private sub text1_lostFocus ()
text1.text = format(text1.te xt,"#0.00")
end sub

regards
manpreet singh dhillon
Dec 3 '07 #6

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

Similar topics

6
2218
by: Polar | last post by:
I have a database that stories entries of short stories for a writers website. I can easily input the data into MYSQL but my trouble lies in retrieving the data. the story in just cut and pasted from a WP into the TEXTAREA on the form. When I look at the story in the DB I can see it retains all the paragraph spacing etc. but when I try and read that cell when retrieving data all the text is crammed into one paragrapgh. What am I...
1
1922
by: gevayl | last post by:
Hi, Is it possible to do memo text formating in ms access 2000? I mean like underlining a portion of text in a memo field or a text field? Thank you.
0
1166
by: Dmitri Manushin | last post by:
Hi all, i have textBox (multiline) i'am enter many words and don't push enter next i push button and text record in database. When i read data from database in table i'am use teg <pre> for save text formating, but i don't push enter in previous example and my table grow in right. How i can solve my problem. Thanks. P.S.
4
1582
by: djc | last post by:
Is there a property or method of the textbox web server control that I can use to format the text in it a certian way. For example I am displaying a date value from a database in a text box. It displays like so: mm/dd/yyyy mm:hh:ss. I 'was' using the .ToShortDateString() function like so: txtETA.Text = drMain.Item("EstimatedDeliveryDate").ToShortDateString() which worked great until I came across a database record with NULL for this field....
0
1893
by: musawer | last post by:
Can Someone give a good link for C# Winform DataGrid Text Style Formating (Font,Color,Size etc)... Quick reply will be highly appreciated... Thanks...
12
1861
tolkienarda
by: tolkienarda | last post by:
hi all I am working on a content management service and i need some help keeping formating. what i am doing is recreating my site in an admin side and all of the articles on the site will now be in <textarea> boxes so admins can edit them and save the changes it is working but any formating they use dosen't seem to work. if they want to have a return in the middle of their article the only way it will work is if they enter a br tag in...
24
3702
by: =?Utf-8?B?RHVja3dvbg==?= | last post by:
Hello, My code is suppose to write to an existing file. But after my C# code appends the file, the previous text loses all the endline characters, becoming one long line. How can I retain the formating of the pre-existing text? FileStream stream = new FileStream(strFileName, FileMode.Append, FileAccess.Write);
1
2553
by: Shawn Northrop | last post by:
I just read an article on kirupa.com about incorporating mySQL and PHP with flash. I am dynamically loading conent into a flash movie and am not sure how to format. In my php code i have: $y = ""; foreach($result as $x){ $y = $y . $x . " "; } print "myVar = $y"; In short $result is a query and $y is the value i will be passing along to flash. the statement $y = $y . $x . " "; puts a space between each name that is passed along. I am...
0
1752
by: Fonix | last post by:
I'm trying to make table border with pyExcelerator. As i can see there is only cell formating!? If i'm wrong pls tell me what is method to make more then one cell to have same format, other then just give them one-by-one. For little tables 100/20 formating cell by cell work ( i try with borders) fine. But when i get 5000/20 excel say: Too many different cell format! and excel remove some of the formats :( Pls help i need to format...
7
15078
by: sphinney | last post by:
I have a datasheet style form with textbox (MyTextBox) that has the Text Format property set to "Rich Text". It is bound to a memo field in a table. How do I change the text or highlight color of certain text in the textbox such that the formating is saved in an underlying memo field? My situation is a little different than other posts I read. Most posts show how to find and select certain text in a textbox, and then change the formating...
0
10433
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10161
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9035
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6777
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4112
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2919
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.