|
edmonson wrote: Is possible to change a job in default printer queue to another printer queue
No. Once the job is created, it cannot be changed. You'd have to kill the job and have the application that generated it send it again using the new printer (good luck with that part, you'll need it!)
|
|
|
|
|
|
|
This sounds like a horrifying user interface design. but, whatever, it's your customer...
Ask this in the ASP.NET forum. What you're asking really has nothing to do with the language you're writing this in, but the web technology you're using.
|
|
|
|
|
Dear all,
I want to know about the Local Language Settings in VB 6 application.
I have one application in VB6 which i need to interpret with My Local Language in to my application Front Screen. Can anybody having the info please let me also know.
Thanks in advance.
Jay
|
|
|
|
|
|
It's called "localization". All you have to do is Google for "vb6 localization" and you'll come up with an ever-dwindling list of articles to read.
VB6 is dead and has been for quite some time now. I strongly suggest downloading VB.NET 2008 Express Edition, since it's free.
|
|
|
|
|
Good Time for U all,
I am working on an application, I want to read data from excel based on conditions like for example "select somecolumns from [excelsheet$] where acolumnname="somevalue". Is that possible to do so. Can anyone help me in do so or give me other clues for my purpose.
With regards,
|
|
|
|
|
|
Hi,
i have below short code in C#
public delegate void MsgEventHandler(object sender, ChatEventArgs e);
public static event MsgEventHandler ChatEvent;
private void Message(ChatEventArgs e)
{
MsgEventHandler temp = ChatEvent;
if (temp != null)
{
foreach (MsgEventHandler handler in temp.GetInvocationList())
{
handler.BeginInvoke(this, e, new AsyncCallback(EndAsync), null);
}
}
}
and when we translate in vb.NET
Public Delegate Sub MsgEventHandler(ByVal sender As Object, ByVal e As ChatEventArgs)
Public Shared Event ChatEvent As MsgEventHandler
Private Sub EmergencyMessage(ByVal e As ChatEventArgs)
Dim temp As MsgEventHandler = ChatEvent
If temp <> Nothing Then
For Each handler As MsgEventHandler In temp.GetInvocationList()
handler.BeginInvoke(Me, e, New AsyncCallback(AddressOf EndAsync), Nothing)
Next
End If
End Sub
but i have error, Saying ChatEvent is an event and can not be called directly.Use a 'Raise Event' statement to raise an event.
can u help me to figure it out from c# to vb.net?
thank you
regards
Sri
|
|
|
|
|
I think if you google Raise Event, you'll see the correct syntax.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Two ways to get the correct syntax.
1 - Read the documentation or search with the error message.
2 - Compile your C# application, open the assembly using reflector and change language to VB.NET.
|
|
|
|
|
Thanks Navneeth,
Can you please expline how to do this. I am new to vb.net. Please.
|
|
|
|
|
Hi whats the equivalent to below code in vb.net
string culture = ((((Range)_ws.Cells[2, (int)ExcelColumnIndexEnum.CultureColumn]).Value2 != null) ?
((Range)_ws.Cells[2, (int)ExcelColumnIndexEnum.CultureColumn]).Value2.ToString().Trim() : string.Empty);
I tried to convert using a tool available in developerfusion that gives me
Dim culture As String = (If((DirectCast(_ws.Cells(2, CInt(ExcelColumnIndexEnum.CultureColumn)), Range).Value2 IsNot Nothing), DirectCast(_ws.Cells(2, CInt(ExcelColumnIndexEnum.CultureColumn)), Range).Value2.ToString().Trim(), String.Empty))
but when i paste in vb editor it shows error.
ExcelColumnIndexEnum is an enum and codes are as.
Imports System
Imports System.Collections.Generic
Imports System.Text
Public Enum ExcelColumnIndexEnum As Integer
CultureColumn = 1
OtherColumn=2
...
End Enum
please help
|
|
|
|
|
This is horrible code, why would you want to convert it ? What error does it show ? I think the If should be Iif, then I think it might work.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I think the error is he is posting C# code into a Visual Basic .Net project...
and yeah, that should be IIF as well.
|
|
|
|
|
Hi,
I'm developing a cybercafe app. and i need to detect printing process from other aplications(Word,Acrobat,...)
I need to send the job to any printer and select if it may be in color or BW.
User doesn't use printer properties directly from its application(word,excel,...). He clicks on printing button directly.
My trouble is catch this action to force him to show the destination printer and job color mode.
I've been working with system.printing namespace to control the spooler:
- When a new job arrives, I stop it. I obtain information about pages, printer,... but if I change any parameters like coloroutput property, it has no efect on the job when I resume it to finish the printing process (restart the job fails too)
Any Idea ?
Regards
|
|
|
|
|
Once you start a print job, it cannot be changed. The spooling data is specifically for the target printer and is written with the parameters chosen in mind. Once the job starts, it's too late to make any changes. The only thing you can do is pause or cancel the job.
|
|
|
|
|
After reading Dave's reply, it has occurred to me that you might be able to create a new print job using those parts from the original that you want to retain and the new ones that you want to use then deleting the original.
I have no idea how you would do that but if it were me, that is what I would explore.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
You could create a Virtual Printer (like those that create PDF file), and set it as the default printer. The virtual printer could then decide how to handle the print job.
I am intending to write a similar Virtual Printer, but for processing emails. I cannot tell you how to start, because I am that stage myself.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Hello,
I have binded a textbox to a field inside a table in the dataset in design time. Does it mean that whenever a validation or a property change occurs on this textbox, The field in the table also gets updated? How to add a new row inside a table and also update the changes in database. If you give me a brief sample code, I would really appreciate it.
I am asking it to you because It has been quite long time I quit working on development and I forgot the methods.
Thanks.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
JUNEYT wrote: I have binded a textbox to a field inside a table in the dataset in design time. Does it mean that whenever a validation or a property change occurs on this textbox, The field in the table also gets updated?
If I understand this question correctly, yes, it does.
JUNEYT wrote: How to add a new row inside a table and also update the changes in database.
How do you have your datasource setup? What objects are you using? What does the code look like that sets them up and does the binding?
|
|
|
|
|
Hi,
I am using scriptlet control in my project. When the project is in run mode it works fine. After deploying the project scriptlet control is not working.
Pls help me in this regard
|
|
|
|
|
It's impossible to help you since "it doesn't work" does not supply sufficient information to tell you anything useful. What is the expected behavior? How are you testing this? What isn't happening? What IS happening? ...
|
|
|
|
|
I created one html file that file should view through scriptlet control. Before deploying the project it works fine
After deploying the project only the scriptlet is not working.
I think that the corresponding dll is not there in my deployed application. Here i am sendig my code
Private Sub btnhome_Click()
Unload Me
frmMain.Show
End Sub
Private Sub Form_Load()
Scriptlet1.Visible = False
MMControl1.fileName = App.path & "\Time Line1.mpg"
MMControl1.hWndDisplay = Picture1.hwnd
MMControl1.Command = "Open"
End Sub
Private Sub Form_Unload(Cancel As Integer)
MMControl1.Command = "Stop"
MMControl1.Command = "Close"
End Sub
Private Sub Home_Click()
Unload Me
frmMain.Show
End Sub
Private Sub MMControl1_StatusUpdate()
Dim strMode As String
strMode = ""
Select Case MMControl1.Mode
Case mciModeReady
strMode = "Ready."
Case mciModeStop
strMode = "Stopped."
Scriptlet1.Visible = False
Case mciModeSeek
strMode = "Seeking."
Case mciModePlay
strMode = "Playing."
Scriptlet1.Visible = True
'Scriptlet1.url = "file://" & App.path & "\fish1.html"
Case mciModeRecord
strMode = "Recording."
Case mciModePause
strMode = "Paused."
End Select
Label1.Caption = strMode
End Sub
Private Sub Scriptlet1_onscriptletevent(ByVal name As String, ByVal eventData As Variant)
End Sub
|
|
|
|