Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Printer change code (Mr. A. Kallal)

Discussion in 'Information Technology' started by Mike, Oct 26, 2005.

  1. Mike

    Mike
    Expand Collapse
    Guest

    Hi,

    While doing a websearch on changing printers for Access 2000 I came
    across your site and downloaded your code (printch2k) and implemented
    it into my program.

    All works fine accept the return to the default printer, it does not
    work in my case, there is no default printer set after the code is run
    if I look at the printersection! So afterwards I have to manually set
    the defaultprinter again.

    My guess the problem is the writing to the win.ini file, because I see
    nothing of a device in that file? I use windowsXP and Access 2000,
    could that be a problem?

    Any help much appreciated,

    Thanks, Mike
     
  2. Loading...

    Similar Threads Forum Date
    SciTech Future of Organs? Synthetic Tissue Built with 3-D Printer Breaking News Apr 6, 2013
    Interfaith A Sikh Change Comes To Houston’s Finest Interfaith Dialogues Mar 3, 2016
    Angry exchanges with Christians Blogs Oct 17, 2015
    Day 1-Forever Changes, Love Blogs Oct 17, 2015
    Can Guru Sahib change our 'bhaag' (destiny/fortune) or we have to live with it ? is it fixed Sikh Sikhi Sikhism Oct 8, 2015

  3. Albert D.Kallal

    Albert D.Kallal
    Expand Collapse
    Guest

    yes, I seen that problem of the "default" printer going away. I believe that
    the default printer is still set, but the "icon" does not show as such...

    That code was/is designed to run on windows 95, 98, and thus it not the best
    for windows XP (it does work as you note).

    With a2002 and later, there is a built in printer object, and thus you don't
    need my code anymore..

    I don't have a solution to your problem, but it been a while since I looked
    at that code.

    You could try removing the code that is supposed "prevent this" problem.

    So, try commenting out the

    Call SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0, ByVal "windows")

    The above updates windows to show the correct default printer. Since you are
    switching back, then remove the above line...it might fix your problem
    because less effort will be made to show the "new" default printer that you
    only use for a short time......


    --
    Albert D. Kallal (Access MVP)
    Edmonton, Alberta Canada
    pleaseNOOSpamKallal@msn.com
    http://www.members.shaw.ca/AlbertKallal
     
  4. Mike

    Mike
    Expand Collapse
    Guest

    Thanks for the respons, already tried to remove that line but no luck!

    I however managed to get my problem fixed with a combination of your
    code and the code on

    http://support.microsoft.com/kb/266767/EN-US

    Don't know how it wokrs, but it works!

    But thanks again,

    Mike
     

Share This Page