I have discovered a very useful tool in the Gambas toolbox 'Ends' so I thought I would share it with you.
Handle all the controls in the program below in 5 lines of code: -
'Ends'
Re: 'Ends'
That's great cogier! an interesting example.
I played around with it for a while, and then I sort of 'drifted off', creating this one liner using Last.Name.
I played around with it for a while, and then I sort of 'drifted off', creating this one liner using Last.Name.
- Attachments
-
- LastNameControlExample.zip
- (73.56 KiB) Downloaded 547 times
- cogier
- Site Admin
- Posts: 1128
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: 'Ends'
Excellent! Well using that method you could shorten: -
TextBox1.Text = Mid((Last.name), InStr(Last.name, "Button") + Len("Button"))
To
TextBox1.Text = Mid(Last.name, InStr(Last.name, "Button") + 6)
It just goes to show that there is always another way to do things.