change  
Author Message
poogy21





PostPosted: Sun Oct 22 12:57:30 CDT 2006 Top

Visual Basic >> change Hello, I want to let the commandbutton1 to change for example the
letter "a" into letter "z" and letter "b" into "y" and so on from the
textbox1 to textbox1 again... how can this be done??

Thanks in advance...

Visual Studio76  
 
 
Mr





PostPosted: Sun Oct 22 12:57:30 CDT 2006 Top

Visual Basic >> change Teddy wrote:
> Hello, I want to let the commandbutton1 to change for example the
> letter "a" into letter "z" and letter "b" into "y" and so on from the
> textbox1 to textbox1 again... how can this be done??
>
> Thanks in advance...
>
You just want to rotate the alphabet, right. I have no idea if vb has an
Ord() function, but if it does then you would say

NewLetter = Ord('a') + 13

for ROT13.

HTH somewhat, or at least gives a hint as to where t start looking.
 
 
Teddy





PostPosted: Sun Oct 22 13:10:58 CDT 2006 Top

Visual Basic >> change
Mr. X wrote:
> Teddy wrote:
> > Hello, I want to let the commandbutton1 to change for example the
> > letter "a" into letter "z" and letter "b" into "y" and so on from the
> > textbox1 to textbox1 again... how can this be done??
> >
> > Thanks in advance...
> >
> You just want to rotate the alphabet, right. I have no idea if vb has an
> Ord() function, but if it does then you would say
>
> NewLetter = Ord('a') + 13
>
> for ROT13.
>
> HTH somewhat, or at least gives a hint as to where t start looking.

No, "a" to "b" is just an example, it might be "a" to "3g" anything...
Thanks

 
 
Veign





PostPosted: Sun Oct 22 13:37:37 CDT 2006 Top

Visual Basic >> change Is there a rule that will be followed? If not, look at the Replace()
function.

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
Veign's Blog
http://www.veign.com/blog
--


"Teddy" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
>
> Mr. X wrote:
>> Teddy wrote:
>> > Hello, I want to let the commandbutton1 to change for example the
>> > letter "a" into letter "z" and letter "b" into "y" and so on from the
>> > textbox1 to textbox1 again... how can this be done??
>> >
>> > Thanks in advance...
>> >
>> You just want to rotate the alphabet, right. I have no idea if vb has an
>> Ord() function, but if it does then you would say
>>
>> NewLetter = Ord('a') + 13
>>
>> for ROT13.
>>
>> HTH somewhat, or at least gives a hint as to where t start looking.
>
> No, "a" to "b" is just an example, it might be "a" to "3g" anything...
> Thanks
>


 
 
Teddy





PostPosted: Sun Oct 22 14:34:50 CDT 2006 Top

Visual Basic >> change
Veign wrote:
> Is there a rule that will be followed? If not, look at the Replace()
> function.
>
> --
> Chris Hanscom - Microsoft MVP (VB)
> Veign's Resource Center
> http://www.veign.com/vrc_main.asp
> Veign's Blog
> http://www.veign.com/blog
> --
>
>
> "Teddy" <EMail@HideDomain.com> wrote in message
> news:EMail@HideDomain.com...
> >
> > Mr. X wrote:
> >> Teddy wrote:
> >> > Hello, I want to let the commandbutton1 to change for example the
> >> > letter "a" into letter "z" and letter "b" into "y" and so on from the
> >> > textbox1 to textbox1 again... how can this be done??
> >> >
> >> > Thanks in advance...
> >> >
> >> You just want to rotate the alphabet, right. I have no idea if vb has an
> >> Ord() function, but if it does then you would say
> >>
> >> NewLetter = Ord('a') + 13
> >>
> >> for ROT13.
> >>
> >> HTH somewhat, or at least gives a hint as to where t start looking.
> >
> > No, "a" to "b" is just an example, it might be "a" to "3g" anything...
> > Thanks
> >

OK, thanks so far, can you please tell me how the replace command looks
like?
Thanks

 
 
Mike





PostPosted: Sun Oct 22 14:42:37 CDT 2006 Top

Visual Basic >> change "Mr. X" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...

> I have no idea if vb has an Ord() function, but if it
> does then you would say
> NewLetter = Ord('a') + 13

You've got me totally confused now, Mr. X. If you're a VB6 programmer then
you would know whether or not VB had an Ord function, and if you are not
then what are you doing in a VB6 newsgroup? Curiouser and curiouser. (Are
you a Delphi man by the way?)

Mike



 
 
Veign





PostPosted: Sun Oct 22 14:45:51 CDT 2006 Top

Visual Basic >> change Check your help file or MSDN online.

(you have to put in some effort)

--
Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
Veign's Blog
http://www.veign.com/blog
--


"Teddy" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
>
> Veign wrote:
>> Is there a rule that will be followed? If not, look at the Replace()
>> function.
>>
>> --
>> Chris Hanscom - Microsoft MVP (VB)
>> Veign's Resource Center
>> http://www.veign.com/vrc_main.asp
>> Veign's Blog
>> http://www.veign.com/blog
>> --
>>
>>
>> "Teddy" <EMail@HideDomain.com> wrote in message
>> news:EMail@HideDomain.com...
>> >
>> > Mr. X wrote:
>> >> Teddy wrote:
>> >> > Hello, I want to let the commandbutton1 to change for example the
>> >> > letter "a" into letter "z" and letter "b" into "y" and so on from
>> >> > the
>> >> > textbox1 to textbox1 again... how can this be done??
>> >> >
>> >> > Thanks in advance...
>> >> >
>> >> You just want to rotate the alphabet, right. I have no idea if vb has
>> >> an
>> >> Ord() function, but if it does then you would say
>> >>
>> >> NewLetter = Ord('a') + 13
>> >>
>> >> for ROT13.
>> >>
>> >> HTH somewhat, or at least gives a hint as to where t start looking.
>> >
>> > No, "a" to "b" is just an example, it might be "a" to "3g" anything...
>> > Thanks
>> >
>
> OK, thanks so far, can you please tell me how the replace command looks
> like?
> Thanks
>


 
 
Larry





PostPosted: Sun Oct 22 15:00:17 CDT 2006 Top

Visual Basic >> change
"Teddy" <EMail@HideDomain.com> wrote


> OK, thanks so far, can you please tell me how the replace command looks
> like?

It is explained in the Help file....

http://msdn2.microsoft.com/en-us/library/aa241892(VS.60).aspx

LFS


 
 
Teddy





PostPosted: Sun Oct 22 15:19:15 CDT 2006 Top

Visual Basic >> change
Larry Serflaten wrote:
> "Teddy" <EMail@HideDomain.com> wrote
>
>
> > OK, thanks so far, can you please tell me how the replace command looks
> > like?
>
> It is explained in the Help file....
>
> http://msdn2.microsoft.com/en-us/library/aa241892(VS.60).aspx
>
> LFS

OK, can some one send me an example please...
Thanks all

 
 
Mike





PostPosted: Sun Oct 22 15:47:27 CDT 2006 Top

Visual Basic >> change "Teddy" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...

> OK, can some one send me an example please...

Larry posted a link. Did you click that link and read the help item it
pointed to? If yuo did and f you still don't understand how to use it then
you really need to buy a beginners VB book. In the meantime, here is a quick
example:

Private Sub Command1_Click()
Dim s1 As String, s2 As String, s3 As String
s1 = "Rum and Coke is nice, but the rum is the best part"
s2 = Replace(s1, "rum", "whisky", 1, -1, vbTextCompare)
s3 = Replace(s1, "rum", "whisky", 1, -1, vbBinaryCompare)
Me.Print s1
Me.Print s2
Me.Print s3
End Sub

Mike



 
 
Rick





PostPosted: Mon Oct 23 04:19:29 CDT 2006 Top

Visual Basic >> change >> > Hello, I want to let the commandbutton1 to change for example the
>> > letter "a" into letter "z" and letter "b" into "y" and so on from the
>> > textbox1 to textbox1 again... how can this be done??
>> >
>> > Thanks in advance...
>> >
>> You just want to rotate the alphabet, right. I have no idea if vb has an
>> Ord() function, but if it does then you would say
>>
>> NewLetter = Ord('a') + 13
>>
>> for ROT13.
>>
>> HTH somewhat, or at least gives a hint as to where t start looking.
>
> No, "a" to "b" is just an example, it might be "a" to "3g" anything...

Just out of curiosity... were you really expecting us to guess this
generalized rule from what you wrote in your first post (which was a simple
letter swap)?

Rick


 
 
Mr





PostPosted: Mon Oct 23 05:52:14 CDT 2006 Top

Visual Basic >> change Mike Williams wrote:
> "Mr. X" <EMail@HideDomain.com> wrote in message
> news:EMail@HideDomain.com...
>
>> I have no idea if vb has an Ord() function, but if it
>> does then you would say
>> NewLetter = Ord('a') + 13
>
> You've got me totally confused now, Mr. X. If you're a VB6 programmer then
> you would know whether or not VB had an Ord function, and if you are not
> then what are you doing in a VB6 newsgroup? Curiouser and curiouser. (Are
> you a Delphi man by the way?)
>
> Mike
>
>
>
I only started studying vb yesterday. I thought this newsgroup also
covered vb dot net? If not, can you please point me to the correct ng?
Thanks. And yes, I am a Delphi coder :-)
 
 
Mike





PostPosted: Mon Oct 23 07:05:08 CDT 2006 Top

Visual Basic >> change "Mr. X" <EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...

> I only started studying vb yesterday. I thought this newsgroup
> also covered vb dot net? If not, can you please point me to the
> correct ng?

Okay. Easy mistake to make. Most people here use VB6, but there are quite a
number of newsgroups devoted to dotnet. Try one of the following:

Mike

microsoft.public.dotnet.languages.vb
microsoft.public.dotnet.languages.vb.upgrade
microsoft.public.dotnet.languages.vb.controls
microsoft.public.dotnet.languages.vb.data




 
 
Mr





PostPosted: Mon Oct 23 08:37:55 CDT 2006 Top

Visual Basic >> change Mike Williams wrote:
> "Mr. X" <EMail@HideDomain.com> wrote in message
> news:EMail@HideDomain.com...
>
>> I only started studying vb yesterday. I thought this newsgroup
>> also covered vb dot net? If not, can you please point me to the
>> correct ng?
>
> Okay. Easy mistake to make. Most people here use VB6, but there are quite a
> number of newsgroups devoted to dotnet. Try one of the following:
>
> Mike
>
> microsoft.public.dotnet.languages.vb
> microsoft.public.dotnet.languages.vb.upgrade
> microsoft.public.dotnet.languages.vb.controls
> microsoft.public.dotnet.languages.vb.data
>
>
>
>
Thanks a lot, Mike.