用vb做文本编辑器(using vb as text editor)

用vb做文本编辑器(using vb as text editor)

ID:16886047

大小:25.24 KB

页数:16页

时间:2018-08-25

用vb做文本编辑器(using vb as text editor)_第1页
用vb做文本编辑器(using vb as text editor)_第2页
用vb做文本编辑器(using vb as text editor)_第3页
用vb做文本编辑器(using vb as text editor)_第4页
用vb做文本编辑器(using vb as text editor)_第5页
资源描述:

《用vb做文本编辑器(using vb as text editor)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、用vb做文本编辑器(UsingVBastexteditor)ItmeansmakinganotepadLookatthefollowingIt'snotcomplicatedtomakeanotepadwithVB.Wecandoiteasilybythewizard.ButthisarticleisjustgoingtotalkaboutmakingNotepadmanually,toshowtoVBBeginners:it'ssoeasytolearnVB!Byreading,thispaperaccordingtotheexperiment

2、,beginnerswilllearnalotofthings,suchashowtousetheRichTextcontroltoopenandsavethefile,howtomakeamenu,toolbarandstatusbarandhowtowritecode.ChapteroneletourNotepadrunrightawayEagerforsuccessisthecommonaspirationofbeginners.Well,pleasedothefollowingthreesteps,andourwishescanberea

3、lizedimmediately!Stepone:drawtheinterface.CreateastandardEXEproject,changeitsCaptionattributeto"superNOTEPAD",andclicktheIconattributetofindasuitableIconiconforit.Clickthemenu"project"-"component",inthepop-up"component"dialogbox,findMicrosoftRichTextBox6andpublicdialogboxMicr

4、osoftCommonDialog6andselectthem,clickthe"OK"button.Whenthelefttoolbarappearstwocontrolswejustadded.RichTextBoxandCommnDialogdrawingontheform,thesizeandlocationofRichTextBoxcannotbeignored,wewilldealwithitinthecode,ofcourse,itisnecessarytoputitsScrollBarpropertyto2-rtfVertical

5、,sointheopenandeditfilescanbeusedwhentheverticalscrollbar.Steptwo:editthemenu.TobringupthemenueditorbyCtrl+E,let'sdothefollowingmenus:Filemenu:File(layer1)mnuFileNew(secondlayer)mnuNewOpen(secondlayer)mnuOpenSave(secondlayers)mnuSave-(secondlayers)mnuFileSep(dividingline)Exit

6、(secondlayer)mnuExitTwo.Editmenu:Editor(layer1)mnuEditCopy(secondlayers)mnuCopyShear(secondlayer)mnuCutPaste(secondlayers)mnuPaste-(secondlayers)mnuEditSep(dividingline)Select(second)mnuSelecAllThree.Searchmenu:Search(layer1)mnuSearchFind(secondlayers)mnuFindFindthenext(secon

7、dlayer)mnuFindOnFour.Helpmenu:Help(layer1)mnuHelpInstructions(secondlayers)mnuUsageAbout(secondlayers)mnuAbout(Note:shortcutkeysforeachmenuitemaresetbythemselves)OK,othermenuitemswillbeaddedassoonasneeded.Enternow:Stepthree:writecode.'declarelookupvariablesDimsFindAsStringSta

8、tementfiletypeDimFileType,FiTypeAsStringInitializationprogramPrivate

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。