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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Applying font Changes

Status
Not open for further replies.

JJ1

Programmer
Apr 19, 2001
104
GB
I have a text box (on the "frmMain" form), and have created a font change window to alter .fontname / .forecolour / .fontsize in the main text box of frmMain.

Problem arises when I launch a new instance of my program (which I have to do because it is a webbrowser)

Set frmNew = New frmMain 'get new instance of WebbIE
frmNew.Show


However, trying to change a font on this NEW form (frmNew) applys the changes to the original form (frmMain) because a sample line of code in the font change form is as follows:

frmMain.txtText.FontName = cboFontName.Text

The change should have been made to "frmNew.txtText". Is there anything that can be done about this? Perhaps the active window could be changed to frmNew and the changes applied to the active window?

Any help would be much appreciated :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top