ActiveX and .NET problem

Anything related to Barcode ActiveX programming

ActiveX and .NET problem

Postby kong(Legacy member) on Thu Feb 21, 2008 6:50 am

Hi,

Just trying out the demo version in .NET and everytime I run my app I keep getting an error message saying that the ActiveX Control cannot be created.

I have checked the object is registered to the machine, and I have added the dll to my project. I can also navigate all the options by typing 'encoder.'.

Any ideas?

(Code below)



Imports System.data

Imports PDF417FontEncoderAxLib

Partial Class _Default

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Dim Encoder As New PDF417FontEncoderAxLib.PDFFontEncoder

Dim Output As String

Dim lsMessage As String

lsMessage = "This is a test"

Output = ""

Try

Output = Encoder.Encode(lsMessage)

Catch ex As Exception

labBarCode.Text = ex.Message

End Try



If Output <> "" Then

labBarCode.Text = Output

End If

End Sub

End Class




Thanks.

Scot.
kong(Legacy member)
 

Re: ActiveX and .NET problem

Postby kong(Legacy member) on Thu Feb 21, 2008 8:33 am

Quick update:

Using your test example in the PDF document I can re-create this in a webpage and this works fine

Dim encoder

Dim output

Dim message

message = "hi"

set encoder = CreateObject("Morovia.PDF417FontEncoder")

output = encoder.Encode(message)

document.write (output)



So the problem seems to be with .NET?

Scot.
kong(Legacy member)
 

Re: ActiveX and .NET problem

Postby glitch(Legacy Member) on Thu Feb 21, 2008 11:13 am

I have tried the code in VS2003. No problem at all.

Is your web server located in the same machine that you are working on? If the web server is in a different machine you also need to install the software on that machine.

Edited by glitch on February 21 2008 at 3:13pm
glitch(Legacy Member)
 

Re: ActiveX and .NET problem

Postby kong(Legacy member) on Fri Feb 22, 2008 4:07 am

Hi,

The demo software is installed to the server that the web is running from. The .dll file is also registered to that machine. I'm using VS2005 but I also have VS2003 installed. I'll try that first.

thanks.

Scot.
kong(Legacy member)
 

Re: ActiveX and .NET problem

Postby kong(Legacy member) on Fri Feb 22, 2008 5:44 am

Hi,

I have experimented in VS2003 and 2005 and on another machine with both software versions installed. I'm still getting nothing from the server side.

As the demo software sends a pop-up to the screen to warn you it's the demo would this be the reason I cannot get this to run from the server?

The above code runs and times out after a couple of minutes. Like it's waiting for something to happen.

No pop-up appears on the server screen, and there's nothing in the event viewer to say the application has crashed out.

any ideas??

thanks.

Scot.
kong(Legacy member)
 

Re: ActiveX and .NET problem

Postby glitch(Legacy Member) on Fri Feb 22, 2008 7:22 am

The trial version pops up a message box warning that you are using a trial (the barcode has "DEMO" text encoded inside). It hangs the execution thread if you run it at the background. You need to get a copy with no message box enabled. See here:

http://www.morovia.com/support/article.aspx?id=10029
glitch(Legacy Member)
 


Return to Barcode ActiveX Control

Who is online

Users browsing this forum: No registered users and 2 guests