ArcGIS Pro 2.7 API Reference Guide
ShowMessageBox Method
Example 

ArcGIS.Desktop.Core.Geoprocessing Namespace > Geoprocessing Class : ShowMessageBox Method
Pass messages from the result (IGPResult) of ExecuteToolAsync to be shown on the message box.
Header of the messages.
Geoprocessing message box style, for example, GPMessageBoxStyle.Default or GPMessageBoxStyle.Error
Title at the top bar of the message box.
Path to a icon image to be shown next to content header.
Shows a messag box with Geoprocessing messages as formatted for the message box.
Syntax
Public Shared Sub ShowMessageBox( _
   ByVal messages As IEnumerable(Of IGPMessage), _
   ByVal content_header As String, _
   ByVal style As GPMessageBoxStyle, _
   Optional ByVal window_title As String, _
   Optional ByVal icon_source As String, _
   Optional ByVal parentViewModel As ViewModelBase _
) 

Parameters

messages
Pass messages from the result (IGPResult) of ExecuteToolAsync to be shown on the message box.
content_header
Header of the messages.
style
Geoprocessing message box style, for example, GPMessageBoxStyle.Default or GPMessageBoxStyle.Error
window_title
Title at the top bar of the message box.
icon_source
Path to a icon image to be shown next to content header.
parentViewModel
Example
var gp_result = await Geoprocessing.ExecuteToolAsync("management.GetCount", Geoprocessing.MakeValueArray(@"C:\data\f.gdb\hello"));
// this icon shows up left of content_header
string icon_src = @"C:\data\Icons\ModifyLink32.png";
Geoprocessing.ShowMessageBox(gp_result.Messages, "Content Header", GPMessageBoxStyle.Error, "Window Title", icon_src);
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Geoprocessing Class
Geoprocessing Members