Hi all, I make a modalness custom messagebox, that let me click on the calling form. Now on this custom, I have created, two buttons and a dialog result, I also created a public class and Inherits the form where these buttons are. In another form I created a value as a new Dialog_Selection then I edited code where if statement is. Now all of this are inside a for-next loop that will go with the next index only if the yes button it's pressed. I will paste the code for more clarification.
This is what I have in the form4 (the calling one for the custom message box)
Dim mydialog As New Form5.Dialog_mySelection
If mydialog.DialogResult = System.Windows.Forms.DialogResult.Yes Then tempArray(counter) = "[img" & "(" & ComboBox2.Text.ToString & ") ]" & vbCrLf & "[img" & "(" & tempArray(counter) & ") ]" & "(" & tempArray2(counter) & ")"
If mydialog.DialogResult = System.Windows.Forms.DialogResult.Yes Then
While this is what I have on the Form5 (the custom message box)
Public Class Form5
Public Class Dialog_mySelection
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
DialogResult = System.Windows.Forms.DialogResult.Yes
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
DialogResult = System.Windows.Forms.DialogResult.No
What I have tried:
The code above, also now the calling window can be clicked like I wished to achieve, but now the problem is that the windows appear without problem with yes no button, but when clicked on a yes or no, nothing happening. Is there some error in this code? Thanks for the advice.