次のコードを使用して VB 2010 での書き込みに問題があります。
Public Sub about(ByVal sender As System.Object, ByVal e As System.EventArgs)
MessageBox.Show("Omega Management System © Shelby Taylor 2013 ******@gmail.com", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
プログラムの舞台裏でいくつかのデータベース接続を保持するための汎用「ホルダー」として使用しているモジュールにこのコードがあります。ユーザーがボタンをクリックした場合に連絡先情報を表示するメッセージボックスサブプロシージャを作成したいと思います。その場合、このプロシージャを呼び出してメッセージボックスを表示します。
次のエラーが表示されます。
Error 1 Overload resolution failed because no accessible 'Show' can be called without a narrowing conversion:
'Public Shared Function Show(owner As System.Windows.Forms.IWin32Window, text As String, caption As String) As System.Windows.Forms.DialogResult': Argument matching parameter 'owner' narrows from 'String' to 'System.Windows.Forms.IWin32Window'.
'Public Shared Function Show(owner As System.Windows.Forms.IWin32Window, text As String, caption As String) As System.Windows.Forms.DialogResult': Argument matching parameter 'text' narrows from 'System.Windows.Forms.MessageBoxButtons' to 'String'.
'Public Shared Function Show(owner As System.Windows.Forms.IWin32Window, text As String, caption As String) As System.Windows.Forms.DialogResult': Argument matching parameter 'caption' narrows from 'System.Windows.Forms.MessageBoxIcon' to 'String'.
'Public Shared Function Show(text As String, caption As String, buttons As System.Windows.Forms.MessageBoxButtons) As System.Windows.Forms.DialogResult': Argument matching parameter 'caption' narrows from 'System.Windows.Forms.MessageBoxButtons' to 'String'.
'Public Shared Function Show(text As String, caption As String, buttons As System.Windows.Forms.MessageBoxButtons) As System.Windows.Forms.DialogResult': Argument matching parameter 'buttons' narrows from 'System.Windows.Forms.MessageBoxIcon' to 'System.Windows.Forms.MessageBoxButtons'. M:\oms\omega_managment_system\WindowsApplication1\globalStructures.vb 21 9 Omega Managment System
そして、私は何が起こっているのか理解できません。誰かが問題の内容とその修正方法を説明してもらえますか?
ありがとうございました。