Click here to Skip to main content
15,892,697 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: calling vb.net function on a dynamic modalpopup extender Pin
Christian Graus2-Feb-09 15:36
protectorChristian Graus2-Feb-09 15:36 
GeneralRe: calling vb.net function on a dynamic modalpopup extender Pin
hyperalergelo2-Feb-09 16:06
hyperalergelo2-Feb-09 16:06 
GeneralRe: calling vb.net function on a dynamic modalpopup extender Pin
Dave Kreskowiak2-Feb-09 18:38
mveDave Kreskowiak2-Feb-09 18:38 
GeneralRe: calling vb.net function on a dynamic modalpopup extender [modified] Pin
hyperalergelo2-Feb-09 18:44
hyperalergelo2-Feb-09 18:44 
QuestionDataGridView Pin
CodingYoshi2-Feb-09 10:12
CodingYoshi2-Feb-09 10:12 
AnswerRe: DataGridView Pin
JoseMenendez2-Feb-09 10:23
JoseMenendez2-Feb-09 10:23 
QuestionChanging Default Printer Pin
Dominick Marciano2-Feb-09 5:53
professionalDominick Marciano2-Feb-09 5:53 
AnswerRe: Changing Default Printer Pin
EliottA2-Feb-09 5:57
EliottA2-Feb-09 5:57 
Use WMI

Public Shared Function SetDefaultPrinter(ByVal PrinterName As String) As Boolean
        'Declare WMI Variables
        Dim MgmtObject As ManagementObject
        Dim MgmtCollection As ManagementObjectCollection
        Dim MgmtSearcher As ManagementObjectSearcher
        Dim ReturnBoolean As Boolean = False

        'Perform the search for printers and return the listing as a collection
        MgmtSearcher = New ManagementObjectSearcher("Select * from Win32_Printer")
        MgmtCollection = MgmtSearcher.Get

        'Enumerate Objects To Find Printer
        For Each MgmtObject In MgmtCollection
            'Look for a match
            If MgmtObject.Item("name").ToString = PrinterName Then
                'Set Default Printer
                Dim TempObject() As Object 'Temporary Object for InvokeMethod. Holds no purpose.
                MgmtObject.InvokeMethod("SetDefaultPrinter", TempObject)

                'Set Success Value and Exit For..Next Loop
                ReturnBoolean = True
                Exit For
            End If
        Next

        'Return Success Value
        Return ReturnBoolean
    End Function

GeneralRe: Changing Default Printer Pin
Dominick Marciano2-Feb-09 6:01
professionalDominick Marciano2-Feb-09 6:01 
GeneralRe: Changing Default Printer Pin
EliottA2-Feb-09 6:02
EliottA2-Feb-09 6:02 
GeneralRe: Changing Default Printer Pin
Dominick Marciano2-Feb-09 9:16
professionalDominick Marciano2-Feb-09 9:16 
QuestionFacing Problem in Creating Mailmerge in Openoffice Using Vb.Net Pin
savanparmar2-Feb-09 5:25
savanparmar2-Feb-09 5:25 
AnswerRe: Facing Problem in Creating Mailmerge in Openoffice Using Vb.Net Pin
EliottA2-Feb-09 6:13
EliottA2-Feb-09 6:13 
GeneralRe: Facing Problem in Creating Mailmerge in Openoffice Using Vb.Net Pin
savanparmar2-Feb-09 6:33
savanparmar2-Feb-09 6:33 
GeneralRe: Facing Problem in Creating Mailmerge in Openoffice Using Vb.Net Pin
EliottA2-Feb-09 6:34
EliottA2-Feb-09 6:34 
GeneralRe: Facing Problem in Creating Mailmerge in Openoffice Using Vb.Net [modified] Pin
savanparmar3-Feb-09 21:20
savanparmar3-Feb-09 21:20 
GeneralRe: Facing Problem in Creating Mailmerge in Openoffice Using Vb.Net Pin
savanparmar5-Feb-09 1:30
savanparmar5-Feb-09 1:30 
QuestionBuilding a Folder View from SQL database Info Pin
WRSL2-Feb-09 4:47
WRSL2-Feb-09 4:47 
AnswerRe: Building a Folder View from SQL database Info Pin
Wendelius2-Feb-09 5:19
mentorWendelius2-Feb-09 5:19 
QuestionSend SMS using a given cell no Pin
Anoop Brijmohun2-Feb-09 0:32
Anoop Brijmohun2-Feb-09 0:32 
AnswerRe: Send SMS using a given cell no [modified] Pin
EliottA2-Feb-09 2:26
EliottA2-Feb-09 2:26 
GeneralRe: Send SMS using a given cell no Pin
Anoop Brijmohun4-Feb-09 0:27
Anoop Brijmohun4-Feb-09 0:27 
AnswerRe: Send SMS using a given cell no Pin
Bharat Jain2-Feb-09 21:14
Bharat Jain2-Feb-09 21:14 
Rant60 points to whoever can make sense of this screenshot Pin
Prodman2-Feb-09 0:06
Prodman2-Feb-09 0:06 
GeneralRe: 60 points to whoever can make sense of this screenshot Pin
JR2122-Feb-09 1:21
JR2122-Feb-09 1:21 

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.