|
-
Feb 24th, 2003, 01:58 AM
#1
Thread Starter
Junior Member
Activex ocx
i am creating my first activex ocx. in my first example project i have a command button and two text boxes on my user control. when the mouse down event is triggered for the button i want the program to execute a routine in a public module. in this public module i want to be able to change the text within the second text box. i cannnt find out how to get a handle to the text box on the usercontrol to change its properties from within my public module. usercontrol.text2.text returns object not found. do i have to make a public get/let precedure for the text box i dont want an external porgram being able to chang the text box only the public module within my ocx.
-
Feb 24th, 2003, 04:01 AM
#2
-
Feb 24th, 2003, 04:36 AM
#3
Thread Starter
Junior Member
not sure i understand
i understand to communicate from my application to the control i need to make procedures within the usercontrol code window.
but what i am tryin to do is all from within the control itself
the usercontrol window contains the text boxes and button
i have a module within my control that needs to access the text box on my usercontrol display. i havnt implemented a class within my usercontrol yet and i didnt think that was reallly nessicary for all applications. but i do plan on making a class module for the control to hold some procedures and a database.
-
Feb 24th, 2003, 04:47 AM
#4
KING BODWAD XXI
Forget about classes i meant the usercontrol (Classes for Dll i beleive) but that wont work anyway
The way i have solved this is to add a form to the control and place my stuff on this. In the control set up a public Sub to show the form
in userControl code
Public Sub ShowDetails
frmShowDetails.show
end Sub
Use the usercontrol form as a crossover point that passes data between the two projects.
-
Feb 26th, 2003, 02:27 AM
#5
Thread Starter
Junior Member
how would i go about making the background of the form transparent and without boarder. i thought i seen controls that do not use a form. i was planing on cretaing a form for an about box and some settings and things, but i thought i would want to use the usercontrol display as the main interface for the control, that takes in the main inputs and shows some main outputs.
i am attempting to build a voip voice chat program i got all the code to run the program working in a vb project except i need some sort of multithreading cause its a lil slow. i want the control to contain a talk button and a display to show whos currently talking and maybe some sort of VU meter on the face of the control itself. but i just cant seem to get access to these objects within the usercontrol from one of my modules. there must be a way to go about doing so that i havnt come accross yet
-
Feb 26th, 2003, 03:30 AM
#6
-
Feb 26th, 2003, 07:23 AM
#7
Thread Starter
Junior Member
its gonna be a big project and would like to keep it organized as much as possible.
i was reading about the Let/Get properties with the Friend scope that might have something to do with what i am tryin to do but havnt figured it out completely yet.
-
Feb 26th, 2003, 07:27 AM
#8
KING BODWAD XXI
coudnt you set it as a public Object varaible containing your control objects
e.g
Public List as Object
'in Control
Set List = lstMain
'In Module
List.Whatever
-
Feb 26th, 2003, 09:26 AM
#9
Thread Starter
Junior Member
well i dunno.
i can get access to varibles from other modules from within the UserControl Code window, but whenever i try to access something in the usercontrol object from a module it doesnt see it. there must be some way to expose the objects, properties and methods of the usercontrol objects with the other modules within the project?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|