Subscribe to **WORLD of PROGRAMING**        RSS Feed
-----

make a text editor in vb6!

Icon Leave Comment
today,i want to show you how to make a text editor in vb6.


before you do anything,go to the components windows.to do that press Ctrl + T and check the <<Microsoft scripting runtime>>.

first,we should make a text box that should fit in our form and name it txttext.(make sure that multiline value is true.)
next,make a menu.you can do this by clicking Ctrl+E.name the caption save as... and the Name itself mnusaveas.
type the following code for the mnusaveas:
Private Sub mnusaveas_Click()
  Dim strfilename As String
  Dim mysfo As New FileSystemObject
  Dim myfile As TextStream
  strfilename = InputBox("Enter Path and File name:", "Save as:)
  If strfilename <> "" then
     set myfile = mysfo.opentextfile(strfilename,forwriting,true)
     myfile.write(txttext.text)
     myfile.close
  End if
End Sub


you can open it again(in notepad)and use it again.

0 Comments On This Entry

 

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

September 2014

S M T W T F S
 123456
78910111213
141516 17 181920
21222324252627
282930    

Tags

    Recent Entries

    Search My Blog

    0 user(s) viewing

    0 Guests
    0 member(s)
    0 anonymous member(s)

    Categories