Results 1 to 2 of 2

Thread: Data.GetFormat(1) - txt file returning false?

  1. #1

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Data.GetFormat(1) - txt file returning false?

    Im using a picbox.. and checking the format for text file..
    its returning false?? but it will pass when checking if its a list of files

    Data.GetFormat(VbCFText) = False
    Data.GetFormat(VbCFFiles) = True

    It is a text file!???
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Data.GetFormat(1) - txt file returning false?

    You could've as well explain what you're trying to do...
    Since it looks like OleDragDrop here's what you can do (some extra validations may required):
    VB Code:
    1. Private Sub Picture1_OLEDragDrop(Data As DataObject, Effect As Long, _
    2.                                  Button As Integer, Shift As Integer, _
    3.                                  X As Single, Y As Single)
    4. Dim i%
    5.  
    6.     For i = 1 To Data.Files.Count 'indexing starts at 1
    7.         Debug.Print Data.Files(i)
    8.         Select Case LCase(Right(Data.Files(i), 3)) 'you may want to work with this line
    9.             Case "txt"
    10.                 '...
    11.             Case Else
    12.                 '...
    13.         End If
    14.     Next i
    15.  
    16. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width