πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #2374

R: avvertire un utente che sta salvando un file gia esistente

#2374
From: Alessio
Date: Tue, 10 Jun 2003 21:27
55 lines
3082 bytes
Genesio Conti <genesio.conti@virgilio.it> wrote in message
TY2Fa.64566$pR3.1385021@news1.tin.it...
>
> "Alessio" <@ .it> ha scritto nel messaggio
> news:hbOEa.99319$g92.2366727@news2.tin.it...
> > o creato un programma compatibile con diversi formato di testo nella
quale
> > devo inserire una modalita di avvertimento che l'utente finale sta per
> > salvare su un file esistente e inserire un messaggio personalizato ( non
> di
> > Windows ) Ad esempio
> > il file Pinco.doc esiste gia sei sicuro di riscriverlo?.
> > o il seguente codice ( dove devo inserire questo tipo di modalita
> > grazie in anticipo per l'aiuto
> >
> > PS: chiedo scusa se non avete capito questo messaggio
>
> Se utilizzi CommonDialog, prima del metodo CommonDialog1.ShowSave, imposta
> il flag
> cdlOFNOverwritePrompt, e ti verrοΏ½ mostrato il msg " Il file esiste, ecc."
>
> altrimenti prima di salvare il file :
> if Dir$(nome_file_con_path) <> "" then ' il file esiste che facciamo ?
> ...
> end if
>
>
ti do il codice di base

Private Sub mnuSaveAs_Click()
  On Error GoTo SaveCancelled

MDIForm1.CommonDialog1.Filter = "File edit document text(*.edt)|*edt| File
RTF (*.rtf)|*.rtf|File word (*.doc)|*.doc|Tutti i file (*.*)|*.*" (tipi di
file disponibili di salvatagio
  CommonDialog1.ShowSave

  If CommonDialog1.FileName = "" Then Exit Sub
  Open CommonDialog1.FileName For Output As #1
  Print #1, ChildForms(frm).text1.TextRTF (come si desidera salvare il testo
  Close #1
  If NeedSaved(frm) = True Then
    NeedSaved(frm) = False
    ChildForms(frm).Caption = Right$(ChildForms(frm).Caption,
Len(ChildForms(frm).Caption) - 1)
  End If
  ChildForms(frm).Caption = CommonDialog1.FileTitle
  file(frm) = CommonDialog1.FileTitle
  PFile(frm) = CommonDialog1.FileName

SaveCancelled:
End Sub
non capisco dove inserire i nuovi codici ( mi dava errore di sintassi o non
si apriva la maschera di salvatagio)
Technical Details
Message-ID: <73sFa.71715$pR3.1514311@news1.tin.it>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!nntp.infostrada.it!news-out.tin.it!news-in.tin.it!news1.tin.it.POSTED!not-for-mail
References: <hbOEa.99319$g92.2366727@news2.tin.it> <TY2Fa.64566$pR3.1385021@news1.tin.it>

Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII
X-Google-Thread: f94ee,ff90c2e0f5ee5253
X-Google-Attributes: gidf94ee,public
X-Google-ArrivalTime: 2003-06-10 14:28:05 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!news.mailgate.org!nntp.infostrada.it!news-out.tin.it!news-in.tin.it!news1.tin.it.POSTED!not-for-mail
From: "Alessio" <@ .it>
Newsgroups: free.it.visual-basic
References: <hbOEa.99319$g92.2366727@news2.tin.it> <TY2Fa.64566$pR3.1385021@news1.tin.it>
Subject: R: avvertire un utente che sta salvando un file gia esistente
Lines: 57
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Message-ID: <73sFa.71715$pR3.1514311@news1.tin.it>
Date: Tue, 10 Jun 2003 21:27:31 GMT
NNTP-Posting-Host: 80.104.167.151
X-Complaints-To: newsmaster@tin.it
X-Trace: news1.tin.it 1055280451 80.104.167.151 (Tue, 10 Jun 2003 23:27:31 MET DST)
NNTP-Posting-Date: Tue, 10 Jun 2003 23:27:31 MET DST
Organization: TIN