Welcome to SPN

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

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $98

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
    Can Sikhi Be Relevant In The Modern World As A Driver For Social Change? Blogs Feb 22, 2017
    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

  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
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page