I made a UserControl in VB.NET and uploaded it to the webserver, my problem
is that the dll dont register in the registy at the client registry. I
think it do How should i do?
here is my code from the website.
<html>
<body color=white>
<hr>
<font face=arial size=1>
<object id="myControl1" name="myControl1"
classid="clsid:50BC5B6D-95F8-4831-A34D-69CB7029C950"
CODEBASE="http://test.itk.nu/myx.dll" width=288 height=72></object>
</font>
<form name="frm" id="frm">
<input type="text" name="txt" value="enter text here"><input type=button
value="Click me" onClick="doScript();">
</form>
<hr>
</body>
<script language="javascript">
function doScript()
{
myControl1.UserText = frm.txt.value;
}
</script>
</html>
This is the code from VB:
Imports System.Runtime.InteropServices
Imports System
Imports System.Reflection
<Assembly: AssemblyKeyFileAttribute("myx.snk")>
<GuidAttribute("50BC5B6D-95F8-4831-A34D-69CB7029C950")> _
Public Class mycontrol
Inherits System.Windows.Forms.UserControl
Private mStr_UserText As String
Public Property UserText() As String
Get
Return mStr_UserText
End Get
Set(ByVal Value As String)
mStr_UserText = Value
txtUserText.Text = Value
End Set
End Property
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
InitializeComponent()
End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
Private components As System.ComponentModel.IContainer
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents txtUserText As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.txtUserText = New System.Windows.Forms.TextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.SuspendLayout()
Me.txtUserText.Location = New System.Drawing.Point(128, 40)
Me.txtUserText.Name = "txtUserText"
Me.txtUserText.Size = New System.Drawing.Size(296, 20)
Me.txtUserText.TabIndex = 0
Me.txtUserText.Text = "TextBox1"
Me.Button1.Location = New System.Drawing.Point(48, 40)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 1
Me.Button1.Text = "Button1"
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1,
Me.txtUserText})
Me.Name = "mycontrol"
Me.Size = New System.Drawing.Size(464, 152)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim WSH
Dim t As String
WSH = CreateObject("WScript.Shell")
txtUserText.Text = WSH.RegRead("HKLM\Software\Microsoft\Internet
Explorer\Version")
End Sub
End Class 1 1386
..net controls hosted by IE run in a sandbox just java applets, and do not
access to the registery.you will have to change security settings.
-- bruce (sqlwork.com)
"Lars Skogshus" <la**@itk.nu> wrote in message
news:e2**********@emma.aioe.org... I made a UserControl in VB.NET and uploaded it to the webserver, my problem is that the dll dont register in the registy at the client registry. I think it do How should i do? here is my code from the website.
<html> <body color=white> <hr> <font face=arial size=1> <object id="myControl1" name="myControl1" classid="clsid:50BC5B6D-95F8-4831-A34D-69CB7029C950" CODEBASE="http://test.itk.nu/myx.dll" width=288 height=72></object> </font> <form name="frm" id="frm"> <input type="text" name="txt" value="enter text here"><input type=button value="Click me" onClick="doScript();"> </form> <hr> </body>
<script language="javascript"> function doScript() { myControl1.UserText = frm.txt.value; } </script> </html>
This is the code from VB:
Imports System.Runtime.InteropServices Imports System Imports System.Reflection
<Assembly: AssemblyKeyFileAttribute("myx.snk")> <GuidAttribute("50BC5B6D-95F8-4831-A34D-69CB7029C950")> _
Public Class mycontrol Inherits System.Windows.Forms.UserControl Private mStr_UserText As String Public Property UserText() As String Get Return mStr_UserText End Get Set(ByVal Value As String) mStr_UserText = Value txtUserText.Text = Value End Set End Property
#Region " Windows Form Designer generated code " Public Sub New() MyBase.New()
InitializeComponent() End Sub
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
Private components As System.ComponentModel.IContainer Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents txtUserText As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.txtUserText = New System.Windows.Forms.TextBox() Me.Button1 = New System.Windows.Forms.Button() Me.SuspendLayout() Me.txtUserText.Location = New System.Drawing.Point(128, 40) Me.txtUserText.Name = "txtUserText" Me.txtUserText.Size = New System.Drawing.Size(296, 20) Me.txtUserText.TabIndex = 0 Me.txtUserText.Text = "TextBox1" Me.Button1.Location = New System.Drawing.Point(48, 40) Me.Button1.Name = "Button1" Me.Button1.TabIndex = 1 Me.Button1.Text = "Button1" Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1, Me.txtUserText}) Me.Name = "mycontrol" Me.Size = New System.Drawing.Size(464, 152) Me.ResumeLayout(False) End Sub #End Region
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim WSH Dim t As String WSH = CreateObject("WScript.Shell") txtUserText.Text = WSH.RegRead("HKLM\Software\Microsoft\Internet Explorer\Version") End Sub End Class This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: QyRoN |
last post by:
Hi
I need to install python-2.3 on my computer. The problem is that
python and many programs written in python (pythonwin for example) use
registry for storing parameters on python installation....
|
by: rut |
last post by:
The code:
$winkey= $Registry->
{"CUser/Software/Microsoft/Internet Account Manager/"};
Im trying to open a registry key and the above code will not work, it
seems that the spaces in...
|
by: Igor Solodovnikov |
last post by:
Hi.
I am trying to automatically backup transaction log when error 9002
happened. So i have created appropriate job and alert to catch this error.
I have two instances of sql server under Windows...
|
by: Ken |
last post by:
Hi,
I need to modify an existing application that's written in C, C++ and
Visual C++ so the application can be released as a time limited trial
version, also the modifications must prevent the...
|
by: Dave |
last post by:
I am creating the setup for the .NET project.
The project contains several OLE Automation Servers (.exe)
I am having troubles toadd required registration information
for these servers to the...
|
by: boy0612 |
last post by:
How to create asp webserver without registry for finding aspnet_isapi.dll
and how to be patched up for System.Web.dll ?
thanks.
|
by: Maciek |
last post by:
Hi
When I set Session state mode to StateServer (IIS 6.0; windows2003; .NET
2.0) in my application, I have recived this message:...
|
by: Brian Henry |
last post by:
I created a setup project for my VB.NET app and want to make it start up
with windows logging in, so i told it to place it into the startup group of
the users program group in the start menu (like...
|
by: Learner |
last post by:
Hi there,
Ours is an automotive inspection business. All our inspectors inspect
the vehicles and took picures as need and upload them to the webserver
from where every body will have access to...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |