|
can u post some of your code? or explanation of what the program is doing?
u using any ADO?
if so, go here[^] and click the 2nd item, MDAC, and download an upgrade.
------------------------
Jordan.
III
|
|
|
|
|
ADO??? I'm not using that i think... I would give you the source-code, just give me your e-mail...
<<<eRiK>>>
|
|
|
|
|
nadroj_@hotmail.com
u dont have to send the whole thing. im saying just post afew parts here, like the initialization of it, and afew other areas of implementation.
did u check that link and upgrade?
------------------------
Jordan.
III
|
|
|
|
|
I have found this code to set printer properties using Windows API:
Controlling the Printer from Word VBA[^]
which is basically a further development of Microsoft's article:
HOWTO: Set Duplex Printing for Word Automation[^]
I want to ask whether any of you guys have done or have any ideas on how to set printer stapling using the code above.
I am thinking of creating a new constant for the stapling, e.g.
Public Const DM_DUPLEX = &H1000&
Public Const DM_STAPLE = &H2000& '(added line)
and add a new variable in the DEVMODE Type:
Public Type DEVMODE
dmStaple as integer
End Type
then set the dmStaple and set it to the printer using the API, but somehow I don't think it is going to work at all.
Question:
1. Can I set printer stapling using the API mentioned in the sites above?
2. If I can, can I do it like the above? If not, can you please point me to the right direction (e.g. giving a link to SDK site / MSDN article, code snippets, etc.)
Thanks.
Edbert P.
Sydney, Australia.
|
|
|
|
|
First you need to find out if the printer supports stapling at all by calling the Api GetDeviceCaps with the index DC_STAPLE.
Public Enum PrintDeviceCapabilitiesIndexes
' ##ENUMERATION_MEMBER_DESCRIPTION DC_FIELDS Which fields of the device mode are used
DC_FIELDS = 1
' ##ENUMERATION_MEMBER_DESCRIPTION DC_PAPERS Which Printer Paper Sizes the device supports
DC_PAPERS = 2
' ##ENUMERATION_MEMBER_DESCRIPTION DC_PAPERSIZE The dimensions of the paper in 10ths of a millimeter
DC_PAPERSIZE = 3
' ##ENUMERATION_MEMBER_DESCRIPTION DC_MINEXTENT The minimum paper width and height the printer can support
DC_MINEXTENT = 4
' ##ENUMERATION_MEMBER_DESCRIPTION DC_MAXEXTENT The maximum paper width and height the printer can support
DC_MAXEXTENT = 5
' ##ENUMERATION_MEMBER_DESCRIPTION DC_BINS The standard paper bins supported by this printer
DC_BINS = 6
' ##ENUMERATION_MEMBER_DESCRIPTION DC_DUPLEX Whether the printer supports duplex printing
DC_DUPLEX = 7
DC_SIZE = 8
DC_EXTRA = 9
DC_VERSION = 10
DC_DRIVER = 11
DC_BINNAMES = 12
DC_ENUMRESOLUTIONS = 13
DC_FILEDEPENDENCIES = 14
DC_TRUETYPE = 15
DC_PAPERNAMES = 16
DC_ORIENTATION = 17
DC_COPIES = 18
DC_BINADJUST = 19
DC_EMF_COMPLIANT = 20
DC_DATATYPE_PRODUCED = 21
DC_COLLATE = 22
DC_MANUFACTURER = 23
DC_MODEL = 24
DC_PERSONALITY = 25
DC_PRINTRATE = 26
DC_PRINTRATEUNIT = 27
DC_PRINTERMEM = 28
DC_MEDIAREADY = 29
DC_STAPLE = 30
DC_PRINTRATEPPM = 31
DC_COLORDEVICE = 32
DC_NUP = 33
End Enum
Private Declare Function DeviceCapabilities Lib "winspool.drv" Alias "DeviceCapabilitiesA" (ByVal DeviceName As String, ByVal Portname As String, ByVal Index As PrintDeviceCapabilitiesIndexes, ByVal lpBuf As Long, pDevMode As Long) As Long
...
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
...
However the structure DEVMODE is defined by the windows header file and you cannot change it....and unfortunately it does not have a dmStaple member.
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Thanks for that, Duncan.
Can you please give me a suggestion on what I should investigate to set the printer stapling? (API, PCL Printer Commands, PJL, etc.)
Edbert P.
Sydney, Australia.
|
|
|
|
|
I want to delete the character that is in the cursor position(the text in Textbox control in VB6). help me please.
|
|
|
|
|
more detail plz
------------------------
Jordan.
III
|
|
|
|
|
I want to delete the character that is in the Cursor position!(Current position of Blink cursor in a textbox)
|
|
|
|
|
Text1.Text = Left$(Text1, Text1.SelStart) + Right$(Text1, Len(Text1) - Text1.SelStart - 1)
|
|
|
|
|
Hello...
I am using a tab control in my project. How can I display a webpage when I choose one of the tabs?
Thank you...
|
|
|
|
|
First, add a reference to Microsoft's WEb Browser control to your project:
1. Bring up your Toolbox window and click on the My User Controls tab
2. Right-click in the Toolbox window and click Add/Remove Items...
3. Click on the COM Component tab.
4. Scroll down to Microsoft Web Browser and click the checkbox next to it, then OK.
At this point, you should see a little world icon in your Toolbox labeled Microsoft Web Browser.
5. Click on your tab tab in the designer to bring up the page you want this on.
6. Drag a Web Browser Control from your Toolbox onto the tab page.
Now all you have to do is set the properties of the borwser to arrange it the way you want, like if you want an address bar showing, status bar, menu bar, ... Than when that tab is clicked, your event handler should do something like this:
AxWebBrowser1.Navigate("http://www.google.com")
or some other web page, perhaps stored locally:
AxWebBrowser1.Navigate("C:\testdir\filename.html")
RageInTheMachine9532
|
|
|
|
|
Dear RageInTheMachine9532,
Your advice really helped us. A very big thank you to you.....
len_ems
|
|
|
|
|
No problem. Thank you.
RageInTheMachine9532
|
|
|
|
|
Can anyone tell me how to add a PageBreak in Excel using VB.NET?
boy is the Excel Object model a pain!!!
|
|
|
|
|
I'm looking for a solution to handle all unhandled errors within a VB.NET application. I would like it to log information such as, error number, line number, call stack, variables and values, etc.. Basically as much information as possible.
If someone knows where I can get information on the best way to do this, has some sample code or knows of an available product (commercial or freeware) I would appreciate knowing about it.
Thanks
|
|
|
|
|
Microsoft create some stuff called the "Application Blocks for .NET" a while back. One of those was called "Exception Management".
They're complex, but they're free.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
I have a simple class which does all this for you.
When your program initialises, you do this:
If (Not System.Diagnostics.Debugger.IsAttached) Then<br />
ExceptionManager.Instance().AppName = "YourAppNameHere"<br />
End If
The class then pops up a dialog when an exception occurs, showing the stack-trace, error message, etc, and on closing that dialog, a new instance of the program can optionally be started.
You don't have to have the Debugger.IsAttached test, but it means that the exception handler won't pop up if you are debugging in the IDE.
Let me know if it sounds like what you need.
|
|
|
|
|
Sounds simple enough. Perhaps you might direct this to the attention of the person who posted the original query; by replying to my reply, the message went to me instead of him.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
It sounds exactly like what I need. Would it be possible for me to get a copy of it.
If so, I'd really appreciate it.
Thanks,
Wayne
|
|
|
|
|
Sorry, I know this could be stupid question but I'm not VB developer. I want to know is it possible to use CryptoAPI in VB.6 or not. All the samples in MSDN are in C , so just tell me yes or no and if you know any sample please let me know. Thanks.
Mazy
You're face to face,
With the man who sold the world - David Bowie
|
|
|
|
|
|
Yah , it helps. Thanks.
Mazy
You're face to face,
With the man who sold the world - David Bowie
|
|
|
|
|
Hallo,
My current program consisted out of 80 forms, and then about 15 classes with shared functions. Recently I put each of these classes in different dll's, so that I only have to update / compile single files.
To control versioning i have to make these class's strong named assemblies, but to create these there is more errors, even a "MsgBox" get the error Name 'MsgBox' is not declared, Importing System.Windows.Forms.MessengeBox stop this problem but just created other problemes. So going for the Storng Named Assembly in the GAC will not do the trick.
My question now is, how can I control the dll's, my next idea was to when the program start to check a dir on the network and compare this system dll's with those stored on the network, if the network version is newer then replace the local system file. Problem still stands I can't update the dll's while the program is running.
The second thing, automatic updating the version number each time the assembly is rebuild, VB.Net doesn't do it every time the assembly is rebuild, can one set this somewhere.
Thanks
Johan
|
|
|
|