473,407 Members | 2,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

VB ActiveX Problem

I am writing an activeX control in VB 6. I am using the ocx outside of VB and
Microsoft, in another application. I dropped the Forms 2.0 textbox on a User
Control (activex) form to make the ocx. If the Host environment changes the
.text property for the ocx, the text box updates. If I enter data into the ocx textbox,
the value is not available to the host environment. It seems that the
way I have set it up, VB does not expose the data to the host application. (I
have tried 3 different enviornments). If I drop a textbox right into the host
application, I can access the properties, sending data both ways so it is not
the textbox.
How do I expose the ocx data to the non VB environment?
I hope this question is not too confusing. Thanks for the help!

BTW, I grabbed a copy of vb.net 2003 to see if making the control that way
would make a difference. New and improved, bigger is better and all that.
It seems that vb.net can not make activex controls. Is that true?

http://www.thescripts.com/forum/thread349391.html

I looked through some of the discussions and didn't see why this is. Shouldn't
vb.net be becoming more capable? Is Microsoft dropping support for activex?
(silly statement but so is losing technology in newer software versions). I have
been out of the vb.net loop.

Thanks again for the help.
Feb 1 '07 #1
4 1437
Killer42
8,435 Expert 8TB
I am writing an activeX control in VB 6. I am using the ocx outside of VB and
Microsoft, in another application. I dropped the Forms 2.0 textbox on a User
Control (activex) form to make the ocx. If the Host environment changes the
.text property for the ocx, the text box updates. If I enter data into the ocx textbox,
the value is not available to the host environment. It seems that the
way I have set it up, VB does not expose the data to the host application. (I
have tried 3 different enviornments). If I drop a textbox right into the host
application, I can access the properties, sending data both ways so it is not
the textbox.
How do I expose the ocx data to the non VB environment?
I hope this question is not too confusing. Thanks for the help!
I believe what you need to do is add code in the Procedure Get routine for the Text property, which returns the current value from your textbox.

Something along these lines (this is not exact, just an illustration)...
Expand|Select|Wrap|Line Numbers
  1. Public Property Get Text() As String
  2.   Text = TextBox.Text
  3. End Property
Sorry, can't help with the Vb.Net questions.

Shouldn't vb.net be becoming more capable? ... (silly statement but so is losing technology in newer software versions).
So the question is, would MS drop something useful from a later version of the product? Hahahahaha... don't get me started!
Feb 2 '07 #2
willakawill
1,646 1GB
Hahahahahahahhahha :D
Feb 2 '07 #3
Thanks for the replys. The control actually works when I add it to another VB project. So the basic code seems to be right. When I add it to a non-microsoft (or non-VB - I haven't tried C++) development environments, it doesn't work. Does a VB ocx work outside of VB, say in a Delphi enviornment? Or dropping it into a WonderWare project?

This is what I have for the Get and Lets. I did it manually first, then let the ActiveX Control Interface Wizard build it just to be sure.
--------------------

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=RichTextBox1,RichTextBox1,-1,Text
Public Property Get Text() As String
Text = RichTextBox1.Text
End Property
Public Property Let Text(ByVal New_Text As String)
RichTextBox1.Text() = New_Text
PropertyChanged "Text"
End Property
Feb 2 '07 #4
Killer42
8,435 Expert 8TB
This is what I have for the Get and Lets. I did it manually first, then let the ActiveX Control Interface Wizard build it just to be sure. ...
It certainly looks alright. However, as for the non-MS question, I don't know. Have never tried.
Feb 2 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Mattt | last post by:
Hi, I've run into a rather odd problem. get Methods seem to return values from the wrong methods! For example, let's pretend my activex control stores values about a person. getName would return...
1
by: wang xiaoyu | last post by:
Hello: i want use activex in wxpython program,but when i use MakeActiveXClass an exception occurs. this is my source code dealing the DICOM ocx.I must note that in this program "hwtxcontrol" is...
2
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run...
12
by: A.M. | last post by:
Hi at all, how can I do to insert into a HTML page a file .txt stored in the same directory of the server where is the html file that must display the text file.txt? Thank you very much P.Pietro
1
by: news.scarlet.be | last post by:
Hi there, From a VB.NET application, a VB6 ActiveX DLL needs to be used. This ActiveX.DLL (source not available) has an Announce() method which opens a socket to a given server for communication...
1
by: Craig | last post by:
I am having problems getting an ActiveX DLL written in VB6 to call a method in a C# class library component. My C# DLL is called CSharpProject.dll and contains a public class called CSharpClass....
1
by: Steve | last post by:
I am having an issue deploying an ActiveX control. This is a .NET project in C#. The ActiveX control is written in VB6. I use the PDW (Package and Deployment Wizard) to create a .CAB for the...
3
by: fumihiko | last post by:
Hi, I created an activex control (C++), and it uses another COM dll (C++). This COM dll links with a static library that dose some calculation. (both are debug multithreaded dll) I created a...
2
by: Shawn | last post by:
Hi. I've never created an ActiveX control before, so I know little about what it is capable of and what its limitations are. My problem is this: I have to create a way to send multiple documents...
6
by: libsfan01 | last post by:
Hi all Im trying to use prototype for an xmlhttprequest, but it doesn't seem to be working cross-browser. Is there someway of getting it to be IE6 compatible (active x)? here's my code so...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.