Results 1 to 3 of 3

Thread: Cool Notepad

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    KY
    Posts
    38

    Arrow 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

  2. #2
    Frenzied Member jjortiz's Avatar
    Join Date
    Mar 2001
    Location
    NYC
    Posts
    1,768
    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

  3. #3
    Member boiler's Avatar
    Join Date
    May 2001
    Posts
    39

    Lightbulb 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
  •  



Click Here to Expand Forum to Full Width