How to format code for a post
I have taken a look a brief tutorial which depicts a c3 and vb button , but for the file of me I can not located these buttons anywhere
Please help , I dont want to torture other users with unformated code!
I have taken a look a brief tutorial which depicts a c3 and vb button , but for the file of me I can not located these buttons anywhere
Please help , I dont want to torture other users with unformated code!
I made a simple addin with developers express free dxcore which adds a copy as text in the context menu when you right click in the code editor. You can see my blog entry on how to create one yourself.
Private Sub ucboToWarehouse_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles ucboToWarehouse.Validated
InvHeadBs.AddNew()
Dim row As Data.DataRowView
row = TryCast(InvHeadBs.Current, Data.DataRowView)
row.Row("amIToWarehouseID") = Me.ucboToWarehouse.SelectedValue
End Sub
Not Pretty!
The problem is that when i create a new thread I simply can not highlight and mark as vb code,
I promise I am not blind , I have tried using IE and Firefox , I swear the buttons are not there!
You can use markup like [code language="vb"], the code and closed by [/code]
Private Sub ucboToWarehouse_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles ucboToWarehouse.Validated InvHeadBs.AddNew() Dim row As Data.DataRowView row = TryCast(InvHeadBs.Current, Data.DataRowView) row.Row("amIToWarehouseID") = Me.ucboToWarehouse.SelectedValue End Sub |
I have also found a tool that will copy source code from vs 2005 as html ,
http://www.jtleigh.com/people/colin/software/CopySourceAsHtml/
CopySourceAsHtml (CSAH)
It seems that this tool will also allow you to create the light grey table around the code and preserve the formatting
Mule,
cool! Thanks for sharing it.
So far I have mostly not been using VS2005 but its express edition. They do not support add-ins but for those that use the full version it will be helpful.
If it helps other to post more readable samples it is helping all that want to help. Great!
Thanks again!
Andreas Johansson wrote:
You can use markup like [code language="vb"], the code and closed by [/code]
Is that a literal markup or an html mode markup? Does one specify the blocks in the editor, paste the code and upon posting it is shown pretty?
Also what would one use for C#? (C# or CSHARP)?
Thanks!