Pagina 2 di 5 primaprima 1 2 3 4 ... ultimoultimo
Visualizzazione dei risultati da 11 a 20 su 44
  1. #11
    Utente di HTML.it L'avatar di junx
    Registrato dal
    May 2004
    Messaggi
    322
    ma tu passi al command il nome del file??

  2. #12
    forse devo fare il contrario.......

  3. #13
    Utente di HTML.it L'avatar di junx
    Registrato dal
    May 2004
    Messaggi
    322
    metti che il tuo programma si chiami notepad2.exe, e supponi di eseguirlo da un finestra di dos.

    Così non funziona:

    notepad2.exe


    Così funziona:

    notepad2.exe C:\tuofile.txt

  4. #14
    ok..ma cosa c'è da mettere a posto nel codice di sopra?

  5. #15
    Utente di HTML.it L'avatar di junx
    Registrato dal
    May 2004
    Messaggi
    322
    hai provato a compilare e vedere se funziona?

  6. #16
    codice:
     Private Sub Form_Load()
    Command$ = Filename
    If Filename <> "" Then
                F = FreeFile
                Open Filename For Input As F                    ' Open the file selected in the File Open About dialog box.
                frmEditor!txtEdit.Text = Input(LOF(F), F)
                Close F                                         ' Close the file.
                ' frmEditor.mnuFileItem(3).Enabled = True         ' Enable the Close command on the File menu.
                UpdateMenu
                frmEditor.Caption = "CodeWorld Editor - 1.0 : " + Filename
    Unload Me
    End If
    End Sub


    ho fatto così...e mi dice che la chiamata di funzione deve restituire o variant o object...

  7. #17
    non ne vengo a capo..............

  8. #18
    sono arrivato a questo punto:

    codice:
     Filename = Command$
    If Filename <> "" Then
    
                OpenFile (Filename)
                'frmEditor.Show
                'frmEditor!txtEdit.Text = Input
                frmEditor.Caption = "CodeWorld Editor - 1.0 : " + Filename
                frmEditor.Show
                
    
    Unload Me
    End If

    funziona perchè mi prende il nome del file...nel Caption


    ma come faccio a prendere il testo contenuto nel file che apro e a metterlo nella mia rich text box?
    nono riesco...

  9. #19
    Utente di HTML.it L'avatar di junx
    Registrato dal
    May 2004
    Messaggi
    322
    ma cos'è OpenFile???
    Una funzione? un Sub?
    Mostra il codice.

  10. #20
    codice:
     Private Sub Form_Load()
    Label1.Caption = Environ$("USERNAME")
    Filename = Command$
    If Filename <> "" Then
    
                OpenFile (Filename)
                frmEditor.Caption = "CodeWorld Editor - 1.0 : " + Filename
                frmEditor.Show
                
    
    Unload Me
    End If
    End Sub

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.