Easy (for others) Matlab move activex problem.

  • MATLAB
  • Thread starter USN2ENG
  • Start date
  • Tags
    Matlab
In summary, to hide an activex control in your GUI, you will need to retrieve its handle using the "findobj" function and then use the "move" function to move it out of sight. The example code provided should help you achieve this. Good luck!
  • #1
USN2ENG
108
0
Hi,

I am trying to hide the activex control in my GUI by moving it out of sight. I am new to this and have been searching with no avail. I have tried:

g = actxcontrol('WMPlayer.OCX.7', [16 242 714 321]);
g.move([20,160,100,100])

but it just creates another wmv looking file and places it in that position and doesn't move the actual activex that I am trying to move. I am not sure what I am doing wrong. I don't know know if I need to use a handle, or even what that would be since it doesn't let me create a function...

any help would be GREAT!
 
Physics news on Phys.org
  • #2


Hello,

I understand that you are trying to hide an activex control in your GUI by moving it out of sight. It seems like you are on the right track by using the "move" function, but it's important to make sure you are using the correct handle for the activex control.

First, you will need to retrieve the handle for the activex control by using the "findobj" function. This will allow you to specify the control's name or tag, and return the handle for that control. Once you have the handle, you can use the "move" function to move the control out of sight.

Here is an example code:

% Retrieve handle for the activex control
h = findobj('Name','WMPlayer.OCX.7');

% Move the control out of sight
move(h, [1000,1000,100,100]);

This should move the control to a position that is out of the visible area of the GUI. If you have any further issues, please let me know. Good luck!
 

1. What is an ActiveX control in Matlab?

An ActiveX control is a software component that allows other applications, such as Matlab, to interact with a specific program or system. It is commonly used for creating user interfaces and accessing external data sources.

2. Why is it difficult for some people to move an ActiveX control in Matlab?

Moving an ActiveX control in Matlab can be challenging for some people because it requires a good understanding of both Matlab and the specific ActiveX control being used. Additionally, the compatibility between the control and Matlab may also play a role in the difficulty.

3. How can I make moving an ActiveX control easier in Matlab?

One way to make moving an ActiveX control easier in Matlab is by familiarizing yourself with the documentation and examples provided by Matlab and the control's developer. Additionally, breaking down the task into smaller steps and troubleshooting any errors can also help make the process smoother.

4. What are some common errors encountered when moving an ActiveX control in Matlab?

Some common errors when moving an ActiveX control in Matlab include compatibility issues, incorrect syntax, and missing dependencies. It is important to carefully read any error messages and troubleshoot them accordingly.

5. Is there an alternative to using ActiveX controls in Matlab?

Yes, there are alternative methods for achieving similar functionality as ActiveX controls in Matlab. These include using built-in Matlab functions, importing data through other file formats, or using other programming languages such as Java or Python.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
20K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
Back
Top