Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 8th, 2006, 7:06 PM   #1
Indigno
Professional Programmer
 
Indigno's Avatar
 
Join Date: Dec 2005
Location: Anywhere non-productive
Posts: 267
Rep Power: 0 Indigno is an unknown quantity at this point
Send a message via AIM to Indigno Send a message via MSN to Indigno Send a message via Yahoo to Indigno
Encryption Program

I am making a little text encryption tool. The problem I have is that I don't know how to make the little open/ save window pop up and let me visually select where to open and save files to and from. Can someone tell me how to do that?
Indigno is offline   Reply With Quote
Old Feb 12th, 2006, 6:27 AM   #2
pal121
Newbie
 
Join Date: Feb 2006
Location: Bedford
Posts: 2
Rep Power: 0 pal121 is on a distinguished road
i have the code, this would be an example with 2 command buttons, one textbox and you need to add the component Microsoft Common Dialog Control 6.0

opening files:

Private Sub cmdopen_Click()
 
Dim filelocation As String
 
' show open box
    commondialog1.ShowOpen
    
    filelocation = commondialog1.FileName
 
' input files into text1.text   
    Open filelocation For Input As #1
    
Do Until EOF(1)
 
        Input #1, Data
        text1.text = text1.text + Data + vbNewLine
    EOF (1)
    Loop
    Close #1
    
End Sub

saving files:

Private Sub cmdsave_Click()
 
Dim filelocation As String
 
' loads save as box
    commondialog1.ShowSave
    
    filelocation = commondialog1.FileName
    
' append saves over file if it assists
    Open filelocation For Append As #1
        Print #1, text1.text
    Close #1
 
End Sub
pal121 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:31 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC