2013-02-12 3 views
1

Visual Basic 2008의 MessageBox에서 글꼴을 굵게 만드는 방법은 무엇입니까?Visual Basic의 MsgBox 용 굵게 글꼴

나는이처럼하고 싶은 :

MsgBox(Documentation: .........) 

어디 "문서"는 굵은 글꼴로 표시됩니다.

답변

1

내장 된 MsgBox 기능으로는이 기능을 수행 할 수 없습니다. 당신이 정말로 필요하다면 당신 자신을 만들어야 할 것입니다.

+1

또는 win32 API를 사용하여 연결하면됩니다.하지만 다시 ... 직접 대화를 만드는 것이 훨씬 쉽습니다. – Styxxy

3

VB의 MsgBox에서 굵은 텍스트를 허용하지 않습니다. 형태의 코드로 이동)

1)는를 RichTextBox 3) 당신이 원하는 명령 단추의 #/필요 4 추가 추가 "새 Windows 양식" 2) 추가 : 여기 그 해결 방법입니다 다음과 같이하십시오.

Public Sub CustomMessageBox(ByVal msg As String, ByVal isBold As Boolean, ByVal color As System.Drawing.Color, ByVal buttonOneText As String, ByVal buttonTwoText As String, ByVal startBoldAt As Integer = 0, ByVal endBoldAt As Integer = 0) 
' Use parameters to pass the values you want to show 
' startBoldAt will be the position in the string where you want to have bold lettering begin, and endBoldAt will be the position in the string where you want bold lettering to end. 
End Sub 

Then you can do: 
Dim cmb as CustomMessageBox = New CustomMessageBox('Your parameters) 
' Add a sub that will let you show the CustomMessageBox 
cmb.Show() 

희망이 있습니다.