Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Messagebox truncating text

Status
Not open for further replies.

SteveShanks

Programmer
Nov 28, 2001
112
GB
Hi

I'm using a standard messagbox call to put some text on the screen. I build the message by concatening text into a string variable like this:


strMessage = "WARNING!" & vbCrLf
strMessage = strMessage & "'Completed' date has been removed." & ControlChars.CrLf & ControlChars.CrLf
strMessage = strMessage & "All dependant items will also have the Completed date removed!"

If (MessageBox.Show(strMessage, "Job Completion", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) = DialogResult.OK) Then
End If

The message is getting cut off after 'All dependant items will also have the Completed date' so missing 'removed!' text

What is going on?

Thanks
teve
 
not sure, but ControlChars.CrLf may be a lot longer than vbcrlf you might want to try vbcrlf



if it is to be it's up to me
 
Works fine for me. Is the DPI setting in Display Properties set to something other than normal ? Shouldn't matter, but may be causing the message box layout to go screwy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top