|
Cute, but you're not going to get at the hardware directly on an NT Kernel machine. Well, not without writing your own Ring 0 .DLL.
The other code that "worked under VB6," will work, but it will also go through the spooler too.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your answer, Dave.
I wonder how do check writing programs work?
Anyway, thanks for your response.
--max
XamIam
max@maxpcsupport.com
|
|
|
|
|
They don't care about the spooler. A paper form is a paper form, even if it's 8.5" x 11" and blank, it doesn't matter. I have no idea why you're worried about the spooler handling the print job. That's what it's there for! You could spool up 1,000 checks to print, and while your application is off doing something else, the spooler is cranking out checks. So what if the codes you have to send to the printer make it reverse the paper so it aligns to the top of the page, it's still part of the print job! Besides, just about all dot matrix printers have an automatic tear-off function built into the anyway. Check the documentation on the printer to see what you have to do to get it to work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I don't know, but it just seemed to me that for an app that will be run on one computer only with a printer that will have a printed 3 part form that will only be used by this one app that it shouldn't be that difficult to have the program have a direct connect to the printer. But I guess not. It looks like it will be print dialog and the spooler.
It makes all the sense in the world to have the spooler managing the output from several tasks.
Anyway thanks for your comments and generous help.
Later,
--max
XamIam
max@maxpcsupport.com
|
|
|
|
|
It's far more difficult to go around the spooler that it is to just use it. This is the NT Kernel world, where ALL hardware is abstracted. If you need to get to the hardware, you need to go through a device driver to get at it...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Not sure if it still works... and it might not be the best programming practice, so make sure to obfuscate your code well enough once compiled
From the GW-BASIC days (I know it worked in VB6!)
<br />
OPEN "lpt1:" FOR OUTPUT AS #1<br />
PRINT #1, "Hello World"<br />
CLOSE #1<br />
I believe that was the syntax. Don't tell anyone I told you to do this
|
|
|
|
|
Thanks, I'll give a try. Do you think it will work with XP? Now where did I put the VB6 stuff? later, --max
XamIam
max@maxpcsupport.com
|
|
|
|
|
I would assume it will. Not sure if .NET will allow you to run such legacy code, though. It's worth a shot anyway!
|
|
|
|
|
IM trying to create an irregular shaped button using GraphicsPath. Here is my code, the editor is squiggly underlining "Fillmode" saying it is ambiguous, what does that mean?????????
Imports System.Drawing.Drawing2D<br />
Imports System.Drawing.Drawing2D.GraphicsPath<br />
Imports System.Drawing.Drawing2D.GraphicsContainer<br />
<br />
<br />
<br />
Dim pts() As Point = { _<br />
New Point(5, 15), _<br />
New Point(35, 15), _<br />
New Point(35, 5), _<br />
New Point(55, 25), _<br />
New Point(35, 45), _<br />
New Point(35, 35), _<br />
New Point(5, 35) _<br />
}<br />
' Make the GraphicsPath.<br />
Dim polygon_path As New GraphicsPath(FillMode.Winding)<br />
polygon_path.AddPolygon(pts)<br />
'<br />
' Convert the GraphicsPath into a Region.<br />
Dim polygon_region = New Region(polygon_path)<br />
<br />
' Constrain the button to the region.<br />
Button1.Region = polygon_region<br />
<br />
' Make the button fit the region.<br />
Button1.SetBounds(Button1.Location.X, _<br />
Button1.Location.Y, pts(3).X + 5, pts(4).Y + 5)<br />
<br />
End Sub
|
|
|
|
|
Two things.
First, you don't need the two bottom "Includes" at the top of your code. You only need Imports System.Drawing.Drawing2D .
Second, FillMode is considered ambiguous because you have at least two namespaces and/or classes that are defining a FillMode enumeration and the compiler can't tell which one your trying to use. (Do you have a reference to DirectX you haven't shown us? DirectX also defines a FillMode enumeration!) The easy way around this problem is to explicitly specifiy which FillMode you want to use. In your case, the one defined in Drawing2D:
Imports System.Drawing.Drawing2D
Dim pts() As Point = { _
New Point(5, 15), _
New Point(35, 15), _
New Point(35, 5), _
New Point(55, 25), _
New Point(35, 45), _
New Point(35, 35), _
New Point(5, 35) _
}
' Make the GraphicsPath.
Dim polygon_path As New GraphicsPath(Drawing2D.FillMode.Winding)
polygon_path.AddPolygon(pts)
' Convert the GraphicsPath into a Region.
Dim polygon_region = New Region(polygon_path)
' Constrain the button to the region.
Button1.Region = polygon_region
' Make the button fit the region.
Button1.SetBounds(Button1.Location.X, _
Button1.Location.Y, pts(3).X + 5, pts(4).Y + 5)
End Sub
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thank you very much sir, i will sing at your wedding.
|
|
|
|
|
No thanks. We already have a DJ lined up.
Mike Staff Productions[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how to add a checkbox on datagrid by coding so that on checking the check box the particular row get selected and the data in that row can be retrieved from SQL.Please give me the code
Rajan
|
|
|
|
|
Am I understanding your question right? You want a datagrid with nothing in it but checkboxes and when a checkbox is checked then you want to populate only that row?
That's kind of weird. I don't know how you would populate just one row. Can you elaborate more?
|
|
|
|
|
I want to concatenate the following into a string:
2005, /, and ID. ID is an integer which will be of value 1, 2 etc.
I want it to look like this:
2005/001
2005/002
etc.
Anyone any ideas?
|
|
|
|
|
Hello,
You can use following code for each ID....
VB.net
Private str As String = "2005/" + ID.ToString("000")
C#
string str = "2005/" + ID.ToString("000");
HTH. cheers.
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
You can also use CStr(ID)
CompleteID = strYear & "/" & CStr(ID)
Lost in the vast sea of .NET
<a href="http://www.komputing.com/Pricelist.html">Visit my website at www.komputing.com</a>
|
|
|
|
|
Hi
I am trying to create a command in a data environment that would be an SQL with input parameter/s.
I want to give the parameter a value entered by the user in a form.
How do we give the parameter this value?
- Lostris
|
|
|
|
|
|
Hi, anyone know how to set a particular cell text color in datagrid for .Net Compact Framework?
Thanks in advance!
|
|
|
|
|
|
I have a project(can be compiled to .dll) of VB.6. I want to use the "strong names" to set: version, ProductName, Copyright...on it as in Assembly file in DotNet, but I do not know how to do it. Pls help me!
I look foward from your idea.
If you have any comments, pls send me soon my Email as below:
Hungnv@vidagis.com or Hungnv43t@yahoo.com
Thank!
Best Regards.
Hung Nguyen Viet
|
|
|
|
|
The VB6 IDE provides an interface to assign Version, ProductName, CopyRight etc. I don't think you can install non NET assemblies in the GAC. If you need strong naming and installation to the GAC, the only viable solution I know of is to re-write the dll in NET.
Robert
|
|
|
|
|
What your referring to is not "strong naming". Strong names are only supported by .NET Framework assemblies, and VB6 doesn't qualify. What your talking about are just properties and can be set in the Project Properties dialog in the VB6 IDE.
Also, you can't install a non-.NET assembly in the GAC and expect it to work like a .NET assembly.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
So if I have a dll file that was written on Visual Basic 6.0 environment, how to use it on strong names (mabe use some .NET's tool) ?
Best Regard,
Hung Nguyen Viet.
|
|
|
|