Solved

Checkedlistbox problem #3

Posted on 2004-10-30
142 Views
Last Modified: 2010-04-23
and 3rd part of my problem is this :

I would like to connect my CheckelListBOX1 with CheckBox1  ( I will have 3 CLBOXES and with every of them  will be connected with one Checkbox ) so that only that list box which Checkbox is checked is printed out.(of course if all 3 are checked --then all 3 CLBoxes are printed out.)

THX
0
Question by:spike12
    3 Comments
     
    LVL 96

    Expert Comment

    by:Bob Learned
    Is this a continuation from another question?  If so, then do you have a URL for the previous questions.  Otherwise, this is a confusing description.

    Bob
    0
     
    LVL 1

    Accepted Solution

    by:
    I saw answer on question number 1 and I have connected it with Combobox1 it should work.
    try somethning like this

    Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
            Dim ii As Integer
            If CheckBox1.Checked Then
                Dim fnt As New Font("Arial", 5, FontStyle.Regular)
                For ii = 0 To CheckedListBox1.CheckedItems.Count - 1
                    e.Graphics.DrawString(CheckedListBox1.CheckedItems.Item(ii), fnt, Brushes.Black, 1, 60 + ii * 10)
                Next
            Else
                Exit Sub
            End If


        End Sub
    0
     
    LVL 1

    Expert Comment

    by:newbie22
    not combo but checkbox1 --- sorry  :)
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Product Review - Android Remix

    Come along for the ride with our Senior Product Manager, Brian Matis, as he reviews the Android Remix.

    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    877 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now