Advertisement

Results for "Category: String Manipulation"

6_2008-2009 #198456
TriState InputBox

With the InputBox you cannot distinguish between the cases a:- Cancel clicked b:- nothing entered and OK clicked because in both cases the returned string is a vbNullString There is a simple trick however as is shown here

6_2008-2009 #198500
L/UCaseKeyPress

Use these functions in KeyPress events to format user entries as entry is typed. UCaseKeyPress() converts key pressed to uppercase while LCaseKeyPress() converts key pressed to lowercase.

6_2008-2009 #198509
Print hexpackets with WinSock

This is a simple example of converting a string data into a hex formatted (packet) view. This will be mostly usefull when sending and receiving data with/through WinSock! Packet displays data in hex and 'readable' characters like the packet below, which seems to be the text you're reading right at this time! 48 65 6C 6C 6F 2C 0D 0A 0D 0A 54 68 69 73 20 69 Hello,....This.i 73 20 61 6E 20 65 78 61 6D 70 6C 65 20 6F 66 20 s.an.example.of. 63 6F 6E 76 65 72 74 69 6E 67 20 61 20 73 74 72 converting.a.str 69 6E 67 20 64 61 74 61 20 69 6E 74 6F 20 61 20 ing.data.into.a. 68 65 78 20 66 6F 72 6D 61 74 74 65 64 20 28 70 hex.formatted.(p 61 63 6B 65 74 29 20 76 69 65 77 2E 0D 0A 54 68 acket).view...Th 69 73 20 77 69 6C 6C 20 62 65 20 6D 6F 73 74 6C is.will.be.mostl 79 20 75 73 65 66 75 6C 6C 20 77 68 65 6E 20 73 y.usefull.when.s 65 6E 64 69 6E 67 20 61 6E 64 20 72 65 63 65 69 ending.and.recei 76 69 6E 67 20 64 61 74 61 20 77 69 74 68 2F 74 ving.data.with/t 68 72 6F 75 67 68 20 57 69 6E 53 6F 63 6B 21 0D hrough.WinSock!. 0A 0D 0A 50 61 63 6B 65 74 20 64 69 73 70 6C 61 ...Packet.displa 79 73 20 64 61 74 61 20 69 6E 20 68 65 78 20 61 ys.data.in.hex.a 6E 64 20 27 72 65 61 64 61 62 6C 65 27 20 63 68 nd.'readable'.ch 61 72 61 63 74 65 72 73 20 6C 69 6B 65 20 74 68 aracters.like.th 65 20 70 61 63 6B 65 74 20 62 65 6C 6F 77 2C 0D e.packet.below,. 0A 77 68 69 63 68 20 73 65 65 6D 73 20 74 6F 20 .which.seems.to. 62 65 20 74 68 65 20 74 65 78 74 20 79 6F 75 27 be.the.text.you' 72 65 20 72 65 61 64 69 6E 67 20 72 69 67 68 74 re.reading.right 20 61 74 20 74 68 69 73 20 74 69 6D 65 21 .at.this.time!

6_2008-2009 #198632
Caption Scroller - IMPROVED!

This Code will Scroll the title of your window(s) like Winamp To the left OR to the right.

6_2008-2009 #198670
Strip Characters from a string

This function is to strip all instances of a character out of a string. Its fairly compact and simple. Hope its helpful to someone. :)

6_2008-2009 #198712
Auto-Select Text on Focus

Nice feature to help users edit textboxes. The code selects all the existing text when the users focus on the textbox control. This will definitely make your application more user friendly. Please Vote!!!

6_2008-2009 #198727
Twisted Text

Makes Twisted Text, Kinda Like Scrambled

6_2008-2009 #198766
Calculate Age in ymd

I needed a routine to display the difference between two dates in year month day format. I found a couple here on pcs and another on a different site. Here is a project to call the three routines and display their results side by side. In case your wondering about Datediff it returns the number of times the year, month or whatever has changed between the two date. i.e. it returns 1 when from is dec 31 yyyy and to is jan 1 yyyy+1. Anyway here are three routines, two of them worked in all the test conditions I tried, the other gets a wild hair up it rear every once in a while. Louis Boldt 2/16/02

6_2008-2009 #198787
WordWrap in only 5 codelines

I hope that this is the shortest and easiest wordwrap-function in vb you have ever seen, that you enjoy it and use it in all your projects :-)

6_2008-2009 #198854
Strings

This teaches users how to manipulate strings using. Left(),Right(),Mid(),Len(),Instr(),Lcase(),Ucase() and StrReverse().

6_2008-2009 #198864
A great program that gets random characters from a text box!(Updated again!!)

I looked on this site to find something like this, but i didnt find exactly what i wanted. Here is the source that i created that takes random characters from a text box and places them in a label. It takes a user defined amount of characters including spaces and periods and everything else. =) UPDATED AGAIN!! Now has added features! Can count characters and vowels and words etc! If you know a better way to do this, please email me. This type of program can be used for fortunes, making up new words, choosing usernames(i actually know somebody that did this with a similar program), etc. PLEASE VOTE!!!

6_2008-2009 #198865
a easy character/word/space etc counter

This program lets you input text or copy paste from another program. as you type or the text is pasted in, it counts the amount of words, spaces, vowels, consanents, etc. It can be used for programs like icq, text editors, and much more! Please give me feedback and vote!

6_2008-2009 #198876
String Processing Library (Parsing, Translation, Validation)

Library of routines for typical string processing, including parsing, translation, and validation. Routines include: - StrReplace(Text, SearchFor, ReplaceWith, [Compare]) As String - StrSplit(Text, SplitOn, [Compare]) As Variant - FromHex(HexNumber) As Long - LeftPad(Value, Size, [PadCharacter]) As String - RightPad(Value, Size, [PadCharacter]) As String - AreLetters(Text) As Boolean - AreDigits(Text) As Boolean - AreLettersOrDigits(Text) As Boolean - AreInSet(Text, CharacterSet, [CaseSensitive]) As Boolean - ParseN(Text, StartAt, PatternArray, ValueArray, [PosPastEnd], [StopAt], [Compare]) As Boolean Clean code with lots of comments in reusable module. Also includes an extensive reference in HTML. Tested with VB6, but should be compatible with all modern versions and VBScript (with minor modifications). Please vote for this code if you like it.

6_2008-2009 #198891
ReadFile

Read an entire text file into a string in one call.

6_2008-2009 #198902
RTF Writer

DLL that allows you to write RTF code that is compatable with Windows WordPad. Use this object to convert HTML to RTF, or to generate RTF file on the fly!!!! Don't bother looking anywhere else for this hot little piece of code ( I spent hours on the net looking, finally I gave up and wrote it myself!) Look here for future updates, up next... picture, and table support! Added Bonus: Object that enumerates through the fonts on your system and gets the Picth, and Font Family for each one!!!!!!!!

6_2008-2009 #198904
Search a string using a web search engine like query

This code demonstrates how to search a string using a web search engine style query. With this code you can analyze text files looking for specific patterns. For example: (Microsoft and AOL) or "instant messenger" This query will analyze any string for the occurrence of the words Microsoft and AOL or "instant messenger". I use this code (in conjunction with other code) to scan the users hard drive for occurrences of text files that meet the user defined search parameters. This is an enhanced version of the search for files containing text feature in windows.

6_2008-2009 #198923
Absolute EASIEST Way To Find And Replace Text in Any Control!!

Absolute Easiest Way To Find And Replace Text in Any Control - ie: labels, textboxes, basically ANY control that supports text editing!!

6_2008-2009 #198943
Return a Group of Random Records

To return a group of Random Records from a database. For example, a group of random questions for a quiz/test.

6_2008-2009 #198952
Display Databases Dynamically Using ADO 2.5

If you are looking for a simple solution to display data and be able to sort and query it, you are on the correct page. Complex relationships between recordsets can be viewed using this technique. It is easier to use compared to ASPDB solution. Download Complete source code and explanation.

6_2008-2009 #198954
A Complete Database Accessing Web Site!

This article not only includes the complete source code for a database driven web site that the author created, but includes a detailed description on how it works!

Languages
Top Categories
Global Discovery