visual-studio-2010 - 如何在 Visual Basic 中给文本加下划线(使用 Visual Studio 2010)

标签 visual-studio-2010 vba

在 Visual Basic 中按下按钮后,下划线文本出现问题。我正在使用 Visual Studio 2010 并且我在教程中红色,在按钮方法中我必须使用例如:

lbltext.FontUnderline = True

但我没有变量“FontUnderline”。当然,我试图找到其他变量或函数来做到这一点,但没有成功。有人知道如何在 Visual Studio 中执行此操作吗?

最佳答案

内联答案如下所示:

Me.lbltext.Font =  New Font(lbltext.Font, FontStyle.Underline)

这将节省多行代码。

关于visual-studio-2010 - 如何在 Visual Basic 中给文本加下划线(使用 Visual Studio 2010),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12460079/

相关文章:

c++ - Visual Studio 2010 native C++ 代码覆盖着色不起作用

c++ - Visual C++ 2008中如何将MFC应用程序项目添加到Win32应用程序项目中

c# - 创建 StackOverflow 异常的扩展

excel - VBA 运行时错误 : save PowerPoint Presentation as PDF

excel - 复制并粘贴到工作表中,谁的姓名不等于列表中的值?

database - 这个 VBA 代码有什么问题

c# - 如何在 Mono 中运行 MVC3 或更新的应用程序

c++ - PCL 云可视化 Visual Studio 2010

vba - 使用 VBA 直接获取 Excel 单元格

ms-access - 一旦在 VBA/Access 2003 中设置,就无法从字典中提取值