943,989 Members | Top Members by Rank

Ad:
May 5th, 2005
0

Printer Object Question

Expand Post »
I'm having trouble setting the paper size and the paper bin in the printer object. I've tried the following code.

If cboPaperSize.ListIndex = 0 Then
Printer.PaperSize = 1
Else
Printer.PaperSize = 5
End If
If cboPaperSource.ListIndex = 0 Then
Printer.PaperBin = 7
Else
Printer.PaperBin = 4
End If
End If

This works fine at my workstation, but when I run it on a clients computer it crashes here. I haven't really had time to debug it, because I can only make the changes here, and test them there. It's really inefficient. So It may just be one of the two. I'm thinking it might be a paperbin problem, for example if the printers in their collection only have the one bin (manual) then it might crash. Please help.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
javalsu is offline Offline
3 posts
since May 2005
May 5th, 2005
0

Re: Printer Object Question

The only real way to find out, is to have the VB IDE running the program when it crashes, so that the debugger can highlight the problem line. I'm guessing that you are compiling it to an EXE and then running it on the client machine. It may be a paperbin problem if the system doesn't have it on the client machine. You SHOULD be able to test for how many bins there are and if there is only one, just don't mess with it.... let me know what you come up with.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
May 6th, 2005
0

Re: Printer Object Question

What I ended up doing was created some test functions that attempts to change the bin property, as well as size and orientation. If an error occurs it flags that property as read only and disables the corresponding comboboxes, radio button, etc.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
javalsu is offline Offline
3 posts
since May 2005
May 6th, 2005
0

Re: Printer Object Question

Good Solution. I also appreciate you posting your solution to the site, so that others with similar problems have a chance to fix the same issue. Thanx.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
May 6th, 2005
0

Re: Printer Object Question

Anytime, I've learned a lot from this site, so I'm more than happy to give back.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
javalsu is offline Offline
3 posts
since May 2005

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Wait/Pause Application before next process.
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: What does CLng function do ?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC