(Warning: this advise could - and probably WILL - completely knacker your app. Back it up first, and use this knowledge at your own risk!)
(Oh yes, and back it up first!)
How to completely break your app in six easy steps:
[red]0. Back it up![/red]
1. Close down the IDE.
2. Open "form1.frm" ...using Wordpad Ctrl+H = Find & Replace...hmmm.....
3. Replace all instances of "TextBox_" with "TextBox0"
4. Save and close your form.
5. Open your project in VB.
6. Marvel at the amount of Compile and Run-Time Errors.
Breakdown:
The VB form file is a plain text file which the IDE interprets in two halves. The "top half" (which you saw when you opened it) contains information about your controls, positioning, etc. The "bottom half" contains all your carefully crafted code. OK, so when you did that Find&Replace you renamed the controls but also totally screwed your code! ;-) Still you did back it up, so no harm done, then.
You can try to experiment with cutting and pasting the code section out, or go through the controls one at a time. Be warned, however, that the Docs implore you NEVER to open the form files in a text editor as it could well (as we've seen) break your app completely. Did I mention backing it up, BTW?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.