Microsoft KB Archive/254496

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 12:52, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


Article ID: 254496

Article Last Modified on 6/29/2004



APPLIES TO

  • Microsoft Visual Basic 5.0 Learning Edition
  • Microsoft Visual Basic 6.0 Learning Edition
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic 6.0 Enterprise Edition



This article was previously published under Q254496

SUMMARY

The PrintImage method of the Image Edit control simply uses the system default printer, and does not provide an option to change printers or to change settings. This article describes how to make these changes by using the ImageAdmin control.

MORE INFORMATION

The Wang (Kodak) controls, including ImageEdit and ImageAdmin, do not ship with Visual Basic, but are included with some versions of Microsoft Windows. The later versions of the Wang controls are renamed as the Kodak controls.

Step by Step Example

Please note that you need to change the .Image property below to a file that is available on your computer.

  1. Start a new Standard EXE project in Visual Basic. Form1 is created by default.
  2. From the Project menu, select Components, check either the Wang Image Edit control or the Kodak Image Edit control, and then click OK.
  3. From the Project menu, select Components, check either the Wang Image Admin control or the Kodak Image Admin control, and then click OK.
  4. Add an instance of the Wang (Kodak) Image Edit control to Form1.
  5. Add an instance of the Wang (Kodak) Image Admin control to Form1.
  6. Add a CommandButton to the form.
  7. Add the following code to the form:

    Private Sub Command1_Click()
        With ImgEdit1
            ' change <myfile> to a file on your system
            .Image = "<myfile>"
            .Display
            ImgAdmin1.Image = .Image
            ImgAdmin1.ShowPrintDialog Form1.hWnd
            .PrintImage 1, 1, 0
        End With
    End Sub
                        
  8. Run the project and click Command1. You should see the printer dialog, and the image should print with the options and printer you selected.


REFERENCES

For additional information on using the Wang (Kodak) ImageEdit control, click the article numbers below to view the articles in the Microsoft Knowledge Base:

230489 How To Annotate Image with Text Using ImageEdit Control


197129 INFO: Wang Image Control Limited to 18k Pixels in Ea. Dimension


Keywords: kbhowto kbprint kbctrl KB254496