|
-
May 27th, 2001, 01:29 PM
#1
Thread Starter
Member
Cool Notepad
I am making my own version of Notepad and it has been many months scince I last programed in VB. My question is, how can I make it so that I can open any file I like, i.e. "html, php, asp, dll..." and save it as any file I like. I want to save it as .php as default.
Thanks,
Sam
-
May 27th, 2001, 02:05 PM
#2
Frenzied Member
Use the Common Dialog and here is the filter
Use the same filter to save
Code:
CommonDialog1.Filter = "AllFiles (*.*)|*.*|PHP Docs(*.Php)
|*.php|HTML Docs(*.htm)|*.htm"
CommonDialog1.ShowOpen
-
May 27th, 2001, 02:06 PM
#3
Member
cool notepad
dim drivepath as string
dim filename as string
dim pattern as string
pattern=".php"'file type
filename=txtFilename.text'filename
drivepath=txtDrivepath.text'drive letter ex: c:\
file=drivepath & filename & pattern
open file for output as #1 'opens the file
write #1,'what ever you want to write to the file
close #1'closes the file
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|