ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Code Snippets >> Programming Code >> Visual Basic Code
 
 


 

 
 C Code interview questions  C Code Interview Questions (401)
 C++ Code interview questions  C++ Code Interview Questions (121)
 VC++ Code interview questions  VC++ Code Interview Questions (2)
 Java Code interview questions  Java Code Interview Questions (57)
 Dot Net Code interview questions  Dot Net Code Interview Questions (113)
 Visual Basic Code interview questions  Visual Basic Code Interview Questions (8)
 Programming Code AllOther interview questions  Programming Code AllOther Interview Questions (37)
Question
write a program to create a notepad using common dialog 
control and rich text box.
 Question Submitted By :: Visual-Basic-Code
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
Private Sub Form_Resize()
RTB1.Width = frmMypad.ScaleWidth
RTB1.Height = frmMypad.ScaleHeight
End Sub

Private Sub mnubold_Click()
If RTB1.SelBold = True Then
RTB1.SelBold = False
Else
RTB1.SelBold = True
End If
End Sub

Private Sub mnubullets_Click()
If RTB1.SelBullet = True Then
RTB1.SelBullet = False
Else
RTB1.SelBullet = True
End If
End Sub

Private Sub mnucenter_Click()
RTB1.SelAlignment = 2
End Sub

Private Sub mnucolor_Click()
CD1.ShowColor
RTB1.SelColor = CD1.Color
End Sub

Private Sub mnucopy_Click()
Clipboard.Clear
Clipboard.SetText (RTB1.SelText)
End Sub

Private Sub mnucut_Click()
Clipboard.Clear
Clipboard.SetText (RTB1.SelText)
RTB1.SelText = ""
End Sub

Private Sub mnudate_Click()
RTB1.SelText = Date
End Sub

Private Sub mnudateandtime_Click()
RTB1.SelText = Now
End Sub

Private Sub mnudelete_Click()
RTB1.SelText = ""

End Sub

Private Sub mnuexit_Click()
End
End Sub

Private Sub mnufonts_Click()
CD1.ShowFont
RTB1.SelBold = CD1.FontBold
RTB1.SelFontSize = CD1.FontSize
RTB1.SelFontName = CD1.FontName
RTB1.SelItalic = CD1.FontItalic

End Sub

Private Sub mnuitalic_Click()
If RTB1.SelItalic = True Then
RTB1.SelItalic = False
Else
RTB1.SelItalic = True
End If
End Sub

Private Sub mnuleft_Click()
RTB1.SelAlignment = 0
End Sub

Private Sub mnunew_Click()
RTB1.Text = ""
frmMypad.Caption = "Mypad-Newfile"
End Sub

Private Sub mnuopen_Click()
CD1.ShowOpen
RTB1.FileName = CD1.FileName
frmMypad.Caption = "Mypad-" & CD1.FileTitle
End Sub

Private Sub mnupaste_Click()
RTB1.SelText = Clipboard.GetText
End Sub

Private Sub mnuprint_Click()
CD1.ShowPrinter
End Sub

Private Sub mnuright_Click()
RTB1.SelAlignment = 1
End Sub

Private Sub mnusave_Click()
CD1.DefaultExt = "Doc"
If frmMypad.Caption = "Mypad-Newfile" Then
CD1.ShowSave
End If
RTB1.SaveFile (CD1.FileName)
frmMypad.Caption = "Mypad-" & CD1.FileTitle
End Sub

Private Sub mnusaveas_Click()
CD1.DefaultExt = "Doc"
CD1.ShowSave
RTB1.SaveFile (CD1.FileName)
frmMypad.Caption = "Mypad-" & CD1.FileTitle
End Sub

Private Sub mnutime_Click()
RTB1.SelText = Time

End Sub

Private Sub mnuunderline_Click()
If RTB1.SelUnderline = True Then
RTB1.SelUnderline = False
Else
RTB1.SelUnderline = True
End If
End Sub
 
Is This Answer Correct ?    6 Yes 6 No
Fateh Singh
 

 
 
 
Other Visual Basic Code Interview Questions
 
  Question Asked @ Answers
 
write a program to create a notepad using common dialog control and rich text box.   1
Write a Program in Visual Basic by means of which we can send any data from Visual basic program to any other application running on that machine whether that application supports OLE or not.....   1
how to generate Question paper and how to save pattern of question paper   2
I have string str="Arts And Props" now i want to replace space in string with null. means i want result as str="ArtsAndProps"   1
Write a code snippets to find greatest and least of any number of inputs without taking the help of array Wipro 1
swap two no without using third variable   7
problem no.3 - write a program using two dimentional arrays that compute the sum of data in rows and sum of data in columns of the 3*3 array variable. sample input/output dialog 5 9 8 = 22 3 8 2 = 13 4 3 9 = 16 _____________ 12 20 19   4
 
For more Visual Basic Code Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com