将标题转换为文本框中的字符串时出现运行时错误 [英] Runtime error while converting caption to string in textbox
本文介绍了将标题转换为文本框中的字符串时出现运行时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Imports AxChemDrawControl12
Public 类 Form1
Dim 标题 As 字符串
公共 Sub Button1_Click(发件人作为 对象,e 作为 EventArgs)句柄 Button1.Click
TextBox1.Text = AxChemDrawCtl1.selection.Objects.Captions
结束 Sub
结束 类
解决方案
在我看来,标题是一个数组。也许试试:
TextBox1.Text = AxChemDrawCtl1.selection.Objects.Captions( 0 跨度>)
Imports AxChemDrawControl12
Public Class Form1
Dim caption As String
Public Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.Text = AxChemDrawCtl1.selection.Objects.Captions
End Sub
End Class
解决方案
it seems to me that captions is an array. maybe try:
TextBox1.Text = AxChemDrawCtl1.selection.Objects.Captions(0)
这篇关于将标题转换为文本框中的字符串时出现运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文