声明结束预期 [英] End Of Statement Expected

查看:63
本文介绍了声明结束预期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这里有一个代码供你们查看,当我运行应用程序它不会让我并且它说"结束声明预期"时,请仔细查看我的代码,并且回复正确的代码,



Public Class Form1

    Private Sub Button1_Click(发件人为对象,e为EventArgs)处理Button1.Click

        PrintPreviewDialog1.ShowDialog()

   结束分


    Private Sub Button2_Click(发件人为对象,e为EventArgs)处理Button2.Click

        PrintDocument1.Print()

   结束分


    Private Sub PrintDocument1_PrintPage(发件人为对象,e为Printing.PrintPageEventArgs)处理PrintDocument1.PrintPage

        Dim font1 As New Font(" arial",16,FontStyle.Regular)e.Graphics.DrawString(RichTextBox1.Text,font1,Brushes.Black,100,100)

   结束点¥
结束等级

解决方案

你似乎错过了一个逗号



I have a code here for you guys to have a look at, when i run the app it wont let me and it says "End Of Statement Expected", Please have a close look at my code, and reply with the correct code,

Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        PrintPreviewDialog1.ShowDialog()
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        PrintDocument1.Print()
    End Sub

    Private Sub PrintDocument1_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
        Dim font1 As New Font("arial", 16, FontStyle.Regular)e.Graphics.DrawString(RichTextBox1.Text, font1, Brushes.Black, 100, 100)
    End Sub
End Class

解决方案

You seem to be missing a comma


这篇关于声明结束预期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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