MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides

Homepage Register FAQ Members Mark Forums Read Advertise Marketplace FPSowned


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > Programming > Programming section > VB
Reload this Page [Guide] Visual Basic 2008 - How To Make A File Editor
VB Discussions about VB programming

Reply
 
LinkBack Thread Tools
[Guide] Visual Basic 2008 - How To Make A File Editor
(#1)
Old
Caroe's Avatar
Caroe is Offline
Sergeant
Rep Power: 2
Reputation: 14
Caroe is on a distinguished road
 
Posts: 60
Join Date: Jul 2007
Location: H4x0r W0r|d
Legendary [Guide] Visual Basic 2008 - How To Make A File Editor - 05-31-2008

Design :

1) Make a "Rich Textbox" and make it fill everything, but make a place for at toolstrip in the top.
2) Add a "Toolstrip Menu"
3) Press "Make New" (Also known as "Arrow down")
4) Choose "DropDown Button"
5) Right-Click the DropDown Button, choose "Display Style" and say Text.
6) now call it file, and make the following dropdown buttons :
Open
Save
Exit
7) Now do the same again, but call the new dropdown menu "Edit" and add the following dropdown buttons:
Undo
Redo
Copy
Paste
Cut
8) now to the coding.

Code :
1) For the "Undo" button use this code :
Code:
RichTextBox1.Undo()
2) For the "Redo" button use this code :
Code:
RichTextBox1.Redo()
3) For the "Copy" button use this code :
Code:
RichTextBox1.Copy()
4) For The "Paste" button use this code :
Code:
RichTextBox1.Paste()
5) For the "Cut" button use this code :
Code:
RichTextBox1.Cut()
These codes are also called "Drag and Drop codes" becourse their so easy. its just "Element.Function" so its not hard
6) For "Open" button use this code:
(This code is a bit bigger)
Code:
Dim Open As New OpenFileDialog()
        Dim myStreamReader As System.IO.StreamReader
        Open.Filter = "All Files[*.*]|*.*"
        Open.CheckFileExists = True
        Open.Title = "Open File"
        Open.ShowDialog(Me)
        Try
            Open.OpenFile()
            myStreamReader = System.IO.File.OpenText(Open.FileName)
            Document.Text = myStreamReader.ReadToEnd()
        Catch ex As Exception

        End Try
let me explain how this works, Stream Writer & Stream Reader is like "Save & Load" becourse "Stream Writer" writes text (Same as SAVE) and Stream Reader says itself in the name xD
"Dim" mean Make A New Code As [System File]
lets get to the next code, shall we ?
7) For the "Save" button use this code :
Code:
Dim Save As New SaveFileDialog()
        Dim myStreamWriter As System.IO.StreamWriter
        Save.Filter = "All Files[*.*]|*.*"
        Save.CheckPathExists = True
        Save.Title = "Save File"
        Save.ShowDialog(Me)
        Try
            myStreamWriter = System.IO.File.AppendText(Save.FileName)
            myStreamWriter.Write(Document.Text)
            myStreamWriter.Flush()
        Catch ex As Exception
            'Do nothing on Exception'
        End Try
i just told how Stream Reader and Stream Writer works, so u can easily figure this cod out.
8) For "Exit" button use this code :
Code:
Me.Close()
Remember the "Exit" code, u can use this in al programs as a "Close Button" or something. "Me" means [This Form] so if ur in form 2 and wanna close form 1 use "Form1.Close()

Thanks for Looking, Enjoy
Reply With Quote

Donate to remove ads.
(#2)
Old
The Maffyx is Offline
Knight-Champion
Rep Power: 2
Reputation: 43
The Maffyx is on a distinguished road
 
Posts: 555
Join Date: Feb 2007
06-01-2008

I would suggest doing something about the anchors, because if someone wanted to maximize the form, the text box would be one one place and not stretch with the form.




Reply With Quote
(#3)
Old
Neth'zul's Avatar
Neth'zul is Offline
Contributor
Rep Power: 2
Reputation: 182
Neth'zul has a spectacular aura aboutNeth'zul has a spectacular aura about
 
Posts: 772
Join Date: Nov 2007
Location: COMSA Scammer + COSA
4 Weeks Ago

I keep getting errors for DocumentType and Document




Reply With Quote
Reply

Donate to remove ads.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On




Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320