Click here to Skip to main content
16,004,919 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Executing Process from VB Application Pin
hsprasain30-Jun-07 8:14
hsprasain30-Jun-07 8:14 
GeneralRe: Executing Process from VB Application Pin
Christian Graus30-Jun-07 12:36
protectorChristian Graus30-Jun-07 12:36 
QuestionWeek Number from MonthCalender Pin
Bright267729-Jun-07 20:46
Bright267729-Jun-07 20:46 
AnswerRe: Week Number from MonthCalender Pin
Ajai Chaudhary29-Jun-07 21:07
Ajai Chaudhary29-Jun-07 21:07 
GeneralRe: Week Number from MonthCalender Pin
Guffa30-Jun-07 7:46
Guffa30-Jun-07 7:46 
AnswerRe: Week Number from MonthCalender Pin
Guffa30-Jun-07 7:43
Guffa30-Jun-07 7:43 
QuestionEnumerating Network Printers Pin
xbiplav29-Jun-07 19:48
xbiplav29-Jun-07 19:48 
AnswerRe: Enumerating Network Printers Pin
Duncan Edwards Jones30-Jun-07 1:22
professionalDuncan Edwards Jones30-Jun-07 1:22 
You can use the EnumPrinters API
(Declaration)
VB
<DllImport("winspool.drv", EntryPoint:="EnumPrinters", _
SetLastError:=True, CharSet:=CharSet.Ansi, _
ExactSpelling:=False, _
CallingConvention:=CallingConvention.StdCall)> _
Public Function EnumPrinters(<InAttribute()> ByVal Flags As EnumPrinterFlags, _
                             <InAttribute()> ByVal Name As String, _
                             <InAttribute()> ByVal Level As Int32, _
                             <OutAttribute()> ByVal lpBuf As IntPtr, _
                             <InAttribute()> ByVal cbBuf As Int32, _
                             <OutAttribute()> ByRef pcbNeeded As Int32, _
                             <OutAttribute()> ByRef pcbReturned As Int32) As Boolean

End Function


passing in the appropriate EnumPrinterFlags from:
VB
<Flags()> _
Public Enum EnumPrinterFlags
    PRINTER_ENUM_DEFAULT = &H1
    PRINTER_ENUM_LOCAL = &H2
    PRINTER_ENUM_CONNECTIONS = &H4
    PRINTER_ENUM_FAVORITE = &H4
    PRINTER_ENUM_NAME = &H8
    PRINTER_ENUM_REMOTE = &H10
    PRINTER_ENUM_SHARED = &H20
    PRINTER_ENUM_NETWORK = &H40
End Enum


'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd

QuestionRe: Enumerating Network Printers Pin
xbiplav30-Jun-07 5:08
xbiplav30-Jun-07 5:08 
AnswerRe: Enumerating Network Printers Pin
Duncan Edwards Jones30-Jun-07 6:19
professionalDuncan Edwards Jones30-Jun-07 6:19 
GeneralRe: Enumerating Network Printers Pin
xbiplav30-Jun-07 6:28
xbiplav30-Jun-07 6:28 
QuestionDLL REGISTRATION Pin
saurabhshri29-Jun-07 19:36
saurabhshri29-Jun-07 19:36 
AnswerRe: DLL REGISTRATION Pin
Ajai Chaudhary29-Jun-07 19:43
Ajai Chaudhary29-Jun-07 19:43 
AnswerRe: DLL REGISTRATION Pin
Christian Graus29-Jun-07 23:43
protectorChristian Graus29-Jun-07 23:43 
QuestionHow to attach a word tamplate in existing file. Pin
Ajai Chaudhary29-Jun-07 19:34
Ajai Chaudhary29-Jun-07 19:34 
QuestionCrystal Report Pin
saurabhshri29-Jun-07 19:29
saurabhshri29-Jun-07 19:29 
AnswerRe: Crystal Report Pin
klaydze29-Jun-07 23:17
klaydze29-Jun-07 23:17 
QuestionInstalling Application Pin
nitin_ion29-Jun-07 19:15
nitin_ion29-Jun-07 19:15 
AnswerRe: Installing Application Pin
Christian Graus29-Jun-07 23:49
protectorChristian Graus29-Jun-07 23:49 
QuestionBackground Processing Pin
Ajai Chaudhary29-Jun-07 18:58
Ajai Chaudhary29-Jun-07 18:58 
AnswerRe: Background Processing Pin
Christian Graus29-Jun-07 23:50
protectorChristian Graus29-Jun-07 23:50 
QuestionShutdowning your computer Pin
klaydze29-Jun-07 18:19
klaydze29-Jun-07 18:19 
AnswerRe: Shutdowning your computer Pin
ips_sun29-Jun-07 20:42
ips_sun29-Jun-07 20:42 
GeneralRe: Shutdowning your computer Pin
Ajai Chaudhary29-Jun-07 20:49
Ajai Chaudhary29-Jun-07 20:49 
GeneralRe: Shutdowning your computer Pin
klaydze29-Jun-07 23:12
klaydze29-Jun-07 23:12 

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.