🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.vbasic
Article #92377

Re: Problem z otwieraniem pliku

#92377
From: stayheavy
Date: Tue, 25 Oct 2005 07:53
24 lines
1859 bytes
Użytkownik "Robert Kurzawa" <joulesnemo@poczta._ANTYspam_onet.pl.invalid> 
napisał w wiadomości news:djjn2l$v5e$1@news.onet.pl...
> Jeśli w oknie dialogu plik nie zostanie wybrany, to polecenie:
> CommonDialog1.FileName zwraca pusty string (Plik = ""),
> czego konsekwecją jest błąd polecenia Open.
> Musisz więc sprawdzić, czy zmienna Plik zawiera ścieżkę
> dostępu czy też string pusty. W tym drugim przypadku należy
> przerwać działanie procedury:
>
>    If Plik = "" Then
>        Exit sub
>    End if
>
> Sprawdzenie warunku If Plik = "" Then jest intuicyjne
> i poprawne, lecz bardziej eleganckie, a przy tym znacznie
> szybsze będzie sprawdzenie warunku:
>
>    If LenB(Plik) = 0 Then
>        Exit Sub
>    End if
>
> czyli sprawdzenie długości (w bajtach) stringu Plik.

Serdeczne dzieki za pomoc :). 
Technical Details
Message-ID: <djko9r$n05$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <djjdt9$jog$1@nemesis.news.tpi.pl> <djjn2l$v5e$1@news.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: "stayheavy" <stayheavy@interia.pl>
Newsgroups: pl.comp.lang.vbasic
Subject: Re: Problem z otwieraniem pliku
Date: Tue, 25 Oct 2005 09:53:22 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 26
Message-ID: <djko9r$n05$1@atlantis.news.tpi.pl>
References: <djjdt9$jog$1@nemesis.news.tpi.pl> <djjn2l$v5e$1@news.onet.pl>
NNTP-Posting-Host: aqk168.neoplus.adsl.tpnet.pl
X-Trace: atlantis.news.tpi.pl 1130226812 23557 83.26.170.168 (25 Oct 2005 07:53:32 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Tue, 25 Oct 2005 07:53:32 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit