SlideShare a Scribd company logo
Information Technology
Project
Visual Basic
Programming
Submitted By
Harendra Singh Rawat
BCA 3rdYear
Dezyne E´cole College
www.dezyneecole.com
Submitted By
Harendra Singh Rawat
BCA 3rd Year
Dezyne E´cole College
106/10, Civil Lines, Ajmer
Tel: 0145-2624679
www.dezyneecole.com
2016-2017
Topic:Notepad
Acknowledgement
This Notepad create in “Visual Basic” was developed at Dezyne E’cole
College.
During the making of this project I have learnt a lot and I thank my mentor
Mr.Tarun Sharmaforhelping us during the making of project.
I thank my college “Dezyne Ecole College” for helping us to bring out our
skill.
With due Regards,
Harendra Singh Rawat
BCA 3rd Year
Notepad
Dim rp, fp, a As Variant
Dim m%, b%, c%, fd%, d%
Option Explicit
Const maxUndo = 50
Dim gblnIgnoreChangeAs Boolean
Dim gintIndexAs Integer
Dim gstrStack(maxUndo)As String
Dim stackBK(maxUndo)As String
Dim i As Integer
Private Sub copy_Click()
Call mcop
End Sub
Public Sub mcop()
Clipboard.SetTextRichTextBox1.SelText
End Sub
Private Sub cut_Click()
Call mcut
End Sub
Form 1st
Private Sub edit_Click()
If RichTextBox1.SelLength= 0 Then
cut.Enabled = False
copy.Enabled = False
delete.Enabled= False
selectall.Enabled = True
ElseIf RichTextBox1.SelLength=
Len(RichTextBox1.Text)Then
cut.Enabled = True
copy.Enabled = True
delete.Enabled= True
selectall.Enabled = False
Else
cut.Enabled = True
copy.Enabled = True
delete.Enabled= True
selectall.Enabled = True
End If
If Len(Clipboard.GetText(1))= 0 Then
paste.Enabled = False
Else
paste.Enabled = True
End If
End Sub
Private Sub munpop_click()
If RichTextBox1.SelLength= 0 Then
munc.Enabled = False
muncop.Enabled = False
mundele.Enabled = False
munsele.Enabled = True
ElseIf RichTextBox1.SelLength=
Len(RichTextBox1.Text)Then
munc.Enabled = True
muncop.Enabled = True
mundele.Enabled = True
munsele.Enabled = False
Else
munc.Enabled = True
muncop.Enabled = True
mundele.Enabled = True
munsele.Enabled = True
End If
If Len(Clipboard.GetText(1))= 0 Then
munpst.Enabled = False
Else
munpst.Enabled = True
End If
End Sub
Public Sub mcut()
Clipboard.SetTextRichTextBox1.SelText
RichTextBox1.SelText= " "
End Sub
Private Sub delete_Click()
Call mdel
End Sub
Public Sub mdel()
RichTextBox1.SelText= ""
RichTextBox1.SelText= ""
End Sub
Private Sub exit_Click()
Unload Me
End Sub
Private Sub munc_Click()
Call mcut
End Sub
Private Sub muncop_Click()
Call mcop
End Sub
Private Sub mundele_Click()
Call mdel
End Sub
Private Sub munfind_Click()
fd = InputBox("EnterWord","Find")
RichTextBox1.Find (fd)
End Sub
Private Sub munfindnext_Click()
Form4.Show
End Sub
Private Sub Form_Load()
Form1.Caption= "Untitled-Notepad"
m = 1
RichTextBox1.RightMargin = Screen.Width -
(Screen.Width- RichTextBox1.Width- 6000)
End Sub
Private Sub Form_Resize()
RichTextBox1.Width= Form1.Width - 300
RichTextBox1.Height= Form1.Height – 1140
End Sub
Private Sub helptopics_Click()
On Error Resume Next
With CommonDialog1
.Flags = 1
.CancelError= True
.ShowHelp
End With
End Sub
Private Sub munfont_Click()
On Error Resume Next
With CommonDialog1
.Flags = 1
.CancelError= True
.ShowFont
End With
RichTextBox1.Font.Name =
CommonDialog1.FontName
RichTextBox1.Font.Size = CommonDialog1.FontSize
RichTextBox1.Font.Bold = CommonDialog1.FontBold
RichTextBox1.Font.Italic = CommonDialog1.FontItalic
RichTextBox1.Font.Underline =
CommonDialog1.FontUnderline
RichTextBox1.Font.Strikethrough=
CommonDialog1.FontStrikethru
End Sub
Private Sub munpst_Click()
Call mpas
End Sub
Private Sub munsave_Click()
On Error GoTo Label
Dim ifile As Integer
Dim savefile As Boolean
Dim txtbox As Object
Dim filepathAs String
Dim append As Boolean
With CommonDialog1
.Flags = 1
.CancelError= True
.Filter = "Text Document(*.txt)|*.txt |All Files(*.*)|*.*"
If m = 1 Then
m = m + 1
. ShowSave
End If
End With
ifile = FreeFile
If append Then
Open CommonDialog1.FileName For
Append As #ifile
Else
OpenCommonDialog1.FileName ForOutput As #ifile
End If
Print #ifile, RichTextBox1.Text
savefile = True
Label:
Close #ifile
Form1.Caption= CommonDialog1.FileTitle + "-Notepad"
End Sub
Private Sub munsele_Click()
Call msel
End Sub
Private Sub munund_Click()
Call und
End Sub
Public Sub und()
If gintIndex= 0 Then Exit Sub
gblnIgnoreChange = True
gintIndex= gintIndex - 1
On Error Resume Next
RichTextBox1.TextRTF= gstrStack(gintIndex)
gblnIgnoreChange = False
End Sub
Private Sub new_Click()
On Error Resume Next
m = 1
If RichTextBox1.Text<> "" Then
a = MsgBox("Do you want to save the
changes?",vbYesNoCancel+ vbQuestion,"Save")
If a = vbYes Then
With CommonDialog1
.CancelError = True
.InitDir = "E:"
.Filter = "Text Documents(*.txt)|*.txt | All
Files(*.*)|*.*"
.ShowSave
End With
RichTextBox1.Text= ""
End If
If a = vbNo Then
RichTextBox1.Text= " "
End If
End If
End Sub
Private Sub notepad_Click()
Form2.Show
End Sub
Private Sub open_Click()
On Error Resume Next
With CommonDialog1
.CancelError= True
.InitDir = "E:"
.Filter = "Text Documents(*.txt)|*.txt| All Files(*.*) | *.*"
.ShowOpen
End With
RichTextBox1.LoadFile (CommonDialog1.FileName)
End Sub
Private Sub paste_Click()
Call mpas
End Sub
Public Sub mpas()
If Clipboard.GetFormat(vbCFText)Then
RichTextBox1.SelText=
Clipboard.GetText(vbCFText)
End If
End Sub
Private Sub print_Click()
On Error GoTo Label
Dim b, e, n, i As Variant
With CommonDialog1
.Flags = 1
.CancelError= True
.ShowPrinter
b = .FromPage
e = .ToPage
n = .Copies
End With
For i = 1 To n
Printer.Print RichTextBox1.Text
Next
Exit Sub
Label:
Exit Sub
End Sub
Private Sub replace_Click()
Form3.Show
End Sub
Private Sub RichTextBox1_Change()
Dim g As Integer
Dim b As Integer
Dim i As Integer
g = maxUndo
If Not gblnIgnoreChangeThen
gintIndex = gintIndex + 1
If gintIndex>= maxUndo + 1 Then
For b = 0 To maxUndo
stackBK(b)= gstrStack(b)
Next b
For i = 0 To maxUndo
If g >= 1 Then
g = g - 1
gstrStack(g)= stackBK(g + 1)
End If
Next i
gintIndex = maxUndo
End If
gstrStack(gintIndex)= RichTextBox1.TextRTF
End If
End Sub
Private Sub saveas_Click()
On Error GoTo Label
Dim ifile As Integer
Dim savefile As Boolean
Dim txtbox As Object
Dim filepathAs String
Dim append As Boolean
With CommonDialog1
.Flags = 1
.CancelError= True
.Filter = "Text Document(*.txt)|*.txt |All Files(*.*)|*.*"
.ShowSave
End With
ifile = FreeFile
If append Then
OpenCommonDialog1.FileName ForAppend As
#ifile
Else
OpenCommonDialog1.FileName ForOutput As #ifile
End If
Print #ifile, RichTextBox1.Text
savefile = True
Label:
Close #ifile
Form1.Caption= CommonDialog1.FileTitle + "-
Notepad"
End Sub
Private Sub selectall_Click()
Call msel
End Sub
Public Sub msel()
RichTextBox1.SelStart= 0
RichTextBox1.SelLength= Len(RichTextBox1.Text)
End Sub
Private Sub statusbar_Click()
If statusbar.Checked = True Then
statusbar.Checked = False
StatusBar1.Visible = False
RichTextBox1.Height= Form1.Height- 850
Else
statusbar.Checked = False
statusbar.Checked = True
StatusBar1.Visible = True
RichTextBox1.Height=
RichTextBox1.Height- 375
End If
End Sub
Private Sub timedate_Click()
RichTextBox1.SelText= Now()
End Sub
Private Sub undo_Click()
Call und
End Sub
Private Sub VScroll1_Change()
RichTextBox1.RightMargin = 0
RichTextBox1.Left= 0
End Sub
Private Sub wordwrap_Click()
If wordwrap.Checked = True Then
wordwrap.Checked = False
RichTextBox1.RightMargin=
Screen.Width- (Screen.Width- RichTextBox1.Width- 1000000)
Else
wordwrap.Checked = True
RichTextBox1.RightMargin = Screen.Width -
(Screen.Width- RichTextBox1.Width- 6000)
End If
End Sub
About Notepad(Form 2nd)
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Form2.Caption= "AboutAs"
End Sub
Replace (Form 3rd)
Option Explicit
Dim lastpos As Integer
Dim findtextAs String
Private Sub Command1_Click()
findtext = Text1.Text
If Check1.Value = vbChecked Then
lastpos = InStr(lastpos + 1,
Form1.RichTextBox1.Text,findtext, vbBinaryCompare)
Else
lastpos = InStr(lastpos + 1,
Form1.RichTextBox1.Text,findtext, vbTextCompare)
End If
If lastpos > 0 Then
Form1.RichTextBox1.SelStart= lastpos - 1
Form1.RichTextBox1.SelLength= Len(findtext)
Else
MsgBox"Not Found"
End If
End Sub
Private Sub Command2_Click()
Dim fp, a, rp As String
fp = Text1.Text
rp = Text2.Text
a = Form1.RichTextBox1.Find(fp)
If a <> -1 Then
a = Form1.RichTextBox1.Find(fp)
Form1.RichTextBox1.SelText= rp
Else
MsgBox"Not Found"
End If
End Sub
Private Sub Command3_Click()
findtext = Text1.Text
lastpos = 0
If Check1.Value = vbChecked Then
lastpos = InStr(lastpos + 1,
Form1.RichTextBox1.Text,findtext, vbBinaryCompare)
Else
lastpos = InStr(lastpos + 1,
Form1.RichTextBox1.Text,findtext,
vbTextCompare)
End If
If lastpos > 0 Then
Do While lastpos > 0
Form1.RichTextBox1.SelStart= lastpos - 1
Form1.RichTextBox1.SelLength= Len(findtext)
Form1.RichTextBox1.SelText= Text2.Text
If Check1.Value = vbChecked Then
lastpos = InStr(lastpos + 1,
Form1.RichTextBox1.Text,findtext, vbBinaryCompare)
Else
lastpos = InStr(lastpos + 1,
Form1.RichTextBox1.Text,findtext, vbTextCompare)
End If
If lastpos = 0 Then
MsgBox"All Instances have been
replaced"
Exit Do
End If
Loop
Else
MsgBox"Not Found"
End If
Form1.RichTextBox1.SelStart= 0
Form1.RichTextBox1.SelLength= 0
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
Form3.Caption= "Replace"
End Sub
Private Sub Text1_Change()
If Text1 = "" Then
Command1.Enabled= False
Command2.Enabled= False
Command3.Enabled= False
Else
Command1.Enabled= True
Command2.Enabled= True
Command3.Enabled= True
End If
End Sub
Find (Form 4th)
Option Explicit
Dim lastpos As Integer
Dim findtextAs String
Private Sub Command1_Click()
findtext = Text1.Text
If Check1.Value = vbChecked Then
lastpos = InStr(lastpos + 1,
Form1.RichTextBox1.Text,findtext, vbBinaryCompare)
Else
lastpos = InStr(lastpos + 1, Form1.RichTextBox1.Text,
findtext, vbTextCompare)
End If
If lastpos > 0 Then
Form1.RichTextBox1.SelStart= lastpos - 1
Form1.RichTextBox1.SelLength= Len(findtext)
Else
MsgBox"Not Found"
End If
Form3.Text1.Text= Text1.Text
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Form4.Caption= "Find"
End Sub
Thank You…

More Related Content

What's hot

Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
dezyneecole
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
dezyneecole
 
Bhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third YearBhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third Year
Dezyneecole
 
tutorial21
tutorial21tutorial21
tutorial21
tutorialsruby
 
Natural Language Processing(SupStat Inc)
Natural Language Processing(SupStat Inc)Natural Language Processing(SupStat Inc)
Natural Language Processing(SupStat Inc)
Vivian S. Zhang
 
Vp lecture 2 ararat
Vp lecture 2 araratVp lecture 2 ararat
Vp lecture 2 ararat
Saman M. Almufti
 
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Functionnone
 

What's hot (7)

Reshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third YearReshma Kodwani , BCA Third Year
Reshma Kodwani , BCA Third Year
 
Kirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third YearKirti Kumawat, BCA Third Year
Kirti Kumawat, BCA Third Year
 
Bhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third YearBhanu Pratap Singh Shekhawat, BCA Third Year
Bhanu Pratap Singh Shekhawat, BCA Third Year
 
tutorial21
tutorial21tutorial21
tutorial21
 
Natural Language Processing(SupStat Inc)
Natural Language Processing(SupStat Inc)Natural Language Processing(SupStat Inc)
Natural Language Processing(SupStat Inc)
 
Vp lecture 2 ararat
Vp lecture 2 araratVp lecture 2 ararat
Vp lecture 2 ararat
 
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function
©️ Contact CISCO Clients - Cisco Logistics - ContactCustomer Business Function
 

Similar to Harendra Singh,BCA Third Year

Sachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third YearSachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third Year
Dezyneecole
 
Deepika Mittal , BCA Third Year
Deepika Mittal , BCA Third YearDeepika Mittal , BCA Third Year
Deepika Mittal , BCA Third Year
dezyneecole
 
Vb file
Vb fileVb file
Docimp
DocimpDocimp
Docimp
KaivanShah30
 
Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaMembuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhana
Yusman Kurniadi
 
Richtextbox
RichtextboxRichtextbox
Richtextbox
Amandeep Kaur
 
VB 6
VB 6VB 6
Vbreport
VbreportVbreport
Vbreport
shweta-sharma99
 
VB net lab.pdf
VB net lab.pdfVB net lab.pdf
VB net lab.pdf
Prof. Dr. K. Adisesha
 
Inventory management
Inventory managementInventory management
Inventory management
Rajeev Sharan
 
FUNCTIONS IN PYTHON, CLASS 12 COMPUTER SCIENCE
FUNCTIONS IN PYTHON, CLASS 12 COMPUTER SCIENCEFUNCTIONS IN PYTHON, CLASS 12 COMPUTER SCIENCE
FUNCTIONS IN PYTHON, CLASS 12 COMPUTER SCIENCE
Venugopalavarma Raja
 
Código Editor Net
Código Editor NetCódigo Editor Net
Código Editor Net
cymbron
 
VB Dot net
VB Dot net VB Dot net
VB Dot net
Akber Khowaja
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
Dr.M.Karthika parthasarathy
 
Colegio municipal
Colegio municipalColegio municipal
Colegio municipal
lenintoapanta1992
 
Ict project pdf
Ict project pdfIct project pdf
Ict project pdf
Happy Nezza Aranjuez
 
Putting dialog boxes to work
Putting dialog boxes to workPutting dialog boxes to work
Putting dialog boxes to work
chunky.sarath
 
Google Go For Ruby Hackers
Google Go For Ruby HackersGoogle Go For Ruby Hackers
Google Go For Ruby Hackers
Eleanor McHugh
 
Trabajo de ept lissethe toro
Trabajo de ept lissethe toroTrabajo de ept lissethe toro
Trabajo de ept lissethe toro
lissethee
 
LoginFormCode
LoginFormCodeLoginFormCode
LoginFormCode
rk5media
 

Similar to Harendra Singh,BCA Third Year (20)

Sachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third YearSachin Foujdar , BCA Third Year
Sachin Foujdar , BCA Third Year
 
Deepika Mittal , BCA Third Year
Deepika Mittal , BCA Third YearDeepika Mittal , BCA Third Year
Deepika Mittal , BCA Third Year
 
Vb file
Vb fileVb file
Vb file
 
Docimp
DocimpDocimp
Docimp
 
Membuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhanaMembuat aplikasi penjualan buku sederhana
Membuat aplikasi penjualan buku sederhana
 
Richtextbox
RichtextboxRichtextbox
Richtextbox
 
VB 6
VB 6VB 6
VB 6
 
Vbreport
VbreportVbreport
Vbreport
 
VB net lab.pdf
VB net lab.pdfVB net lab.pdf
VB net lab.pdf
 
Inventory management
Inventory managementInventory management
Inventory management
 
FUNCTIONS IN PYTHON, CLASS 12 COMPUTER SCIENCE
FUNCTIONS IN PYTHON, CLASS 12 COMPUTER SCIENCEFUNCTIONS IN PYTHON, CLASS 12 COMPUTER SCIENCE
FUNCTIONS IN PYTHON, CLASS 12 COMPUTER SCIENCE
 
Código Editor Net
Código Editor NetCódigo Editor Net
Código Editor Net
 
VB Dot net
VB Dot net VB Dot net
VB Dot net
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
 
Colegio municipal
Colegio municipalColegio municipal
Colegio municipal
 
Ict project pdf
Ict project pdfIct project pdf
Ict project pdf
 
Putting dialog boxes to work
Putting dialog boxes to workPutting dialog boxes to work
Putting dialog boxes to work
 
Google Go For Ruby Hackers
Google Go For Ruby HackersGoogle Go For Ruby Hackers
Google Go For Ruby Hackers
 
Trabajo de ept lissethe toro
Trabajo de ept lissethe toroTrabajo de ept lissethe toro
Trabajo de ept lissethe toro
 
LoginFormCode
LoginFormCodeLoginFormCode
LoginFormCode
 

More from dezyneecole

Gracika Benjamin , Diploma Fashion Design Second Year
Gracika Benjamin , Diploma Fashion Design Second YearGracika Benjamin , Diploma Fashion Design Second Year
Gracika Benjamin , Diploma Fashion Design Second Year
dezyneecole
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second YearSheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
dezyneecole
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Year
dezyneecole
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Year
dezyneecole
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Year
dezyneecole
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second YearSheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
dezyneecole
 
Sushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second YearSushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second Year
dezyneecole
 
Sushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second YearSushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second Year
dezyneecole
 
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...
dezyneecole
 
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...
dezyneecole
 
Gitesh Chhatwani , BCA -3 Year
Gitesh Chhatwani , BCA -3 YearGitesh Chhatwani , BCA -3 Year
Gitesh Chhatwani , BCA -3 Year
dezyneecole
 
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)
dezyneecole
 
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)
dezyneecole
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...
dezyneecole
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)
dezyneecole
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
dezyneecole
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
dezyneecole
 
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
dezyneecole
 
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)
dezyneecole
 
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)
dezyneecole
 

More from dezyneecole (20)

Gracika Benjamin , Diploma Fashion Design Second Year
Gracika Benjamin , Diploma Fashion Design Second YearGracika Benjamin , Diploma Fashion Design Second Year
Gracika Benjamin , Diploma Fashion Design Second Year
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second YearSheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Year
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Year
 
Harsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second YearHarsha Chhaparwal, Diploma Fashion Design Second Year
Harsha Chhaparwal, Diploma Fashion Design Second Year
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second YearSheikh Anjum Firdoush , Diploma Fashion Design Second Year
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year
 
Sushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second YearSushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second Year
 
Sushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second YearSushmita Bhati, Diploma Fashion Design Second Year
Sushmita Bhati, Diploma Fashion Design Second Year
 
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...
Sushmita Bhati, Diploma Fashion Design Second Year, (How to Design for Fashio...
 
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...
Somya Jain, Diploma Fashion Design Second Year, (How to Design for Fashion In...
 
Gitesh Chhatwani , BCA -3 Year
Gitesh Chhatwani , BCA -3 YearGitesh Chhatwani , BCA -3 Year
Gitesh Chhatwani , BCA -3 Year
 
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)
Anurag Yadav , B.Voc Interior Design 1st Year ( Residential Portfolio)
 
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)
Namita Bakoliya, Diploma Fashion Design First Year, (Corel Draw Project)
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Pattern Engineer...
 
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)
Sheikh Anjum Firdoush , Diploma Fashion Design Second Year, (Draping Project)
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
 
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
 
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
 
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)
Dimple Mordani, Diploma Fashion Design First Year, (Design Basics Project)
 
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)
Dimple Mordani, Diploma Fashion Design First Year, (Corel Draw Project)
 

Recently uploaded

The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 

Recently uploaded (20)

The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 

Harendra Singh,BCA Third Year

  • 1. Information Technology Project Visual Basic Programming Submitted By Harendra Singh Rawat BCA 3rdYear Dezyne E´cole College www.dezyneecole.com
  • 2. Submitted By Harendra Singh Rawat BCA 3rd Year Dezyne E´cole College 106/10, Civil Lines, Ajmer Tel: 0145-2624679 www.dezyneecole.com 2016-2017 Topic:Notepad
  • 3. Acknowledgement This Notepad create in “Visual Basic” was developed at Dezyne E’cole College. During the making of this project I have learnt a lot and I thank my mentor Mr.Tarun Sharmaforhelping us during the making of project. I thank my college “Dezyne Ecole College” for helping us to bring out our skill. With due Regards, Harendra Singh Rawat BCA 3rd Year
  • 4. Notepad Dim rp, fp, a As Variant Dim m%, b%, c%, fd%, d% Option Explicit Const maxUndo = 50 Dim gblnIgnoreChangeAs Boolean Dim gintIndexAs Integer Dim gstrStack(maxUndo)As String Dim stackBK(maxUndo)As String Dim i As Integer Private Sub copy_Click() Call mcop End Sub Public Sub mcop() Clipboard.SetTextRichTextBox1.SelText End Sub Private Sub cut_Click() Call mcut End Sub Form 1st
  • 5. Private Sub edit_Click() If RichTextBox1.SelLength= 0 Then cut.Enabled = False copy.Enabled = False delete.Enabled= False selectall.Enabled = True ElseIf RichTextBox1.SelLength= Len(RichTextBox1.Text)Then cut.Enabled = True copy.Enabled = True delete.Enabled= True selectall.Enabled = False Else cut.Enabled = True copy.Enabled = True delete.Enabled= True selectall.Enabled = True End If If Len(Clipboard.GetText(1))= 0 Then paste.Enabled = False Else paste.Enabled = True End If End Sub Private Sub munpop_click() If RichTextBox1.SelLength= 0 Then munc.Enabled = False muncop.Enabled = False mundele.Enabled = False munsele.Enabled = True ElseIf RichTextBox1.SelLength= Len(RichTextBox1.Text)Then munc.Enabled = True muncop.Enabled = True mundele.Enabled = True munsele.Enabled = False Else munc.Enabled = True muncop.Enabled = True
  • 6. mundele.Enabled = True munsele.Enabled = True End If If Len(Clipboard.GetText(1))= 0 Then munpst.Enabled = False Else munpst.Enabled = True End If End Sub Public Sub mcut() Clipboard.SetTextRichTextBox1.SelText RichTextBox1.SelText= " " End Sub Private Sub delete_Click() Call mdel End Sub Public Sub mdel() RichTextBox1.SelText= "" RichTextBox1.SelText= "" End Sub Private Sub exit_Click() Unload Me End Sub Private Sub munc_Click() Call mcut End Sub Private Sub muncop_Click() Call mcop End Sub Private Sub mundele_Click() Call mdel End Sub Private Sub munfind_Click() fd = InputBox("EnterWord","Find") RichTextBox1.Find (fd) End Sub Private Sub munfindnext_Click() Form4.Show End Sub
  • 7. Private Sub Form_Load() Form1.Caption= "Untitled-Notepad" m = 1 RichTextBox1.RightMargin = Screen.Width - (Screen.Width- RichTextBox1.Width- 6000) End Sub Private Sub Form_Resize() RichTextBox1.Width= Form1.Width - 300 RichTextBox1.Height= Form1.Height – 1140 End Sub Private Sub helptopics_Click() On Error Resume Next With CommonDialog1 .Flags = 1 .CancelError= True .ShowHelp End With End Sub Private Sub munfont_Click() On Error Resume Next With CommonDialog1 .Flags = 1 .CancelError= True .ShowFont End With RichTextBox1.Font.Name = CommonDialog1.FontName RichTextBox1.Font.Size = CommonDialog1.FontSize RichTextBox1.Font.Bold = CommonDialog1.FontBold RichTextBox1.Font.Italic = CommonDialog1.FontItalic RichTextBox1.Font.Underline = CommonDialog1.FontUnderline RichTextBox1.Font.Strikethrough= CommonDialog1.FontStrikethru End Sub Private Sub munpst_Click() Call mpas End Sub
  • 8. Private Sub munsave_Click() On Error GoTo Label Dim ifile As Integer Dim savefile As Boolean Dim txtbox As Object Dim filepathAs String Dim append As Boolean With CommonDialog1 .Flags = 1 .CancelError= True .Filter = "Text Document(*.txt)|*.txt |All Files(*.*)|*.*" If m = 1 Then m = m + 1 . ShowSave End If End With ifile = FreeFile If append Then Open CommonDialog1.FileName For Append As #ifile Else OpenCommonDialog1.FileName ForOutput As #ifile End If Print #ifile, RichTextBox1.Text savefile = True Label: Close #ifile Form1.Caption= CommonDialog1.FileTitle + "-Notepad" End Sub Private Sub munsele_Click() Call msel End Sub Private Sub munund_Click() Call und End Sub Public Sub und() If gintIndex= 0 Then Exit Sub gblnIgnoreChange = True gintIndex= gintIndex - 1
  • 9. On Error Resume Next RichTextBox1.TextRTF= gstrStack(gintIndex) gblnIgnoreChange = False End Sub Private Sub new_Click() On Error Resume Next m = 1 If RichTextBox1.Text<> "" Then a = MsgBox("Do you want to save the changes?",vbYesNoCancel+ vbQuestion,"Save") If a = vbYes Then With CommonDialog1 .CancelError = True .InitDir = "E:" .Filter = "Text Documents(*.txt)|*.txt | All Files(*.*)|*.*" .ShowSave End With RichTextBox1.Text= "" End If If a = vbNo Then RichTextBox1.Text= " " End If End If End Sub Private Sub notepad_Click() Form2.Show End Sub Private Sub open_Click() On Error Resume Next With CommonDialog1 .CancelError= True .InitDir = "E:" .Filter = "Text Documents(*.txt)|*.txt| All Files(*.*) | *.*" .ShowOpen End With RichTextBox1.LoadFile (CommonDialog1.FileName) End Sub
  • 10. Private Sub paste_Click() Call mpas End Sub Public Sub mpas() If Clipboard.GetFormat(vbCFText)Then RichTextBox1.SelText= Clipboard.GetText(vbCFText) End If End Sub Private Sub print_Click() On Error GoTo Label Dim b, e, n, i As Variant With CommonDialog1 .Flags = 1 .CancelError= True .ShowPrinter b = .FromPage e = .ToPage n = .Copies End With For i = 1 To n Printer.Print RichTextBox1.Text Next Exit Sub Label: Exit Sub End Sub Private Sub replace_Click() Form3.Show End Sub Private Sub RichTextBox1_Change() Dim g As Integer Dim b As Integer Dim i As Integer g = maxUndo If Not gblnIgnoreChangeThen gintIndex = gintIndex + 1 If gintIndex>= maxUndo + 1 Then For b = 0 To maxUndo
  • 11. stackBK(b)= gstrStack(b) Next b For i = 0 To maxUndo If g >= 1 Then g = g - 1 gstrStack(g)= stackBK(g + 1) End If Next i gintIndex = maxUndo End If gstrStack(gintIndex)= RichTextBox1.TextRTF End If End Sub Private Sub saveas_Click() On Error GoTo Label Dim ifile As Integer Dim savefile As Boolean Dim txtbox As Object Dim filepathAs String Dim append As Boolean With CommonDialog1 .Flags = 1 .CancelError= True .Filter = "Text Document(*.txt)|*.txt |All Files(*.*)|*.*" .ShowSave End With ifile = FreeFile If append Then OpenCommonDialog1.FileName ForAppend As #ifile Else OpenCommonDialog1.FileName ForOutput As #ifile End If Print #ifile, RichTextBox1.Text savefile = True Label: Close #ifile Form1.Caption= CommonDialog1.FileTitle + "- Notepad"
  • 12. End Sub Private Sub selectall_Click() Call msel End Sub Public Sub msel() RichTextBox1.SelStart= 0 RichTextBox1.SelLength= Len(RichTextBox1.Text) End Sub Private Sub statusbar_Click() If statusbar.Checked = True Then statusbar.Checked = False StatusBar1.Visible = False RichTextBox1.Height= Form1.Height- 850 Else statusbar.Checked = False statusbar.Checked = True StatusBar1.Visible = True RichTextBox1.Height= RichTextBox1.Height- 375 End If End Sub Private Sub timedate_Click() RichTextBox1.SelText= Now() End Sub Private Sub undo_Click() Call und End Sub Private Sub VScroll1_Change() RichTextBox1.RightMargin = 0 RichTextBox1.Left= 0 End Sub Private Sub wordwrap_Click() If wordwrap.Checked = True Then wordwrap.Checked = False RichTextBox1.RightMargin= Screen.Width- (Screen.Width- RichTextBox1.Width- 1000000) Else wordwrap.Checked = True
  • 13. RichTextBox1.RightMargin = Screen.Width - (Screen.Width- RichTextBox1.Width- 6000) End If End Sub About Notepad(Form 2nd) Private Sub Command1_Click() Unload Me End Sub Private Sub Form_Load() Form2.Caption= "AboutAs" End Sub
  • 14. Replace (Form 3rd) Option Explicit Dim lastpos As Integer Dim findtextAs String Private Sub Command1_Click() findtext = Text1.Text If Check1.Value = vbChecked Then lastpos = InStr(lastpos + 1, Form1.RichTextBox1.Text,findtext, vbBinaryCompare) Else lastpos = InStr(lastpos + 1, Form1.RichTextBox1.Text,findtext, vbTextCompare) End If If lastpos > 0 Then Form1.RichTextBox1.SelStart= lastpos - 1 Form1.RichTextBox1.SelLength= Len(findtext) Else MsgBox"Not Found" End If End Sub Private Sub Command2_Click() Dim fp, a, rp As String fp = Text1.Text rp = Text2.Text
  • 15. a = Form1.RichTextBox1.Find(fp) If a <> -1 Then a = Form1.RichTextBox1.Find(fp) Form1.RichTextBox1.SelText= rp Else MsgBox"Not Found" End If End Sub Private Sub Command3_Click() findtext = Text1.Text lastpos = 0 If Check1.Value = vbChecked Then lastpos = InStr(lastpos + 1, Form1.RichTextBox1.Text,findtext, vbBinaryCompare) Else lastpos = InStr(lastpos + 1, Form1.RichTextBox1.Text,findtext, vbTextCompare) End If If lastpos > 0 Then Do While lastpos > 0 Form1.RichTextBox1.SelStart= lastpos - 1 Form1.RichTextBox1.SelLength= Len(findtext) Form1.RichTextBox1.SelText= Text2.Text If Check1.Value = vbChecked Then lastpos = InStr(lastpos + 1, Form1.RichTextBox1.Text,findtext, vbBinaryCompare) Else lastpos = InStr(lastpos + 1, Form1.RichTextBox1.Text,findtext, vbTextCompare) End If If lastpos = 0 Then MsgBox"All Instances have been replaced" Exit Do End If Loop Else MsgBox"Not Found"
  • 16. End If Form1.RichTextBox1.SelStart= 0 Form1.RichTextBox1.SelLength= 0 End Sub Private Sub Command4_Click() Unload Me End Sub Private Sub Form_Load() Form3.Caption= "Replace" End Sub Private Sub Text1_Change() If Text1 = "" Then Command1.Enabled= False Command2.Enabled= False Command3.Enabled= False Else Command1.Enabled= True Command2.Enabled= True Command3.Enabled= True End If End Sub Find (Form 4th) Option Explicit Dim lastpos As Integer Dim findtextAs String Private Sub Command1_Click() findtext = Text1.Text If Check1.Value = vbChecked Then lastpos = InStr(lastpos + 1, Form1.RichTextBox1.Text,findtext, vbBinaryCompare) Else
  • 17. lastpos = InStr(lastpos + 1, Form1.RichTextBox1.Text, findtext, vbTextCompare) End If If lastpos > 0 Then Form1.RichTextBox1.SelStart= lastpos - 1 Form1.RichTextBox1.SelLength= Len(findtext) Else MsgBox"Not Found" End If Form3.Text1.Text= Text1.Text End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Form_Load() Form4.Caption= "Find" End Sub