Visual Basic/inputbox

Advertisement


Question
Dear Vitaly  
Thank you for your ansers  last time



I like to ask you just how I can change the size and color at
Input Box & MsgBox,



Thank you

dimitris

Answer
Dear Dimitris,

You can use standard Input Box/Message box:


       Dim inpBox As String = InputBox("Enter String", "My Input Box", "Hello!", 156, 245)

156 here is equal to control Left property and 245 is equal to control Top property

       Dim msg As String = MessageBox.Show("My Text", "My MSG Box", MessageBoxButtons.OK, MessageBoxIcon.Information)

Color, skin and size of Input Box/Message box are System defined, and you cannot change it from the code.

But you to use the form as a message box and you can add a Text field and Image to this new form if you want to make it more beautiful; also you can change the color to what you like or use a skin. Then instead of calling standard Input Box/Message box you can show this form.

Regards,

Vitaly

Visual Basic

All Answers


Answers by Expert:


Ask Experts

Volunteer


VITALY

Expertise

Area of expertise is Visual Basic .NET (VS 2008 and Framework 3.5) design and development for Windows applications. You can ask me any Visual Basic questions and some questions about .NET Framework. You can also ask me how to use Component One controls in Visual Basic. Do not ask me questions about Web design and development in Visual Basic.

Experience

I'm working as VB programmer from 1997, so I have a lot of experience with Visual Basic .NET as well as Visual Basic 6. Area of expertise is Visual Basic .NET (VS 2008 and Framework 3.5) design and development for Windows applications; Component One controls for Visual Basic; User controls; Moving VB6 applications to .NET.

Education/Credentials
B.S. in Computer Science

©2016 About.com. All rights reserved.