-
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.
-
Create a public procedure in your main class module that changes it.
You may only interact from your main program to the Class module in the control. This means you must send data to the class, it effectively bridges the gap between the two. :D :D
-
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.
-
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.
-
:confused:
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:rolleyes:
-
Why must you have it in a module??? :confused: :confused:
-
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.
-
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
-
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?