Hi,
I am using toshiba tec sx8 thermal printer for printing our labels,
in My old Delphi application I was using such code;
ShellExecute(0,'open',Data.cmdbuffer, PChar('/c copy
'+ExtractFilePath(Application.ExeName)+'PRINTER\ZZ 3.PRN
'+dmoMain.PRINTER+':'), nil, SW_HIDE);
frmStockCardReport.QuickRep1.Preview;
ShellExecute(0,'open',Data.cmdbuffer, PChar('/c copy
'+ExtractFilePath(Application.ExeName)+'PRINTER\ZZ 2.PRN
'+dmoMain.PRINTER+':'), nil, SW_HIDE);
After writing new program on .net, How can I write equivalent of above codes
?
Thanks 2 3477
On Mon, 12 May 2008 14:38:01 +0300, "Diego Armando Maradona"
<So*****@Somewhere.Co.Ukwrote:
>Hi,
I am using toshiba tec sx8 thermal printer for printing our labels,
in My old Delphi application I was using such code;
ShellExecute(0,'open',Data.cmdbuffer, PChar('/c copy '+ExtractFilePath(Application.ExeName)+'PRINTER\Z Z3.PRN '+dmoMain.PRINTER+':'), nil, SW_HIDE);
frmStockCardReport.QuickRep1.Preview;
ShellExecute(0,'open',Data.cmdbuffer, PChar('/c copy '+ExtractFilePath(Application.ExeName)+'PRINTER\Z Z2.PRN '+dmoMain.PRINTER+':'), nil, SW_HIDE);
After writing new program on .net, How can I write equivalent of above codes
Check out the System.Diagnostics.Process class, e.g. its static
public static Process Start(string fileName, string arguments)
overload.
You may want to explore other techniques for printing than sending
files to the printer port via "cmd copy /c filename lpt1:" (or
similar) though.
Regards,
Gilles [MVP].
(Please reply to the group, not via email.
Find my MVP profile with past articles / downloads here: http://www.gilleskohl.de/mvpprofile.htm)
On May 12, 7:38*am, "Diego Armando Maradona" <Some...@Somewhere.Co.Uk>
wrote:
Hi,
I am using toshiba tec sx8 thermal printer for printing our labels,
in My old Delphi application I was using such code;
* * ShellExecute(0,'open',Data.cmdbuffer, PChar('/c copy
'+ExtractFilePath(Application.ExeName)+'PRINTER\ZZ 3.PRN
'+dmoMain.PRINTER+':'), nil, SW_HIDE);
* * frmStockCardReport.QuickRep1.Preview;
* * ShellExecute(0,'open',Data.cmdbuffer, PChar('/c copy
'+ExtractFilePath(Application.ExeName)+'PRINTER\ZZ 2.PRN
'+dmoMain.PRINTER+':'), nil, SW_HIDE);
After writing new program on .net, How can I write equivalent of above codes
?
Thanks
There is a Process class you can use.
Additiobnally try to print directly from C#, There is a serial port
class that I think you can use for that. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Marcel Sammut |
last post by:
Greetings,
I am converting a VB6 application to .net and am having troubles trying to
print a document directley to the printer. My VB6 app used the API
ShellExecute method to accomplish this,...
|
by: Paul Speranza |
last post by:
Does anyone know what the C# equivalent of the shell command is? I want to
play an mp3 file using the users default player.
Regards,
Paul Speranza
|
by: Wiktor Zychla |
last post by:
I have a problem I cannot solve.
My application hosts IE activex control. I follow the standard procedure: I
just aximp shdocvw.dll. Note that this gives you two files: axshdocvw.dll
and...
|
by: Hai Nguyen |
last post by:
I'm learning C sharp and do not like vb much. I'm creatiing a wepage using
panel to test myself. I tried to use these code below, which is written in
VB, and to transform them to c sharp but I got...
|
by: the_openFace |
last post by:
I'm trying to display the shell's property page for various files and I'm
using this code:
class Win32Shell {
// ... other stuff here
public static extern Int32 ShellExecute(
Int32 hwnd,...
|
by: the openBack |
last post by:
I'm trying to display the shell's property page for various files and I'm
using this code:
class Win32Shell {
// ... other stuff here
public static extern Int32 ShellExecute(
Int32 hwnd,...
|
by: David |
last post by:
We have an mfc application in which we use ShellExecute
to launch the browser with an initial web site.
{ShellExecute(
NULL, "open", "http://www.SomeWebSite.com", NULL, NULL,
SW_SHOWNORMAL ) } ...
|
by: =?Utf-8?B?VG9tYXM=?= |
last post by:
Hello,
Somebody knows which is the equivalent one in C++/CLI ?
HINSTANCE ShellExecute(HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
LPCTSTR lpParameters,
LPCTSTR lpDirectory,
INT nShowCmd
|
by: John Smith |
last post by:
Hi,
I have an access database form with an image. I'm trying to create an
onclick event on the image so that when a user clicks on the image it opens
that file with the default viewer the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |