Howdy all;
I found a link a while ago that strips the line numbering from the Code samples on this site, but have not been able to find it again. Does anyone still have the link?
Printable View
Howdy all;
I found a link a while ago that strips the line numbering from the Code samples on this site, but have not been able to find it again. Does anyone still have the link?
A link that strips the line numbers from the code? That's a very powerful link. Are you sure it's a link that strips line numbers or a link to a post that tells you how to do it?
You can always Quote the post with the VBCode and that will remove the line numbers and then you will need to copy out the code you want from the quoted post.
jmsrickland, never thought of that. Thanks.
Yep, there is a link for an html page that, I believe funnels vbforum pages through it, so when you see the page, you get all the code without the numbers.
I m still searching cd's ( I reimaged my pc about 3 months ago), so if no one else has it, and I find it I'll post here.
I don't know who posted this code, but it works for me.
Copy the code you want from this forum into the clipboard,run the following code, and then paste it to notepad or directly in you app.
I modified the original code to fit my purposes so I don't know how much of it is mine...Code:Private Sub Form_Load()
Dim myarr() As String
Dim i As Integer
myarr = Split(Clipboard.GetText, vbNewLine)
For i = UBound(myarr) To 0 Step -1
If IsNumeric(myarr(i)) Then
myarr(i) = ""
ElseIf (myarr(i)) = "#" Then
myarr(i) = ""
End If
Next i
Clipboard.Clear
Clipboard.SetText Replace(Join(myarr, vbNewLine), vbLf & vbCr, "")
Unload Me
End Sub
TheOldNewbie - brilliant. Shows you where my mind is. I am such a lazy putz...
AAAANNNDDD ROLF. So now NO posts have line numbers in it. Ok what happened. I am trying to set The OldNewbie's code and I can't find any post with the numbers.. so.. the great vbGod flipped the swtich?
Hint....Put line numbers in your code and try it...hehe.Quote:
Originally Posted by peteleeb
:D
MartinLiss wrote a utility in Utility Bank forum that does just that. The line number have been a known issue for about a year now.
http://www.vbforums.com/showthread.php?t=484830
Utility:
http://www.vbforums.com/showthread.php?t=458328
Well, one way to solve this problem is that no one uses VBCode. I don't use it, never liked it in the first place, and never could understand why other people use it. It's a pain in the $%^@ to extact out the code you want. Why doesn't everyone just use the [CODE] tags instead? It would sure make things alot simplier. That's my opinion.
Its not the vbcode tags as those have been replaced with highlight tags "[highlight=vb.net]" is the actual tag.
The new code parser perform much more colouring not just for VB but all of .NET languages as well as many other non-.net languages
I use both. For pseudocode and descriptive code snippets, I use highlight tags. For code I intend somebody to actually use, I use normal code tags for ease of copying.Quote:
Originally Posted by jmsrickland
The exception is in the CodeBank. I always use highlight tags there, though I'm not sure why.
I rarely use highlight tags as I really dont care about the colouring (besides there are some keywords still missing and C# code has a bug in it). I tried using them but its just longer text to type and I'd rather use something that is more user friendly for a better user experience.
I think I got to dislike the "[highlight=vb.net]" (thought it was VBCode tags) before I knew about just quoting the post and then do a copy paste of the code I wanted. Even then, when I see VB code within those tags I still don't like it because the cloring is very distracting and sometimes I can't even see the colored text it is so faint (a very very light green) it hardly shows up on my PC monitor. Maybe it's my color settings but I am not going to mess with those settings since I spent too much time getting them just right and everything else in color appears to be very good with the exception of some of the colors in the VB code.
Also check the most simplest way to do it....
in my signature...
Thats a good trick ks but if you use Martins utility its much less steps and easier :D
Yeah that is a good trick :DQuote:
Originally Posted by RobDog888
Well, since it is coming from you, then I'll definitely check his utility :thumb:
I'll take your word for it that the one made by MartinLiss is as good as you say it but I see one problem. Not everyone has Word. I don't, so I can't use it. I'm not trying to be disrespectful but I think it should have been written with out any secondary application needed.
You guys can read the posts in the feedback forum thread I linked to in my post for feedback on it and also other workarounds.
This is actually a problem? I can copy the code people have used the highlight tags on directly from here to vb.
Yes you can copy them but the line numbers come along with it and an extra line inbetween.
Thread Moved
I think the simplest way is to simply hit the "Quote" button on the post with the code.
Then, from the Quoted section, just copy the code, and cancel out of the Quote.
To each his own, but I liked mine best.I compiled mine to an EXE and put a shortcut in the taskbar.
When I wanted to copy some code with numbers, I would copy the code,hit the shortcut, and then paste it to my code window.Only 3 steps.1 more than a simple copy/paste.
But that's just me.:D
How can that be eaiser then the standard Copy/Paste operation? The utility intercepts the action and fixes it on the fly. No quoting or other workarounds. If you havent tried it you really should.Quote:
Originally Posted by Hack
Quote:
Originally Posted by RobDog888
Quote:
Originally Posted by Hack
I think the simplest way is to simply hit the "Quote" button on the post with the code.
Then, from the Quoted section, just copy the code, and cancel out of the Quote.
1.Hit the "Quote"
2.Copy the code
3.Paste the code
4.Cancel out "Quote"
I may be looking at it incorrectly but I count 4 steps to my 3.
But like I said , that's only me...:D
The utility...
- Copy
- Paste
:D
Touche'.....Quote:
Originally Posted by RobDog888
:D