Reflect Effects to a Text in VB 6.0

with No Comments

Reflect Effects to a Text is a program in visual basic because without knowing how to change font style and add effect to any text then you cannot make a good and colorful.


Change Font Style and Add Effect to any Text in Visual Basic

Step 1: –

  • At first open Visual Basic 6.0 application software
  • Then click on or select ‘Standard EXE’ icon from New Project dialogue box
  • Then click on ‘Open’.

Step 2: –

Form design: –

Select necessary Control Tool from Tool Box and adjust the position to ‘Form Window’: –

  • One TextBox
  • Two Frame
  • Four Option Button
  • Two Check Box
  • One Command Box

Front Style and Effect Program

Step 3: –

Properties Settings: –

  • Select ‘Form1’from Form Window and select ‘Caption’ from Properties Window
  • Then replace ‘Form1’ to ‘Font Style & Effects’ from properties window
  • Then select ‘Text 1 box’ from Form Window and select ‘Caption’ from Properties Window
  • Then Blank ‘Text 1’ from Properties Window.
  • Then select ‘Frame 1’ from Form Window and select ‘Caption’ from Properties Window
  • Then replace ‘Frame1’ to ‘Font Style’ from Properties Window.
  • Then select ‘Frame 2’ from Form Window and select ‘Caption’ from Properties Window
  • Then replace ‘Frame 2’ to ‘Effects’ from Properties Window.
  • Then select ‘Option 1 Button’ from Form Window and select ‘Caption’ from Properties Window
  • Then replace ‘Option 1’ to ‘Regular’ from Properties Window.
  • Then select ‘Option 2 Button’ from Form Window and select ‘Caption’ from Properties Window
  • Then replace ‘Option 2’ to ‘Bold’ from Properties Window.
  • Then select ‘Option 3 Button’ from Form Window and select ‘Caption’ from Properties Window
  • Then replace ‘Option 3’ to ‘Italic’ from Properties Window.
  • Then select ‘Option 4 Button’ from Form Window and select ‘Caption’ from Properties Window
  • Then replace ‘Option 4’ to ‘Bold Italic’ from Properties Window.
  • Then select ‘Check 1 box’ from Form Window and select ‘Caption’ from Properties Window
  • Then replace ‘Check 1’ to ‘Underline’ from Properties Window.
  • Then select ‘Check 2 box’ from Form Window and select ‘Caption’ from Properties Window
  • Then replace ‘Check 2’ to ‘Strikethru’ from Properties Window.
  • Then select ‘Command 1 box’ from Form Window and select ‘Caption’ from Properties Window
  • Then replace ‘Command 1’ to ‘Exit’ from Properties Window.

Front Style and Effect Program

front style and effect program in VB

Reflect Effects to a Text in VB

Step 4: –

Code Writing:-

  • Double click on ‘Text 1’
  • Then input code to Text 1 code box

Code: – Text1.Visible = True

  • Then double click on ‘Regular button’ or ‘Option 1 Button’
  • Then input code to Option 1 code box.

Code: – Text1.FontBold = False

    Text1.FontItalic = False

  • Then double click on ‘Bold button’ or ‘Option 2 Button’
  • Then input code to Option 2 code box.

Code: – Text1.FontBold = True

    Text1.FontItalic = False

  • Then double click on ‘Italic button’ or ‘Option 3 Button’
  • Then input code to Option 3 code box.

Code: – Text1.FontBold = False

    Text1.FontItalic = True

  • Then double click on ‘Bold italic button’ or ‘Option 4 Button’
  • Then input code to Option 4 code box.

Code: – Text1.FontBold = True

    Text1.FontItalic = True

  • Then double click on ‘Underline’ or ‘Check 1 box’
  • Then input code to Check 1 code box.

Code: – If Check1.Value = 1 Then

   Text1.FontUnderline = True

   Else

   Text1.FontUnderline = False

   End If

  • Then double click on ‘Strikethru’ or ‘Check 2 box’
  • Then input code to Check 2 code box.

Code: – If Check2.Value = 1 Then

   Text1.FontStrikethru = True

   Else

   Text1.FontStrikethru = False

   End If

  • Then double click on ‘Exit button’ or ‘Command 1 box’
  • Then input code to Command 1 code box.

Code: – End

front style and effect program

  • Then close code box

Step 5: –

Project Save: –

  • Click on ‘Save project’ option from File menu
  • Then input any name to file name box and click on Save option from Save file as box
  • Then input any new name to file name box
  • Then click ‘Save’ option.

Step 6: –

Project Run: –

  • Press F5 key from keyboard or click on ‘Start’ from ‘Run menu’ for run the project
  • Then input any text to ‘Text 1’ box
  • Then click any ‘Font Style’ and ‘Effects’ button




Then display the text by sleeted option

front style and effect program

So this how you can Reflect Effects to a Text in VB in visual basic.






Related Posts:

Leave a Reply