Click here to Skip to main content
15,889,600 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionvery simple Enumerators, help please? Pin
Nadroj16-Sep-04 15:23
Nadroj16-Sep-04 15:23 
AnswerRe: very simple Enumerators, help please? Pin
Syed Abdul Khader16-Sep-04 18:41
Syed Abdul Khader16-Sep-04 18:41 
GeneralRe: very simple Enumerators, help please? Pin
Nadroj16-Sep-04 18:45
Nadroj16-Sep-04 18:45 
Generalpaper size collection method Pin
V_A_S_S16-Sep-04 13:10
V_A_S_S16-Sep-04 13:10 
GeneralRe: paper size collection method Pin
Anonymous16-Sep-04 14:08
Anonymous16-Sep-04 14:08 
GeneralRe: paper size collection method Pin
V_A_S_S16-Sep-04 15:13
V_A_S_S16-Sep-04 15:13 
GeneralRe: paper size collection method Pin
Dave Kreskowiak16-Sep-04 17:07
mveDave Kreskowiak16-Sep-04 17:07 
GeneralRe: paper size collection method Pin
V_A_S_S16-Sep-04 19:57
V_A_S_S16-Sep-04 19:57 
Ok here is the code so far:

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim objPrint As New System.Drawing.Printing.PrinterSettings

Dim strItem As String
Dim strPrinters As String
For Each strItem In objPrint.InstalledPrinters
cmbPrinter.Items.Add(strPrinters & strItem)
Next

End Sub


Private Sub cmbPrinter_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbPrinter.SelectedIndexChanged
' Add list of supported paper sizes found on the printer.
Dim searchstring As String
Dim SearchChar As String
Dim MyPos As Integer
Dim i As Integer
Dim pkSize As System.Drawing.Printing.PaperSize = Nothing
SearchChar = "A4"

For Each pkSize In printDoc.PrinterSettings.PaperSizes
lstPaper.Items.Add(pkSize.PaperName)
Next

For i = 0 To lstPaper.Items.Count - 1
lstPaper.SelectedIndex = i
searchstring = lstPaper.SelectedItem()
MyPos = InStr(searchstring, SearchChar)
If MyPos = 0 Then
lstPaper.Items.Remove(0)
Else
paperToUse = searchstring
End If
Next

updateDisplay()
End Sub


I can fill the combobox of the printers and the list box of the papers. BUT when i click on another printer the program DOSEN'T give me the list of the paper sizes on the new selected printer. It's like it stucks in the paper sizes of the default printer...
HEEEEEEEEEEEEEEEEEEEEEEEEEELP!!!
Eek! | :eek:

Trying to find the way
GeneralDataGrid in .Net Pin
Britnt716-Sep-04 8:01
Britnt716-Sep-04 8:01 
GeneralRe: DataGrid in .Net Pin
Anonymous16-Sep-04 8:46
Anonymous16-Sep-04 8:46 
GeneralRe: DataGrid in .Net Pin
Britnt716-Sep-04 9:27
Britnt716-Sep-04 9:27 
GeneralRe: DataGrid in .Net Pin
Anonymous16-Sep-04 9:41
Anonymous16-Sep-04 9:41 
GeneralRe: DataGrid in .Net Pin
Purple Monk17-Sep-04 5:48
Purple Monk17-Sep-04 5:48 
GeneralChanging Colors on InputBox's Pin
ProgBeaker16-Sep-04 7:02
ProgBeaker16-Sep-04 7:02 
GeneralRe: Changing Colors on InputBox's Pin
tricknigjew16-Sep-04 11:47
tricknigjew16-Sep-04 11:47 
GeneralRaiseEvent Connected not working Pin
Anonymous16-Sep-04 6:39
Anonymous16-Sep-04 6:39 
GeneralProblem in User Control after installing Framework 1.1 sp1 Pin
GanesanM16-Sep-04 4:20
GanesanM16-Sep-04 4:20 
GeneralRe: Problem in User Control after installing Framework 1.1 sp1 Pin
Dave Kreskowiak16-Sep-04 4:38
mveDave Kreskowiak16-Sep-04 4:38 
Generalget a url with MSXML2.ServerXMLHTTP but encoding problem Pin
karanba16-Sep-04 3:38
karanba16-Sep-04 3:38 
GeneralRe: get a url with MSXML2.ServerXMLHTTP but encoding problem Pin
Dave Kreskowiak16-Sep-04 4:41
mveDave Kreskowiak16-Sep-04 4:41 
GeneralLinking VBScript back to VB6 Pin
pplikill16-Sep-04 2:35
pplikill16-Sep-04 2:35 
GeneralRe: Linking VBScript back to VB6 Pin
Dave Kreskowiak16-Sep-04 3:36
mveDave Kreskowiak16-Sep-04 3:36 
GeneralRe: Linking VBScript back to VB6 Pin
tricknigjew16-Sep-04 3:48
tricknigjew16-Sep-04 3:48 
Generaldatagrid problem in vb.net Pin
sribusam15-Sep-04 23:32
sribusam15-Sep-04 23:32 
GeneralHandle Clipboard event in VB.NET Pin
kokain15-Sep-04 23:24
kokain15-Sep-04 23:24 

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.