Click here to Skip to main content
15,911,715 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralModal Forms in VB 6.0 Pin
Red Sunday15-Sep-04 12:32
Red Sunday15-Sep-04 12:32 
GeneralRe: Modal Forms in VB 6.0 Pin
pbpb15-Sep-04 20:25
pbpb15-Sep-04 20:25 
GeneralRe: Modal Forms in VB 6.0 Pin
Purple Monk16-Sep-04 0:43
Purple Monk16-Sep-04 0:43 
GeneralRe: Modal Forms in VB 6.0 Pin
pbpb16-Sep-04 2:21
pbpb16-Sep-04 2:21 
GeneralVisual Basic Sequential File IO Pin
Red Sunday15-Sep-04 4:50
Red Sunday15-Sep-04 4:50 
GeneralRe: Visual Basic Sequential File IO Pin
Anonymous15-Sep-04 6:31
Anonymous15-Sep-04 6:31 
GeneralRe: Visual Basic Sequential File IO Pin
Red Sunday15-Sep-04 7:12
Red Sunday15-Sep-04 7:12 
GeneralRe: Visual Basic Sequential File IO [EDITED] Pin
Dave Kreskowiak15-Sep-04 8:03
mveDave Kreskowiak15-Sep-04 8:03 
The System.IO namespace contains the File class. This class contains the shared .Exists method you use to check to see if the filename exists, prefferable using the FULL PATH to the file. .Exists isn't documented to throw any exceptions. It just returns True or False.

In a normal installation of Visual Studio .NET or Visual Basic.NET, the System namespace is automatically imported into your project. You don't have to use the Imports System statement at the top of your code because it's already done behind the scenes. You DO, on the other hand, have to put in the Imports System.IO yourself, again, at the top of your code.

Imports System.IO
 
Public Class Form1
    .
    .
    .
    Private Sub WhatEver()
        ' You don't nedd to specify the System.IO namespace prefix because you
        ' already Imported it at the top of your code.
        If File.Exists("C:\myTestFile.txt") Then
            .
            .
            .



RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: Visual Basic Sequential File IO [EDITED] Pin
Red Sunday15-Sep-04 8:14
Red Sunday15-Sep-04 8:14 
GeneralRe: Visual Basic Sequential File IO [EDITED] Pin
Dave Kreskowiak15-Sep-04 9:01
mveDave Kreskowiak15-Sep-04 9:01 
GeneralReturning Integer value from a VB (NOT .Net) Command line application Pin
Jobby Joseph15-Sep-04 3:54
Jobby Joseph15-Sep-04 3:54 
GeneralRe: Returning Integer value from a VB (NOT .Net) Command line application Pin
Dave Kreskowiak15-Sep-04 4:22
mveDave Kreskowiak15-Sep-04 4:22 
GeneralRe: Returning Integer value from a VB (NOT .Net) Command line application Pin
Jobby Joseph15-Sep-04 4:37
Jobby Joseph15-Sep-04 4:37 
GeneralDropdownlist Pin
jr121415-Sep-04 2:53
jr121415-Sep-04 2:53 
GeneralRe: Dropdownlist Pin
Purple Monk16-Sep-04 1:27
Purple Monk16-Sep-04 1:27 
GeneralRe: Dropdownlist Pin
jr121416-Sep-04 3:56
jr121416-Sep-04 3:56 
Generalprinting contents behind scrollbar Pin
vjer00114-Sep-04 19:12
vjer00114-Sep-04 19:12 
GeneralAdjusting PictureBox contrast/brightness Pin
Jason2314-Sep-04 14:29
Jason2314-Sep-04 14:29 
GeneralRe: Adjusting PictureBox contrast/brightness Pin
Anonymous14-Sep-04 18:24
Anonymous14-Sep-04 18:24 
GeneralConnecting to Oracle database Pin
pathuknown14-Sep-04 10:49
pathuknown14-Sep-04 10:49 
GeneralRe: Connecting to Oracle database Pin
Anonymous14-Sep-04 18:30
Anonymous14-Sep-04 18:30 
General.NET and Integer, Long, and Short Pin
GregOsborne14-Sep-04 10:05
GregOsborne14-Sep-04 10:05 
GeneralRe: .NET and Integer, Long, and Short Pin
Charlie Williams14-Sep-04 10:26
Charlie Williams14-Sep-04 10:26 
GeneralRe: .NET and Integer, Long, and Short Pin
GregOsborne14-Sep-04 16:28
GregOsborne14-Sep-04 16:28 
GeneralRe: .NET and Integer, Long, and Short Pin
Charlie Williams14-Sep-04 17:38
Charlie Williams14-Sep-04 17:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.