我如何在文章中写一些鳕鱼? [英] how do i put something as a cod in an article?

查看:62
本文介绍了我如何在文章中写一些鳕鱼?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的文章中加入以下代码作为人们的代码,但我不能.有人可以帮帮我吗?告诉我如何执行此操作或编辑并执行.

i want to put the following code as a code for people in my article but i cant. can someone please help me? Either tell me how to do it or edit this and do it.

Public Class Form1 Dim int As Integer = 0 Private Sub Loading(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserProgressChangedEventArgs) ToolStripProgressBar1.Maximum = e.MaximumProgress ToolStripProgressBar1.Value = e.CurrentProgress End Sub Private Sub Done(ByVal sender As Object, ByVal e As Windows.Forms.WebBrowserDocumentCompletedEventArgs) TabControl1.SelectedTab.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).DocumentTitle ComboBox1.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Url.ToString End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Browser As New WebBrowser TabControl1.TabPages.Add("New Page") Browser.Name = "Web Browser" Browser.Dock = DockStyle.Fill TabControl1.SelectedTab.Controls.Add(Browser) AddHandler Browser.ProgressChanged, AddressOf Loading AddHandler Browser.DocumentCompleted, AddressOf Done int = int + 1 CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://google.com") End Sub Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click Dim Browser As New WebBrowser TabControl1.TabPages.Add("New Page") TabControl1.SelectTab(int) Browser.Name = "Web Browser" Browser.Dock = DockStyle.Fill TabControl1.SelectedTab.Controls.Add(Browser) AddHandler Browser.ProgressChanged, AddressOf Loading AddHandler Browser.DocumentCompleted, AddressOf Done int = int + 1 CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://google.com") End Sub Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click If Not TabControl1.TabPages.Count = 1 Then TabControl1.TabPages.RemoveAt(TabControl1.SelectedIndex) TabControl1.SelectTab(TabControl1.TabPages.Count - 1) int = int - 1 End If End Sub Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).ShowPropertiesDialog() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoBack() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoForward() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Refresh() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).GoHome() End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Stop() End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate(ComboBox1.Text) End Sub Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click If RadioButton1.Checked Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://www.google.co.in/search?hl=en&q=" & ComboBox2.Text & "&btnG=Google+Search&meta=") End If If RadioButton2.Checked Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://search.yahoo.com/search?p=" & ComboBox2.Text & "&fr=yfp-t-501&toggle=1&cop=mss&ei=UTF-8&fp_ip=IN&vc=") End If If RadioButton3.Checked Then CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).Navigate("http://www.youtube.com/results?search_query=" & ComboBox2.Text & "&search_type=&aq=-1&oq=") End If End Sub Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).ShowPrintDialog() End Sub Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).ShowPrintPreviewDialog() End Sub
End Class


预先谢谢你,
dagronzzan


thank you in advance,
dagronzzan

推荐答案

要将代码格式化为代码块,并且如果使用WYSIWYG编辑器,则在左侧下拉列表中选择格式化",并设置语言您的代码块,第二个下拉菜单.

如果您不使用WYSIWYG编辑器,而是HTML编辑器,
然后将代码写入pre标记,并使用lang属性设置代码块的语言.
例如:
To format code as a code block, and if you use the WYSIWYG editor, then choose "Formatted" in the left drop down, and set the language of your code block with the second drop down.

If you''re not using the WYSIWYG editor, but the HTML editor,
then write your code into pre tags, and set the language of your code block with the lang attribute.
For example:
<pre lang="C#">
// your code
</pre>


是的,只能在HTML源代码模式下准确地进行操作. WISIWYG仅适用于相对较慢的工作.使用标签,就像您在问题中所做的那样.请参阅我对此的评论.

使用像这样的标签:
Yes, do it in HTML source mode, only accurately. WISIWYG is only good for relatively slow work. Use the tags as you did it in your question. Please see my comment to it.

Use the tags like this one:
<pre lang="vb">
... your code here ...
</pre>


您需要保留所有其他格式.过去时,您可以根据自己的内容使用过去选项.如果您预先格式化包括HTML标记在内的所有内容,则需要按原样粘贴".

—SA


You need to preserve all additional formatting. When you past, you can use the past option, depending on your content. If you pre-format everything, including HTML tags, you will need "paste as is".

—SA


这篇关于我如何在文章中写一些鳕鱼?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆