Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Visual Basic Message Box Font Change

I would like to be able to change the font size in the below message box. Is there any way that I can do this in visual basic?

Message = "Your Order For " & ACCTNAME & " Has Been Successfully Logged and is Ready for Email."
MsgBox (Message)


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How Can I Change Font Of Outlook Message From VB ?
I post here the basic version of my code that simply send a string (sBody) to Outlook mail.

But the string has to be formatted in Courier New or any font which has a fixed size.(I need it to correctly displayed my string sent to Outlook, in columnized fashion)

It is easy in Outlook itself :
-Highlight the text in body (message)field
-Click "Format" menu item
-Click "Font" submenu item
-Choose font there
-Click "OK"

from within VB I do not know how to do it

It must be similar to foll which is good for Word :

Set wrdApp = CreateObject(Class:="Word.Application")
wrdApp.Selection.Font.Name = "Courier New"
wrdApp.Selection.Font.SIZE = 12

How can I do it from within VB for Outlook ?

<pre>Private Sub TransferToOutlook(ByVal sBody As String)
Dim olApp As New Outlook.Application
Dim olMail As Outlook.MailItem

Set olApp = CreateObject(Class:="Outlook.Application")
Set olMail = olApp.CreateItem(olMailItem)

olMail.Subject = frmMain.Fg1.TextMatrix(0, 0)
olMail.Body = sBody
<font color=red>'''****** FORMAT BODY HERE***********'''</font color=red>

Set olMail = Nothing
Set olApp = Nothing
Exit Sub
End Sub

How To Change The Font Style On Your Message Box And Inputbox?
I'm always using the message box and inputbox to display data container. I'm just wondering if there is a way to change the font size, color and style of the font on the message box and inputbox? Thanks

Change Font Of Email Message Using Outlook Automation
How do you set the font of a new email message? I'm using an outlook object to send email from my vb app, but I can't seem to change the font of the body of the message.

Change Font Of Email Message Using Outlook Automation
How do you set the font of a new email message? I'm using an outlook object to send email from my vb app, but I can't seem to change the font of the body of the message.

What Is Visual Basic VB6's Font?
What are some best practices of being able to look at large amounts of a 1024 x 768 pixels? Not everyone has a big screen monitor so (with that in mind) what is the best way to get a zoomed out section of code to make your coding adjustments?

I figure it to be on a printed page but I would like the exact same way it looks in my VB editor with some of my own adjustments and highlights! Now I know that I can do that with a color printer and just Print from VB but...I would like to copy all of a form's code onto Word so that I can make slight changes. The problem is that when I select a section of code and PASTE it onto Word it doesn't keep the formatting...(the green REM (') statements and the font is not exactly the same as the VB program.

What is Visual Basic 6.0's font?

My Font In Visual Basic...
Hi !
My name Tuan. I'm from Vietnam. I use Visual Basic 6.0, but I don't known how to add my font in a VB Apllication. Would you like to help me, please ?

If you are a Vietnamese, you can use the Vietnamese (languague) in your reply message.

Thank you very much !

Visual Basic Menubar Font
Hi all
i developing an application in which i want to change the font of menu designed in any form in visual basic.I got a success by popmenu icon dll from vbaccelerator. It only changes the font of the menu sub items. but do not change the font of the items in menubar. can any one provide me the code for this or athe articles from which can me to solve this problem.

Ajay Singh

Code Change From Visual - Visual Studio 2005
I am working on a tuturial that i have for Visual ( for now )

I am working with Visual Studio 2005.

I have been working on a code to change the text color by the name put into
the text box.

Visual Basic .Net code.
Label2.ForeColor = Color.FromName(TextBox1.Text)

i get the error
Name 'Color' is not declared.

I was wondering if someone can show me how things would be in Visual Studio.

thank you

Visual Basic Form Menu Font
How do you change the font of a drop down menu on a VB form? Are we all stuck with the standard Windows font? This is expecially inconvenient when working with languages that do not use a Romanized alphabet (I work in Cambodia).

Parsing A Message In Visual Basic

I'm trying to parse a message in Visual Basic. I've been trying to get the program to open a file, read it contents, break the file into segments, and output the segments to another text file. The delimiter to search for is "|". I'm not remotely close. I've tried several different codes, but I keep experiencing some error messages. I'd really appreciate it if anyone can help me. Thank you!

Visual Basic Error Message!
I just designed a nice little program that lets me scroll through a database I made with little fuss. Now I have bypassed the first error's I was getting (something to do with ADO) but now I face a new problem. I can easily run the .exe on my computer (then computer i designed the program on) but when I move it to another computer it comes up with a strange error message. So I changed some of the properties and put the database file in c:/database.mdb then I swapped computers and put the database in the right directory but I still get this strange error message. It is saying something like CLASS NOT REGISTERED CLSID, i'm baffled.

Visual Basic Error Message?
Hi, everyone.

When trying to compile a dll project, visual basic display the following message:

No creatable public component detected.

and i can´t compile the dll project ,What should i do ?


Visual Basic Error Message
Apologies If I am in the wrong place -could you direct me to the right place if not - but.....

I get this message when trying to load some software I recently bought-

Visual basic 6.0 tool kit has encountered an error and has to close.

I am running Windows XP and have service pack 2.

Do i reinstall Visual Basic 6? if so where from, and which is the correct link I need to click to do so?

Cheers in antisipation.

Visual Basic Error Message - Help Required
I get this message when trying to load some software I recently bought-

Visual basic 6.0 tool kit has encountered an error and has to close.

I am running Windows XP and have service pack 2.

Do i reinstall Visual Basic 6? if so where from, and which is the correct link I need to click to do so?

Cheers in antisipation.

If I am in the wrong place, could someone tell me where the right place is?

How To Make Visual Basic Type A Message For U
Let's say I'm playing an online game and I am in the lobby right now with internet explorer and there is a chat. Let's also say that I wanted to say "eClipse is afk right now" every 5 minutes. How would I make visual basic type and press enter for me.

Outlook Message Body From Visual Basic
I posted this yesterday - no response. Maybe the right people didn't see it.

I know how to programmatically create and send an Outlook message from a vb app. But how can I center the body, or even better, how can I center one part of it and left-align the rest of it?

Thanks for any help.

Unicode Display In Visual Basic Message Box
Hi Hi!

Something that I really need some feedback from anyone who had done this before. I'm trying to display some unicode character ( eg: chinese, japanese character ) into the message box. But then what I got is just " ??? " character.

I know that by starting the program like Chinese Star, I will be able to view it correctly but I'm trying to develop a program that we don't have to start a third party software to run the program correctly.

I managed to find out that Microsoft Form 2 Objects support unicode character but I'm still searching for solutions on the menu and message box on how to display the unicode character out without having to run a third party software.

Anyone with any ideas on how to do this? Thanks for the help in advance !

Sending An Email Message Using Visual Basic 5.0
Saving a movie using Visual Basic code on the Axis 2100 network camera

The Visual Basic code below allowed me to save a single image to a hard drive.

1) Now. How do I go about to save a continuous movie file, or to save images continuously as I see it on the screen. The file should grow larger every second. What function call would I use to accomplish this ?
The Axis website at does
show how to save a single image but not how to save a continuous video stream (movie).



Option Explicit

Private Sub Retrieve_Image_Click()
CamImage1.URL = ""
End Sub


Private Sub Save_An_Image_Click()
'There has to be a picture in the CamImage1 in order for it to save
'an image file. If there is no picture in the CamImage1 then nothing is saved.

CamImage1.SaveImage "C:/Camera_Image/Image1.jpg"

End Sub


Private Sub CamImage1_OnNewImage()
Dim b As Variant
Dim size As Variant
Dim a() As Byte
Dim i As Integer

Call CamImage1.GetCurrentImage(b, size)
a() = b
Open "C:/Camera_Image/Movies1.jpg" For Binary Access Write As #1
Put #1, , a()
Close #1

End Sub

Message Button (Visual Basic In Excel)

I am working on an excel form that has Visual Basic commands. The first sheet (Input Form) has several radio buttons and text boxes. This sheet has a submit button, once clicked will copy the information to the second sheet (Raw Data).

Anyone who could help me create a message box that will prevent the form being submitted unless all required fields are filled out?

Thanks for your immediate help.

PS. This is what I have so far in VB.

Private Sub cmdsubmit_Click()

Dim ilast
ilast = GetLastLine

If Me.comment1.Value = "" Then
Me.comment1.Value = "-----"
End If
If Me.comment2.Value = "" Then
Me.comment2.Value = "-----"
End If
If Me.comment3.Value = "" Then
Me.comment3.Value = "-----"
End If
If Me.comment4.Value = "" Then
Me.comment4.Value = "-----"
End If

If Me.ia7.Value = True Then
Worksheets("Raw Data").Cells(ilast, 13).Value = "7"
End If
If Me.ia6.Value = True Then
Worksheets("Raw Data").Cells(ilast, 13).Value = "6"
End If
If Me.ia5.Value = True Then
Worksheets("Raw Data").Cells(ilast, 13).Value = "5"
End If
If Me.ia4.Value = True Then
Worksheets("Raw Data").Cells(ilast, 13).Value = "4"
End If
If Me.ia3.Value = True Then
Worksheets("Raw Data").Cells(ilast, 13).Value = "3"
End If
If Me.ia2.Value = True Then
Worksheets("Raw Data").Cells(ilast, 13).Value = "2"
End If
If Me.ia1.Value = True Then
Worksheets("Raw Data").Cells(ilast, 13).Value = "1"
End If
If Me.iana.Value = True Then
Worksheets("Raw Data").Cells(ilast, 13).Value = "NA"
End If

Worksheets("Raw Data").Cells(ilast, 1).Value = comment1.Text 'edit the column

Me.iana.Value = True

Me.comment1.Value = ""

End Sub

Private Sub cmdreset_Click()
Me.iana.Value = True

Me.comment1.Value = ""
Me.comment2.Value = ""
Me.comment3.Value = ""
Me.comment4.Value = ""

End Sub

Send A Sms Message From Visual Basic Thru A Gsm Modem
hello, i have some knowledge about visual basic programming, what i cant figure out is how to send a sms message using a gsm modem connected to the serial port. your help would be appreciated

How To Implement The Popout Help Message Using Visual Basic?
When the mouse points to the control, for example, a command button, in the program's window, there pops out some message
to explain the function of the control. When the mouse moves
off the control, the popout help message automatically disappears. Is there a easy way to implement the above function using Visual Basic? Thanks.

Having Problems Opening Email Message From Visual Basic 5
Hi all

I'm using the below function, to open a new email message, and feed in an email address, subject and a 'body' of the email (Note I don't want to send an email, just open the message and paste in contents)...

VB Code:
Public Function OpenEmail(ByVal EmailAddress As String, _     Optional Subject As String, Optional Body As String) _     As Boolean      Dim lWindow As Long     Dim lRet As Long     Dim sParams As String          sParams = EmailAddress     If LCase(Left(sParams, 7)) <> "mailto:" Then _         sParams = "mailto:" & sParams    If Subject <> "" Then sParams = sParams & "?subject=" & Subject              If Body <> "" Then         sParams = sParams & IIf(Subject = "", "?", "&")         sParams = sParams & "body=" & Body     End If     lRet = ShellExecute(lWindow, "open", sParams, _     vbNullString, vbNullString, SW_SHOW)         OpenEmail = lRet = 0  End Function

The problem is, I want to feed a 'body' of text that includes returns after each line of text. As it stands, it just feeds one long line of text, containing company name, phone number etc. I've tried VbCrlF, Sendkeys to send tabs to the email message etc, nothing seems to work.

It just pastes a huge long line of information. I've tried putting vbCrLF's at the end of the strings that are grouped together (with '&') to form the final body string etc, no go...

Any ideas? I'm using VB5 to do this.

Aplication Visual Basic Finished And Don't Send Message.
My problem is that my aplication is running and sometimes the aplication is aborting and don't send message, the error ocurred from today in a lot of computers that use the aplication. the majory uses windows 2000, xp, 98.

How To Capture Error Message From DOS Prompt With Visual Basic
Would like to know how to capture an error message from a DOS Prompt with Visual Basic 6. Any ideals would be great.

To Change DP Of The Msn Messenger From Visual Basic??
hello, I am new here I am looking for the way to change my AVATAR (DP) from visualbasic I want to finish my small application.

excuse if my English is something bad because I am using a translating one and not you well if he/she has understood my question.

thank you



How To Change C# Language To Visual Basic?
who know how to translate below C# code to visual basic:
Public void Run()
TcpClient the C=listener.AcceptTcpClient();
if (theC==null)continue;
this.lStatus.Text="One client is connected";
theClient=new ChatCllient(theC)

Change Visual Basic Defaults
Is there a way to change the default options in VB? For example, if I insert a new Label into a form, the default option for Backstyle is Opaque. How could I change this to Transparent?

Fonts Change In Visual Basic
I've got a very interesting problem... I work with another programmer on the same program, but on separate machines. When I make a change, I give him the .frm, .frx, and .bas files I made changes to. When he makes a change, he gives me those files.

Everything has worked nicely for the last 5 years. Recently, though, I copied the entire program folder from his machine into mine and now, in my machine the fonts of all the controls in all the forms are changed from MS Sans Serif to Arial. In his machine, the fonts are not changed - they're still MS Sans Serif. In mine, they're Arial.

Now, if I go back to an older backup from my machines, the fonts are proper. Any idea what might be causing this?


J.C _________________________________
I think, therefore I am. [Rene Descartes]

Change Intern Dateformat Of Visual Basic?? Help :(

is it possible to change the intern dateformat of vb to an own format?

My problem is that the german dateformat "" is not valid with english/u.s-format "m/d/yyyy" so isdate("01.01.2004") returns the error it is not a valid date on other localisation than german.
If i change windows localisation to german it works of cause - but i want to do this temporaly für my projet - or vb should not use system locale setting, than own... any ideas??



Change File Properties In Visual Basic 6.0

I have to make a DIB file Read-Only using visual basic code.
any solution will be of great help.

How To Change Printer Orientation Using Visual Basic
I need to print a report in landscape format. I have tried to code it using Visual Basic but it didn't work. The printer orientation didn't change.

How Do I Change The Path Throug Visual Basic
my curdir is "C:program files"
and my app.path is "C:TValue"
how do i change my drive path to app.path

Change Menu Background Color Using Visual Basic

How to change Menu Background color using Visual Basic.

I can use SetSysColor but it changes the colors for all applications. ...
Or is there a way to use SetSysColor only for the current thread????

Change The Visual Basic Executable File Configuration
hi all ,

i am the new programmer and don't know anything about VB

My company uses the software which was developed in VB

this software stores the records in access database , shows them , edit them
and when the person hit the transfer button , it transfer that information on the live website and insert in mysql there.

Now everything is set on the one computer , which we are using for 7 years.
Now i want to shift that system to new computer

what things i need to tranfer to new computer

I have exe file of visual basic and microsoft access database file

But when execute the vb file it displays error as data source name not valid

Please help

Windows 2000 And Visual Basic 6.0 . . . Is There Going To Be Change In Programming?
Hello i was wondering when windows 2000 comes out is there going to be an effect on how programs are made with Visual basics or VC++ Like can visual basic make window 2000 applications or Do i have to learn everything all over again so that you can make programs with that work with windows 2000 or is there no change at all? thanks for your time!

How To Change Menu Item Colour Visual Basic 6.0
how to change menu item colour visual basic 6.0 ...?

How To Change BackColor Of TabStrip Heading In Visual Basic
Hi Friends,
Plz help me, if anybody knows How to change BackColor of TabStrip Heading in Visual Basic. This is very urgent. Send me reply to the following mail id.
Mail id : or
With Regards,

Change The Data In Microsoft Word To Flexgrid In Visual Basic
Hi all,

I have a problem, the data in the table and this table in the microsoft word. Change this data to flexgrid in the visual basic. Please!


How To Read/Change Properties Of MS Word Document Using Visual Basic?
Does anyone know how to read/change the properties of MS Word document (eg. Title, Subject, Company, etc) using Visual Basic?

How To Read/Change Properties Of MS Word Document Using Visual Basic?
Does anyone know how to read/change the properties of MS Word document (eg. Title, Subject, Company, etc) using Visual Basic?

Change Language Settings In Visual Basic 6 Service Pack 5.0
I have written an application which support more than one language. But when I right click and see the properties of the EXE, the language settings for all the langauges say 'English US'. I would like to change this to the respective languages.I tried the International Package and Deployment Kit(VBLocal.exe) but no success. Any suggestions , ideas...


Visual Basic Code That Will Change The IP Address Of The DNS Server On Windows 2000
Visual Basic code that will change the IP address of the "Preferred DNS server" on Windows 2000 and XP

On Windows 2000, right click "My Network Places" --> Properties --> "Local Area Connection" --> Properties --> highlight "Internet Protocol (TCP/IP)" --> Properties --> Use The following DNS server address.

1) How do I write a Visual Basic code that will change the IP address of the DNS server as shown above where one would do it manually. What API would I use?

2) How do I write a Visual Basic code that will access the IP address of the DNS server as shown above where one would obtain it manually. What API would I use?

Crystal Reports 8.5 And Visual Basic 6--Err Message" Server Has Not Yet Been Opened"
I have been trying to get a pre-developed crystal report to display in a VB6 app at runtime. I can get the report to display with saved data, but when ever I use the .DiscardSavedData method and try to refresh the data I get an error message. The message is this "Server has not been opened". This is my first encounter with this version of Crystal 8.5, so I am sure that I am not using a certain method that is needed. Another question I had is do I even need to open an ADO recordset to populate the report?

Also, one other thing to point out is that my report is using to different tables from with in the same database.

'Declare GS Connection
Public cnGS As New ADODB.Connection

'Declare Connection String Variable
Public sGSConString As String

'Declare ADO record set
Public rsSelect As New ADODB.Recordset
Public rsExec As New ADODB.Recordset

'Declare SQL query string
Public sSQLSelect As String
Public sSQLExec As String

' Declare the application object
Public crxApplication As New CRAXDRT.Application

' Declare report object
Public crxReport As CRAXDRT.Report

Private Sub cmdViewReport_Click()

Call LoadReport

End Sub

Private Sub Form_Load()

Call OpenDatabase

End Sub

Public Function LoadReport()

Set crxReport = New CRAXDRT.Report
Set crxApplication = CreateObject("crystalruntime.application")

Set crxReport = crxApplication.OpenReport("C:Report1Test.rpt", 1)

crxReport.Database.SetDataSource rsSelect

crvViewer.ReportSource = crxReport

End Function

Public Function OpenDatabase()

'Setup the GS database connection
Set cnGOS = New ADODB.Connection
sGSConString = "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=noway;Password=nohow;Initial Catalog=GR;Data Source=GS"
cnGS.ConnectionString = sGSConString
cnGS.CursorLocation = adUseClient


rsSelect.Open sSQLSelect, cnGS, adOpenDynamic, adLockReadOnly

End Function

Any suggestions would be appreciated!

Vb6 - How To Change MDI Form Caption Font I.e. Titlebar Font
How can i change MDI form titlebar text font? i want to use different font than system font, i tried SystemParametersInfo() API function but failed. remember i am a beginner

How To Change The Font Type And Font Size For A Menu Bar?
Dear all,
I meet a problem in my application. How can i change the font type and font size for the menu used in th form? Since my application is run on 1280x1024, it is too small to see the type on the menu bar. Could anyone help me? Very urgent!!! Thanks.


CommonDialog Box Font Box - Font Doesn't Change
I'm using the ShowFont feature of CommonDialog in VB 6.

I have a Rich text box called RTB1

With comDlg1
.DialogTitle = "Font" 'set the dialog title
.Flags = cdlCFBoth
End With

RTB1.SelFontName = comDlg1.FontName
RTB1.SelFontSize = comDlg1.FontSize
RTB1.SelBold = comDlg1.FontBold
RTB1.SelItalic = comDlg1.FontItalic
RTB1.SelStrikeThru = comDlg1.FontStrikethru
RTB1.SelUnderline = comDlg1.FontUnderline

When I select a font from the box and hit ok - I don't see the font change in the Rich Text Box (for e.g, the font size) .. I step through the code and the .SetFontName , .SelFontSize etc properties of the Rich Text box are getting set from comDlg1 ... but there're no visible changes to the font..

Appreciate any help - thanks.

Font Icons (like In The Change Font Dialog)
Ok, im loading fonts into a combobox (ComboBoxEx) - And I want to add the proper icon next to each font if they have one, like it is in the Change Font system dialog.

Im using the character set value right now but by comparing my results to the change font dialog, I dont think thats close to right, or im just not doing it right.

Can someone show me how to determine what icon (if any) goes to a particular font?

Popupmenu Background Color Change As Well As Font Size Change
hi folks
am creating one popupmenu using createpopupmenu() API
and also i insert items dynamically using insertmenuitem API
and display using Trackpopupmenu().
My problem is

1)i want to change the background color of popup menu?????
2 i want to change the font size in popup menu ???????
dynamically .
if any body know API or how to change the font size and change the background color in popupmenu ,please help ur friend.

I don't need menu editor.
i need only popup menu.
expecting a positve reply.

Change Font With Printer.Font.Name
I am using:
  Printer.Font.Name = "Courier"
  Printer.Font.Size = 8
  Printer.Print txtData.Text

Because txtData contains columns of text and/or numbers, I do not want to use a variable width font.
Both the Form and Textbox fonts are set to Courier.
But the code above does not actually change the font to Courier on the printer.

I know this is an old problem, but I can't find the solution on Tek-Tips or anywhere on the net.
I have seen that some programmers use Doevents after setting the new font, or use Printer.Print "" before printing the data.
Neither of these work for me.

In another program I am using Printer.Font.Name = "QuickType Mono"
and that works. But it doesn't work in this program.

Can someone explain this?

Copyright © 2005-08, All rights reserved