|
You posted this question just 31 minutes ago, and just 12 minutes ago someone gave you an answer. Its rude to keep posting the same question, particularly when you have not bothered looking at the answer given. Bob
Ashfield Consultants Ltd
|
|
|
|
|
How to print 1000 line in one page? How to change Paper height? Please help with tested Answer
Printer is POS or any
Paper Roll or Continues paper
thank
C. Kumarasinghe
|
|
|
|
|
If the printer is a POS device that uses a roll of paper, I suspect you can just open the printer connection and just keep
printing lines until you have finished the output and then just close the printer device.
It maybe a case of referring directly to the developer info for the device available from the OEM.
|
|
|
|
|
If you want to print with a windows driver see the folowing link:
http://support.microsoft.com/kb/322090
A POS printer is not a graphical printer.
You have to send the data raw.modified on Thursday, February 18, 2010 1:24 PM
|
|
|
|
|
Hi,
I have a user control developed using C#. The user control class implements two interfaces.
How can I create an instance of C# user control in VB6.0 and call functions from the two interfaces.
It is possible for me to create the control and show it on the form using Controls.Add but then I am not able to typecast the variable for the control to an interface object.
I think I am missing something but don't know what exactly.
I am new to VB and project requirement asks me to do this using VB6.0
Any help or guidance on this front is appreciated.
|
|
|
|
|
You can use the .NET stuff from VB6 using the Interop Toolkit[^] from Microsoft. You can easily add both UserControls and Forms from the .NET environment to the VB6 environment.
There's also a CodeProject article[^] available with examples in C# I are Troll
|
|
|
|
|
Thanks for the link. I went through the article and am not very clear about whether existing controls from C# can be hosted on the VB Form. I have a few questions regarding the same.
1. Will I have to write the entire C# .NET code (for existing user controls) or can the exising controls be ported using the toolkit directly and used from VB6.0
2. Will it be possible to create instances of .NET controls dyanamically?
3. Will I be able to handle events from the C# controls? [Got the answer to this. Yes]
4. What would be the other broad issues that one can face while using this toolkit and regarding COM Interop.
5. Any application deployment issue that one can face and dependency of the toolkit being installed on the deployment site.
|
|
|
|
|
Q2A wrote: 1. Will I have to write the entire C# .NET code (for existing user controls) or can the exising controls be ported using the toolkit directly and used from VB6.0
There's some extra code required to communicate between the C# UserControl and VB6. You can use the templates that come with the toolkit to create a new UserControl, that way all the required code will be added automatically. You can also copy these routines to an already existing UserControl.
Q2A wrote: 2. Will it be possible to create instances of .NET controls dyanamically?
Yup
Q2A wrote: 3. Will I be able to handle events from the C# controls? [Got the answer to this. Yes]
4. What would be the other broad issues that one can face while using this toolkit and regarding COM Interop.
That's possible, but it's a bit slower than a .NET event.
Q2A wrote: 5. Any application deployment issue that one can face and dependency of the toolkit being installed on the deployment site.
You should be fine as long as the toolkit is installed I are Troll
|
|
|
|
|
Thank you for your response. This will help me in the implementation.
|
|
|
|
|
You're welcome
|
|
|
|
|
One more question.
When I dynamically created the control from C# in VB6.0 using Controls.Add I was not able to see the changed text in the text boxes. The text should have been modified in the text boxes and I am able to get the new text every 2 seconds in another file. Is this issue because of COM interop and will it be resolved using the toolkit. Any ideas on what I may be missing?
|
|
|
|
|
Q2A wrote: Add I was not able to see the changed text in the text boxes. The text should have been modified in the text boxes and I am able to get the new text every 2 seconds in another file.
I don't completely understand what you're trying to do, so I'll try to reformulate the question first.
You created a C# control, and loaded it in VB6. The C# control has some textboxes, and they should contain the data from a file. And if you open the C# control from a VB6-application, the textboxes are empty?
Where are these textfiles stored?I are Troll
|
|
|
|
|
Hello,
Is there an API that i can use to remove cached username(s) and password(s) that are used to connect to a network share
When I'm removing a network share from Windows the username(s) and password(s) are cached.
Below is the function i use to remove the share.
Private Declare Function WNetCancelConnection2 Lib "mpr.dll" Alias "WNetCancelConnection2A" _
(ByVal lpName As String, ByVal dwFlags As Integer, ByVal fForce As Integer) As Integer
Thanks in advance.modified on Thursday, February 18, 2010 3:46 PM
|
|
|
|
|
andre de jong wrote: When I'm removing a network share from Windows the username(s) and password(s) are cached.
No, they're not. Windows does not cache that information. Perhaps you're talking about a users persisted drive mapping?
|
|
|
|
|
When I,m mapping a network Share with the WNetAddConnection2 function and then remove the share again
I can add the share with the same function again but without providing a username and password.
Even after a reboot.
Private Declare Function WNetAddConnection2 Lib "mpr.dll" Alias "WNetAddConnection2A" _
(ByRef lpNetResource As NETRESOURCE, ByVal lpPassword As String, _
ByVal lpUserName As String, ByVal dwFlags As Integer) As Integer
dwFlags = CONNECT_TEMPORARY
''' The network resource connection should not be remembered.
''' If this flag is set, the operating system will not attempt to restore the connection
''' when the user logs on again.
Is there a way to remove the username and password when the mapped network share is removed?
Or am I using the wrong "dwFlags"
|
|
|
|
|
andre de jong wrote: I can add the share with the same function again but without providing a username and password.
Even after a reboot.
andre de jong wrote: Is there a way to remove the username and password when the mapped network share is removed?
There is no cache of the username and password. It's that simple. You're trying to remove something that doesn't exist.
|
|
|
|
|
Thanks Dave for your help.
The samba server was the one that cached the cridentials.
|
|
|
|
|
Thanks Dave for your help.
It was the Samba server that cached the cridentials.
After a restart of the samba server Windows asked for the cridentials.
|
|
|
|
|
Hi,
I make a code for open ms excel through vb.net exe. I am using excel 2003,it is working fine in my local PC, but not work in anothor PC because they have a ms excel 2000.How can i solve this problem any one plz help me.
|
|
|
|
|
use this in the connection string for excel 2000:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=FileLocation.xls;Extended Properties="Excel 8.0;HDR=YES;"
|
|
|
|
|
Is it possible to display unicode text in buttons and menu of vb forms. Am using vb 6.0. and I was able to display some Chinese text in text box and label by changing font. But for buttons, cannot change the font to chinese. Thanks in Advance
Nanda
|
|
|
|
|
VB6 has very little support for unicode. You'd best investigate VB.NET, or use a third-party library[^].I are Troll
|
|
|
|
|
hi
i m using notify icon for a windows application
i have a lengthy function in which i display msg using the tooltip of
notify icon.
i have 10 msgs to be displayed using notifyicon
when i run it is showing the last 10th msg only
my reqirement is it should show 10 msgs with a time gap one after another
|
|
|
|
|
Can you put your that part of source Code , if possible. Best Regards,
SOFTDEV
If you have knowledge, let others light their candles at it
|
|
|
|
|
hi
here is the code
NotifyIcn.ShowBalloonTip(1000, TipTitle, TipText, ToolTipIcon.Info)
IntialiseH()
NotifyIcn.ShowBalloonTip(1000, TipTitle, TipText, ToolTipIcon.Info)
VerticalForces_a()
NotifyIcn.ShowBalloonTip(1000, TipTitle, TipText, ToolTipIcon.Info)
HorizontalForces_b()
NotifyIcn.ShowBalloonTip(1000, TipTitle, TipText, ToolTipIcon.Info)
Reactions_c()
NotifyIcn.ShowBalloonTip(1000, TipTitle, TipText, ToolTipIcon.Info)
InclinedWallsPressure_d_e()
NotifyIcn.ShowBalloonTip(1000, TipTitle, TipText, ToolTipIcon.Info)
LoadOnSloppedWalls_f()
NotifyIcn.ShowBalloonTip(1000, TipTitle, TipText, ToolTipIcon.Info)
DesignOfInclinedPlate_g()
NotifyIcn.ShowBalloonTip(1000, TipTitle, TipText, ToolTipIcon.Info)
i can see the last msg clearly
|
|
|
|