Click here to Skip to main content
15,922,427 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralHelp ASAP Uploading pdf files in web server or database Pin
Anonymous4-Apr-05 16:25
Anonymous4-Apr-05 16:25 
GeneralRe: Help ASAP Uploading pdf files in web server or database Pin
Dave Kreskowiak5-Apr-05 3:35
mveDave Kreskowiak5-Apr-05 3:35 
GeneralListbox Pin
rstat14-Apr-05 15:05
rstat14-Apr-05 15:05 
GeneralRe: Listbox Pin
Dave Kreskowiak5-Apr-05 3:28
mveDave Kreskowiak5-Apr-05 3:28 
GeneralRe: Listbox Pin
rstat15-Apr-05 9:46
rstat15-Apr-05 9:46 
GeneralRe: Listbox Pin
Dave Kreskowiak5-Apr-05 10:25
mveDave Kreskowiak5-Apr-05 10:25 
GeneralDetermining File Type Pin
Anonymous4-Apr-05 11:42
Anonymous4-Apr-05 11:42 
GeneralRe: Determining File Type Pin
Anonymous4-Apr-05 14:59
Anonymous4-Apr-05 14:59 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shgetfileinfo.asp

SHGFI_TYPENAME
Retrieve the string that describes the file's type. The string is copied to the szTypeName member of the structure specified in psfi.
=============================================
Something like this:
=============================================
Imports System.Runtime.InteropServices

Public Class Form1
Inherits System.Windows.Forms.Form

Private Declare Auto Function SHGetFileInfo Lib "shell32.dll" ( _
ByVal pszPath As String, _
ByVal dwFileAttributes As Integer, _
ByRef psfi As SHFILEINFO, _
ByVal cbFileInfo As Integer, _
ByVal uFlags As Integer _
) As IntPtr

<structlayout(layoutkind.sequential, charset:="CharSet.Auto)"> _
Private Structure SHFILEINFO
Public hIcon As Int32
Public iIcon As Int32
Public dwAttributes As Int32
<marshalas(unmanagedtype.byvaltstr, sizeconst:="260)"> _
Public szDisplayName As String
<marshalas(unmanagedtype.byvaltstr, sizeconst:="80)"> _
Public szTypeName As String
End Structure

Private Const SHGFI_TYPENAME As Int32 = &H400

Private Sub Form1_Load( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs _
) Handles MyBase.Load
Dim x As SHFILEINFO
Call SHGetFileInfo("C:\test\test.tex", 0, x, Len(x), SHGFI_TYPENAME)
MsgBox(x.szTypeName)
End Sub
End Class
GeneralRe: Determining File Type Pin
Anonymous4-Apr-05 16:51
Anonymous4-Apr-05 16:51 
GeneralEnumerating PATH environment variable. Pin
MrRich4-Apr-05 10:56
MrRich4-Apr-05 10:56 
GeneralRe: Enumerating PATH environment variable. Pin
Anonymous4-Apr-05 16:27
Anonymous4-Apr-05 16:27 
GeneralRePost, I messed up the first one Pin
Anonymous4-Apr-05 16:30
Anonymous4-Apr-05 16:30 
GeneralDang it Pin
Anonymous4-Apr-05 16:33
Anonymous4-Apr-05 16:33 
GeneralTCP client with integers Pin
Member 8079984-Apr-05 9:27
Member 8079984-Apr-05 9:27 
GeneralTrying to understand Data Access - Never Mind! Pin
frgood4-Apr-05 9:25
frgood4-Apr-05 9:25 
GeneralHelp me ASAP. Pin
abeyphier4-Apr-05 4:05
abeyphier4-Apr-05 4:05 
GeneralRe: Help me ASAP. Pin
Christian Graus4-Apr-05 10:34
protectorChristian Graus4-Apr-05 10:34 
GeneralRe: Help me ASAP. Pin
Dave Kreskowiak4-Apr-05 14:13
mveDave Kreskowiak4-Apr-05 14:13 
GeneralRe: Help me ASAP. Pin
Christian Graus4-Apr-05 14:23
protectorChristian Graus4-Apr-05 14:23 
GeneralRe: Help me ASAP. Pin
Dave Kreskowiak4-Apr-05 16:00
mveDave Kreskowiak4-Apr-05 16:00 
GeneralAccess-- Connection String Pin
Anonymous4-Apr-05 3:30
Anonymous4-Apr-05 3:30 
GeneralRe: Access-- Connection String Pin
Jim Matthews4-Apr-05 4:47
Jim Matthews4-Apr-05 4:47 
GeneralRe: Access-- Connection String Pin
Anonymous4-Apr-05 5:10
Anonymous4-Apr-05 5:10 
GeneralRe: Access-- Connection String Pin
Jim Matthews4-Apr-05 5:30
Jim Matthews4-Apr-05 5:30 
GeneralRe: Access-- Connection String Pin
Anonymous4-Apr-05 6:16
Anonymous4-Apr-05 6:16 

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.