Android Question How to do as in visual basic

I'm sorry if an answer to this question has already been posted, but I didn't find anything in the forum.
Is it possible to do the following in B4A like Visual Basic
Last edited:


Well-Known Member
Licensed User
The built-in MsgBoxAsync does not have the ability to display icons in the pop-up prompt.

Do a forum search of "custom dialog" to get a list of libraries that can do what you want.
I am developing a custom message box with four icons, which I will enlarge later. That's why I want to select them from the drop-down menu directly in the B4A editor, in principle in visual basic.


Well-Known Member
Licensed User
You can create it as a class and add in the class public variables that will represent the images whether directly or indirectly.
Dim mymsg As Mymsgclass
'You will have to create a public "Show" method in the class
mymsg.Show("Message", mymsg.Critical, "Title")
For now I wrote the code like this:
Sub MsgC (Prompt As String, Icon As Int, Title As String, Yes As String, No As String, Cancel As String) As ResumableSub
    Dim bmIcon (10) as Bitmap
    bmIcon(1) = LoadBitmap(File.DirAssets,"icon1.ico")
    bmIcon(2) = LoadBitmap(File.DirAssets,"icon2.ico")
End Sub
I searched the forum for B4XDialog, but did not find it.
I only found out that it is a class module but I didn't find it anywhere!

Maybe I can't find my way or B4XDialog has been removed.


Active Member
Licensed User
B4XDialog is part of the XUI Views library. Add that library and then you will be able to declare:
Dim dialog as B4XDialog