Jump to content

MSGBOX text formatting

- - - - -

  • Please log in to reply
3 replies to this topic

#1
HighKing Scott

HighKing Scott

    Newbie

  • Members
  • PipPip
  • 15 posts
Is there a way to have the text in a messagebox.show be centered?

MessageBox.Show("Are you sure you want to change the date value setting to " & ControlChars.CrLf & FormatDateTime(cs), "Date Value", MessageBoxButtons.YesNo, MessageBoxIcon.Question)

I want the "FormatDateTime(cs)" variable to be centered in the messagebox.

#2
wisemonk

wisemonk

    Newbie

  • Members
  • PipPip
  • 10 posts
You cant really center the text in a message box not without eventually making it look messy depending on how good you are for example using images to place the text further to the right is a way in which it can be done or correctly placing button icons. but there is away to align it to the right in the message box options

MessageBoxOptions.RightAlig

or create a separate form duplicating the message box to allow you to center the text.

or you can just try using the a space to center the text and play around with it that way. but can be messy to others if the text is changed.

#3
Machida

Machida

    Newbie

  • Members
  • Pip
  • 4 posts
Or just make your own msg box.
Create a form and make a function open it like a msgbox...

#4
Abu Ehab

Abu Ehab

    Newbie

  • Members
  • PipPip
  • 11 posts
Hi
Try This :
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim D As String = DateString

        MessageBox.Show("Are you sure you want to change the date value setting to " & D & MessageBoxButtons.YesNoCancel)

    End Sub





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users