Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 296
  • Last Modified:

Changing the win95 default printer

I nead to change the default printer of win95 using access
basic. I am using Access02.
any Help?

Amitai Medan
0
mAmitai
Asked:
mAmitai
1 Solution
 
ozphilCommented:
Such a question should be valued at 100 points.

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



0
 
mAmitaiAuthor Commented:
1. New member
2. Who sets the prices here?

0
 
ozphilCommented:
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
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
mAmitaiAuthor Commented:
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
 
ngpuddingCommented:
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
 
mAmitaiAuthor Commented:
I prefer the answer of ozphil
how do I give him the points and grade him?
the answer of ngpudding was unusful.
0
 
TrygveCommented:
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
 
ozphilCommented:
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
 
mAmitaiAuthor Commented:
Thanks a lot...
Case closed
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now