Solved

Changing the win95 default printer

Posted on 1997-12-28
9
253 Views
Last Modified: 2011-09-20
I nead to change the default printer of win95 using access
basic. I am using Access02.
any Help?

Amitai Medan
0
Comment
Question by:mAmitai
9 Comments
 
LVL 4

Expert Comment

by:ozphil
Comment Utility
Such a question should be valued at 100 points.

i think you must have inadvertantly left off a zero amitai.



0
 
LVL 1

Author Comment

by:mAmitai
Comment Utility
1. New member
2. Who sets the prices here?

0
 
LVL 4

Expert Comment

by:ozphil
Comment Utility
Could you try this please:

To change the Microsoft Windows default printer using Visual Basic code (or Access Basic code in version 2.0 or earlier), use WriteProfileString to change the Device= entry of the Microsoft Windows section of the Win.ini file.
0
 
LVL 1

Author Comment

by:mAmitai
Comment Utility
I tryed this with some win3.11 program and it seams to be working. But when I tryed it with Word 7.0 it did not.

as far as i anderstand the win95 stors this information
in two places:

1. win.ini file.
2. some other place, perhaps the registry.

When you update the win95 system it updates the win.ini as well
but if you update the win.ini file it does not updates the win95 system.

What i realy nead is some API function.

0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 1

Expert Comment

by:ngpudding
Comment Utility
I wonder if you could use the PrtDevNames property coz' I'm currently running Access95. Go to their Help to specify the above property as the search string.

But I do have a list of Printer APIs, unfortunately I forgot how to use them. But what you could do is get hold of a Win32 API book from any library of yours or any available sources on the Net, perhaps the MS newsgroup at microsoft.public.vb.api or at microsoft.public.access

I think you can not only find an answer and ask an answer but more than what you can think of. Good luck !!!

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Declare Function PrintDlg Lib "comdlg32.dll" Alias "PrintDlgA" (pPrintdlg As PRINTDLG) As Long

Declare Function PrinterMessageBox Lib "winspool.drv" Alias "PrinterMessageBoxA" (ByVal hPrinter As Long, ByVal error As Long, ByVal hwnd As Long, ByVal pText As String, ByVal pCaption As String, ByVal dwType As Long) As Long

Declare Function PrinterProperties Lib "winspool.drv" Alias "PrinterProperties" (ByVal hwnd As Long, ByVal hPrinter As Long) As Long

Declare Function ResetPrinter Lib "winspool.drv" Alias "ResetPrinterA" (ByVal hPrinter As Long, pDefault As PRINTER_DEFAULTS) As Long

Declare Function SetPrinter Lib "winspool" Alias "SetPrinterA" (ByVal hPrinter As Long, ByVal Level As Long, pPrinter As Byte, ByVal Command As Long) As Boolean

Declare Function SetPrinterData Lib "winspool.drv" Alias "SetPrinterDataA" (ByVal hPrinter As Long, ByVal pValueName As String, ByVal dwType As Long, pData As Byte, ByVal cbData As Long) As Long
0
 
LVL 1

Author Comment

by:mAmitai
Comment Utility
I prefer the answer of ozphil
how do I give him the points and grade him?
the answer of ngpudding was unusful.
0
 
LVL 12

Expert Comment

by:Trygve
Comment Utility
mAmitai: Ozphil should repost his suggestion, and then you can grade him so that he receives the points. If he still have the email notification box checked out he will be notified by this comment and hopefully read it. If he does not respond you could insert a new question with 0 points attached to it telling him to go and get it. This question will get on top of the list and he will most surtainly read it.

Ozphil: claim your points.
0
 
LVL 4

Accepted Solution

by:
ozphil earned 50 total points
Comment Utility
Thanks Guys. Now mAmitai just click the 'A' radio button. :-)

To change the Microsoft Windows default printer using Visual Basic code (or Access Basic code in version 2.0 or earlier), use WriteProfileString to change the Device= entry of the Microsoft Windows section of the Win.ini file.
0
 
LVL 1

Author Comment

by:mAmitai
Comment Utility
Thanks a lot...
Case closed
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

762 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

10 Experts available now in Live!

Get 1:1 Help Now