PC Review Forums Newsgroups Microsoft DotNet Microsoft VB .NET Re: vb.net2005 got error when put object

Reply

Re: vb.net2005 got error when put object

 
Thread Tools Rate Thread
Old 22-02-2006, 01:40 AM   #1
vbnetdev
Guest
 
Posts: n/a
Default Re: vb.net2005 got error when put object


Taking a wild guess but does this product require a license?

If so try this....xxxxx is the control's runtime license key. The key is the
id of the component that you would find in component manager.

Imports System.Windows.Forms

Public Class AxTree
Inherits AxHost

Public Sub New()
MyBase.New("3C5FC763-72BA-4B97-9985-81862E9251F2")
End Sub
End Class

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim n As New AxTree
Dim f As System.Reflection.FieldInfo
f = GetType(AxHost).GetField("licenseKey", _
Reflection.BindingFlags.NonPublic _
Or Reflection.BindingFlags.Instance)
f.SetValue(n, "xxxxxxxxxx")
Controls.Add(n)
End Sub
End Class

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com



"Agnes" <agnes@dynamictech.com.hk> wrote in message
news:uBTRFeuNGHA.1676@TK2MSFTNGP09.phx.gbl...
>I put an object (my usercontrol) into a form , and sometimes got that error
>
>



  Reply With Quote
Old 22-02-2006, 02:00 AM   #2
Agnes
Guest
 
Posts: n/a
Default Re: vb.net2005 got error when put object

runtime license key ?
the usercontrol is a textbox only (and designed by us !) How come there is
license ky ??
I didn't got such problem in 2003

"vbnetdev" <vbnetdev@community.nospam> ¼¶¼g©ó¶l¥ó·s»D:OJ0X2D1NGHA.3556@TK2MSFTNGP10.phx.gbl...
> Taking a wild guess but does this product require a license?
>
> If so try this....xxxxx is the control's runtime license key. The key is
> the id of the component that you would find in component manager.
>
> Imports System.Windows.Forms
>
> Public Class AxTree
> Inherits AxHost
>
> Public Sub New()
> MyBase.New("3C5FC763-72BA-4B97-9985-81862E9251F2")
> End Sub
> End Class
>
> Public Class Form1
>
> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> Dim n As New AxTree
> Dim f As System.Reflection.FieldInfo
> f = GetType(AxHost).GetField("licenseKey", _
> Reflection.BindingFlags.NonPublic _
> Or Reflection.BindingFlags.Instance)
> f.SetValue(n, "xxxxxxxxxx")
> Controls.Add(n)
> End Sub
> End Class
>
> --
> Get a powerful web, database, application, and email hosting with KJM
> Solutions
> http://www.kjmsolutions.com
>
>
>
> "Agnes" <agnes@dynamictech.com.hk> wrote in message
> news:uBTRFeuNGHA.1676@TK2MSFTNGP09.phx.gbl...
>>I put an object (my usercontrol) into a form , and sometimes got that
>>error
>>
>>

>
>



  Reply With Quote
Old 22-02-2006, 04:08 AM   #3
vbnetdev
Guest
 
Posts: n/a
Default Re: vb.net2005 got error when put object

I was guessing.

Obvously not right. Do a reinstall.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com



"Agnes" <agnes@dynamictech.com.hk> wrote in message
news:eWfULP1NGHA.2012@TK2MSFTNGP14.phx.gbl...
> runtime license key ?
> the usercontrol is a textbox only (and designed by us !) How come there is
> license ky ??
> I didn't got such problem in 2003
>
> "vbnetdev" <vbnetdev@community.nospam>
> ¼¶¼g©ó¶l¥ó·s»D:OJ0X2D1NGHA.3556@TK2MSFTNGP10.phx.gbl...
>> Taking a wild guess but does this product require a license?
>>
>> If so try this....xxxxx is the control's runtime license key. The key is
>> the id of the component that you would find in component manager.
>>
>> Imports System.Windows.Forms
>>
>> Public Class AxTree
>> Inherits AxHost
>>
>> Public Sub New()
>> MyBase.New("3C5FC763-72BA-4B97-9985-81862E9251F2")
>> End Sub
>> End Class
>>
>> Public Class Form1
>>
>> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
>> System.EventArgs) Handles MyBase.Load
>> Dim n As New AxTree
>> Dim f As System.Reflection.FieldInfo
>> f = GetType(AxHost).GetField("licenseKey", _
>> Reflection.BindingFlags.NonPublic _
>> Or Reflection.BindingFlags.Instance)
>> f.SetValue(n, "xxxxxxxxxx")
>> Controls.Add(n)
>> End Sub
>> End Class
>>
>> --
>> Get a powerful web, database, application, and email hosting with KJM
>> Solutions
>> http://www.kjmsolutions.com
>>
>>
>>
>> "Agnes" <agnes@dynamictech.com.hk> wrote in message
>> news:uBTRFeuNGHA.1676@TK2MSFTNGP09.phx.gbl...
>>>I put an object (my usercontrol) into a form , and sometimes got that
>>>error
>>>
>>>

>>
>>

>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off