PDA

View Full Version : آموزش: جعبه پیغام به همراه توضیحات



Ehsan_Shia
دوشنبه 30 شهریور 1394, 21:33 عصر
بسم الله الرحمن الرحیم

سلام علیکم
کد زیر یک جعبه پیغام به همراه توضیحات را در اختیار شما قرار می دهد.

' Get reference to the dialog type.
Dim dialogTypeName = "System.Windows.Forms.PropertyGridInternal.GridErro rDlg"
Dim dialogType = GetType(Form).Assembly.[GetType](dialogTypeName)

' Create dialog instance.
Dim dialog = DirectCast(Activator.CreateInstance(dialogType, New PropertyGrid()), Form)

' Populate relevant properties on the dialog instance.
dialog.Text = "Sample Title"
dialogType.GetProperty("Details").SetValue(dialog, "Sample Details", Nothing)
dialogType.GetProperty("Message").SetValue(dialog, "Sample Message", Nothing)

' Display dialog.
Dim result = dialog.ShowDialog()



ان شاءالله کارآمد باشد.