|
-
Feb 9th, 2006, 10:46 PM
#1
Thread Starter
Member
Ascii
Guyz how can I get all the characters (not in the keyboard) in a string and
display it in another txtbox?
txtbox1 = "™ÈñõŒ the dog ←ÖÜç"
string1 = txtbox2
txtbox2 = "™ÈñõŒ ←ÖÜç
make it simple plss.
Thanks....
-
Feb 9th, 2006, 10:48 PM
#2
Re: Ascii
The Asc function will return the ascii character code for each character.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 9th, 2006, 10:51 PM
#3
Thread Starter
Member
Re: Ascii
yup i know that. But how can check if the word is not in the keyboard?
-
Feb 9th, 2006, 10:58 PM
#4
Re: Ascii
Ok, which. Alpha, numeric, special characters, control chars, etc.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 9th, 2006, 11:06 PM
#5
Re: Ascii
This will add only the captiol letters from A-Z to textbox 2.
VB Code:
Option Explicit
Private Sub Command1_Click()
Dim i As Integer
For i = 1 To Len(Text1.Text)
If Asc(Mid$(Text1.Text, i, 1)) > 65 And Asc(Mid$(Text1.Text, i, 1)) < 90 Then
Text2.Text = Text2.Text & Asc(Mid$(Text1.Text, i, 1)) & ","
Else
MsgBox Mid$(Text1.Text, i, 1) & " Is not within the acceptable range of characters allowed."
End If
Next
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 10th, 2006, 08:56 AM
#6
Thread Starter
Member
Re: Ascii
Thanks robdog
Originally posted by RobDog888
Ok, which. Alpha, numeric, special characters, control chars, etc.
All of them..
How can check if the all the characters in a single word is all ASCII
characters? If true put it in the txtbox2.
Thanks....
-
Feb 10th, 2006, 11:05 AM
#7
Re: Ascii
My code checks each character in the textbox. Then you need to include the characters you want in the If statement. Maybe change it to a select case statement block since it will get larger to include all keyboard characters.
So what will be the offending characters if they are not on the keyboard?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 10th, 2006, 11:18 AM
#8
Re: Ascii
On my Swedish keyboard I'll have an Ö key, as well as Å and Ä. In Swedish these are not just oumlated O and A characters, they are actual letters in our alphabet which differs from O and A in the same way as a B is different from a Q.
-
Feb 10th, 2006, 11:23 AM
#9
Re: Ascii
Well yes thats what I was getting at. Its easier to trap for the extended keys or such instead of everything else.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Feb 10th, 2006, 12:52 PM
#10
Frenzied Member
Re: Ascii
I recently had to do this at work and I just made a loop to remove all Non 7-bit ASCII characters as they cause.... Problems for us. The loop just goes....
VB Code:
For i = 128 To 255
If InStr(1, String, Chr(i)) then
'Stuff to deal with it here..
End If
Next
That's a rough break down as I wrote it in VBA for Excel originally.
Hope that offers some help.
-
Feb 11th, 2006, 12:16 AM
#11
Thread Starter
Member
-
Feb 11th, 2006, 12:17 PM
#12
Re: Ascii
 Originally Posted by myrea
I'm talking about the ordinary keyboard. The standard I think.. 
LOL, I have a ordinary standard (Swedish) keyboard. American keyboards aren't that very ordinary over here.
-
Feb 11th, 2006, 12:50 PM
#13
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|