' New CamBam VBScript

'CamBam.CAD
'CamBam.UI.RichMessageBox

'buttons

'AbortRetryIgnore = 2
'OK = 0
'OKCancel = 1
'RetryCancel = 5
'YesNo = 4
'YesNoCancel = 3

'icon

'Asterisk = &H40
'[Error] = &H10
'Exclamation = &H30
'Hand = &H10
'Information = &H40
'None = 0
'Question = &H20
'[Stop] = &H10
'Warning = &H30


Sub main()

    Dim t As String
    Dim rep As String


    t = "CamBam" & vbNewLine & "My rich message box"

    Dim rmb As RichMessageBox = New RichMessageBox(t, 4, &H20)


    rmb.Text = "Win title"  'title bar
    rmb.Width = 400     'window size
    rmb.Height = 200

    'font, size and style
    rmb.Font = New Font("Verdana", 10.0F, FontStyle.Italic Or FontStyle.Bold)

    rmb.BackColor = Color.Teal  'color of the bottom of the window
    rmb.ForeColor = Color.White 'color of the text in the buttons

    'needed to be able to specify a location
    rmb.StartPosition = System.Windows.Forms.FormStartPosition.Manual

    'window location
    rmb.Location = New System.Drawing.Point(100, 120)

    rmb.Name = "Box 1"  'internal name of the box

    'mouse cursor as cross
    rmb.Cursor = System.Windows.Forms.Cursors.Cross

    ' show the form as dialog (return a value for buttons and is modal)
    rep = rmb.ShowDialog()

    ThisApplication.AddLogMessage(rep)

End Sub