I'm looking for a way to move a printjob from a paused printer to another printer. I have looked at the new name space System.printing in .Net framework 3.X.Is there a way to do it in .NET?An externa application creates a printjob.I catch the event "a printjob add" in the printqueue.I pause the printjob.Now I want to move the printjob to another printerIs there a way to do it in .NET?
How can I move or copy a printjob from a specific printqueue to another printqueue or resend to another printer. I already know how to moniter the printqueue and pause the job but I can not figure out how to move the job to Copy it to another printer och somehow capture the job and send it to another printer. Maybe there is a way to capture the stream and send it to another printer. I have tried and googled a lot but no success. as I mentioned I know how to monitor the printqueu and capture event when printjobs added to a printqueue but I do not know how to move/copy the printjob to another printqueue or somehow send it to another printer.
I am using How to call the EnumJobs function from a Visual Basic .NET application as a base for my solution. This article describes how to read properties of a print job.I want to change the username (owner) of a printjob in a printqueue.In the article a JOB_INFO_2 structure is created and loaded using pointers. You can then display the username etc. Now I want to change the username and load it back. So that the username of the printjob is really changed.But I don't really know how to do this. I understand the article and I know I have to use the SetJob function.
I need to be able to print large amounts of pages within one print job.The page count can be anything from one to thousands.Because of memory issues, I have to create multiple XML files broken up in to fifty pages each.I now need to be able to print these saved XML file to the same print job.Is there a way to print multiple XML files on the same print job?Also, is there a way to start printing the first XML file while the second etc. file is being generated (all within the same print job)?
I have a form that has a queue and i want to transfer that queue to another queue in another form. however when i try to use the elements in the second queue after transfer, I get the error message queue empty!below is my code
First Form Imports System.Collections.Generic Public Class Form1
I have an array that I'm basically treating like a queue (FIFO)I'm trying to decide the fastest way to implement this.Currently I'm just iterating through and shifting everything up an element and placing the new data @ 0. This was fine when I was dealing with 1000 element arrays, but now I'm moving up to 100k element arrays and it's stalling my code.It has been useful to have the data in array form because I'm using the array.sort method and a few other statistical modifications that use the element number (of the sorted list) to work.I'm not sure if VB lists are (like Java) pointer based, and if so I think that shifting pointers would execute faster than my current approach.My question is, if I did move to a list would it a) be faster, and b) is there a way to call a quick sort from the list class?If the execution time is the same for the array vs. list is there a better way to make a FIFO structure in VB?
how "peek" really operates or something but what I'm trying to do is have 2 separate audio files play one after the other over and over again.I was expecting that I would hear wav1 and wav2 alternate but I only hear wav1 on each cycle.Doesn't peek use the first data then push it to the back without discarding it?Therefore wav2 would be next in line to be played? [code]
Has anyone seen a .net email queue? I want to be able to specify the SMTP server to send via, report problems and retry emails if necessary or requested.
How can I clear the printer queue from VB? if I was doing it manually I would stop spooler service, empty the windowssystem32spoolprinters folder and restart the service
What is the difference between a queue(of t) and list(of t)? I've been working a lot with list(of t), but up until recently I haven't even heard of queue(of t). I know that they are both general list.
I am currently creating a FTPWebrequest to handle my uploading (the webrequest section of my function is below). At the moment my code loops through this webrequest section for each file - giving the file path of each file in the string "CompleteLocalPath". For each file it creates a webrequest and giving the required file path, uploading the file using a file stream, and then closing the stream. This works, but seems to take quite a long time. Can you recommend a more efficient way? Perhaps by using one webrequest but modifying the upload path?
I have a program that is using API's to send mouse events and keyboard events to another application that is running. I need to know how to tell if there are any messages left to process for that window after I have click on a button or moved to the next field. I need to know this so I don't send any more mouse or keyboard events until it has finishing processing everything in its message queue. An example is that I click out of the key field and the form has to go out and read a client record. This may take a second or two, so I need to wait until the form is ready for more input.
The below code (VB 2008) will check the print queue every milisecond for a job. It will then show the pagecount in a text box. It works great when im printing to a local printer, but As soon as I change my pc default printer to a network printer, I cant capture any data.
Say I have a rolling collection of values where I specify the size of the collection and any time a new value is added, any old values beyond this specified size are dropped off.Obviously (and I've tested this) the best type of collection to use for this behavior is a Queue:
myQueue.Enqueue(newValue) If myQueue.Count > specifiedSize Then myQueue.Dequeue()
I would like to develop a queue application in VB for a clinic, so that when a patient comes, he is entered in a queue as he waits. A doctor picks the next available patient in the queue and a message is posted in the screen for that patient to go to the doctors room. How do i do this?
How do I (i) sort the array of type FileInfo returned by the DirectoryInfo.GetFiles method by (file) CreationTime in descending order and (ii) once the array is sorted efficiently load it or convert into a Queue object (of type FileInfo) for subsequent processing. I thought of using the queue object as it handles things on a FIFO out basis and I'll be adding to the queue as new files arrive.
I have question about the firing of events in vb. Lets say if I have timer that fires every 10 seconds and then I also have eventhandler that is listening to some other event (like message arrived in queue and now event fires to process it). Then how does vb handles them if the program is currently processing Timer1 and message arrive event fires or vice versa? Does it complete the current processing and then jump to the next event or just switch in the middle to the new event and then finishes that and then resumes back to the first one?
I'm developing an application to monitor print queue and pause it to check some conditions, then resume or cancel print job. I can get total pages for printing document but can't get number of copies, how can i get this parameter.
Ex. If someone print 5 pages document for 2 copies, the total pages i got is 5 not 10 pages. (how can i get the real total pages)
I am working on fax component that manage some operation of XP fax service by using VB.Net and using FXSCOMEXLIB.DLL, I want to register events by fax queue status (job added, changed, removed, ... etc.), I am reading the article on this link: [URL] but the events not work (not called).
Im a newcomer for Sonic JSM queue. I need to send an xml message to a JSM queue. I can send a string message using following code.Dim msg As Sonic.Jms.TextMessage = SonicSendSession.createTextMessage()
I have a form that has a queue and I want to transfer the data of that queue to another queue in another form. however when i try to use the elements in the second queue after transfer, I get the error message queue empty!
Below is my code First form Imports System.Collections.Generic Public Class Form1 Dim wait As New Queue(Of String) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click [Code] .....
I expected the recieveQueue function to copy the queue passed to it into the waiting queue, then it allows me to use the waiting queue contents as I want. But when I try to use it, around this line I get the error, 'queue empty' < If waiting.Count > 0 And waiting.Peek <> "" Then >
I am currently going through Murachs Beginning vb.NET and have come across an problem with one of the exercises at the end of the chapter on collections. I basically have to update a simple Invoice application that was developed in an earlier chapter.It requires me to update the app such that everytime a new invoice object is created ( via pressing the new invoice button) this object is added to a queue. I am ok with this part.However I then have to edit the exit procedure so that the invoice objects are dequeued and displayed in a message box. This is where I am having my trouble. My code so far is shown below. This consists of the form.vb and the and the Invoice class.[code]I have also added a diagram of the format for the message displayed in the message box. I know I have to iterate through the queue but how can display the invoice customer name and invoice total?
I'm trying to Enqueue several processes to a queue of processes.When I do, each process is added, but only the last process name is added. The rest of the names are blank.Here's what I'm doing to test it:
VB.NET Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Ok say I have this Dim MyQueueOfClients as new Queue (Of TcpClient) I also have two threads.
In thread one a TcpListener waits for connections then adds a connected TcpClient to MyQueueOfClients.
MyQueueOfClients.Enqueue (TcpClient)In thread two I then check to see if there are any Clients in MyQueueOfClients. If so I then remove them from the MyQueueOfClients.
MyTcpClient = MyQueueOfClients.Dequeue I think the question Im asking is this thread safe?
Can I Enqueue and Dequeue at the same time from different threads?
Well it helps if you read everything. I have just read this as well
A Queue(Of T) can support multiple readers concurrently, as long as the collection is not modified. Even so, enumerating through a collection is intrinsically not a thread-safe procedure. To guarantee thread safety during enumeration, you can lock the collection during the entire enumeration. To allow the collection to be accessed by multiple threads for reading and writing, you must implement your own synchronization.