Click here to Skip to main content
15,895,557 members
Home / Discussions / C#
   

C#

 
QuestionSmallest and fastest way to store numeric data in a file Pin
Reanalyse13-Jan-09 15:40
Reanalyse13-Jan-09 15:40 
AnswerRe: Smallest and fastest way to store numeric data in a file [modified] Pin
Luc Pattyn13-Jan-09 16:35
sitebuilderLuc Pattyn13-Jan-09 16:35 
AnswerRe: Smallest and fastest way to store numeric data in a file Pin
PIEBALDconsult13-Jan-09 16:51
mvePIEBALDconsult13-Jan-09 16:51 
AnswerRe: Smallest and fastest way to store numeric data in a file Pin
Guffa13-Jan-09 17:20
Guffa13-Jan-09 17:20 
AnswerRe: Smallest and fastest way to store numeric data in a file Pin
Mark Churchill13-Jan-09 17:42
Mark Churchill13-Jan-09 17:42 
GeneralRe: Smallest and fastest way to store numeric data in a file Pin
Reanalyse13-Jan-09 19:22
Reanalyse13-Jan-09 19:22 
AnswerRe: Smallest and fastest way to store numeric data in a file Pin
CPallini13-Jan-09 22:01
mveCPallini13-Jan-09 22:01 
QuestionObtain All Information from an Ocx [modified] Pin
angral13-Jan-09 14:41
angral13-Jan-09 14:41 
Hi all,

I am trying to use an ActiveX object in my c# application. The ActiveX object is installed in my pc and works properly in my c++ application. but when i tried to drag and drop the ocx from the toolbox to a winform in my c# application, an error poped up and said the ocx wasn't registered properly. so i tried to use reflection for dynamically innovating it't members and properties.

firstly, i created a class inherited from AxHost.
The type of ocx has been created as follow:
ocxType = Type.GetTypeFromCLSID(new Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx")); // guid of the ocx object registered in my pc

then in order to use the methods of this ocx, i used Type.Invokemember to do the job.
ocxType.InvokeMember("MethodName", BindingFlags.InvokeMethod, null, this.GetOcx(), null); // "MethodName" is coming from the description documtation of the ocx object
I tested the program and it executed successfully.
However, when i tried to invoke the properties, unknown name exception was thrown all the time. but what confused me the most is that invoking the event in this way seemed not working at all.

so here are my questions:
what is the proper way to use the Ocx object in C# application?
Are there any disadvantages of invoking members of ocx in this way?
How can I bind all the information including event?

Thank you soo much for all the help,
angral

modified on Tuesday, January 13, 2009 8:59 PM

AnswerRe: Obtain All Information from an Ocx Pin
Henry Minute13-Jan-09 16:56
Henry Minute13-Jan-09 16:56 
GeneralRe: Obtain All Information from an Ocx Pin
angral13-Jan-09 18:05
angral13-Jan-09 18:05 
Questionanimations\video Pin
mjmim13-Jan-09 14:39
mjmim13-Jan-09 14:39 
AnswerRe: animations\video Pin
EliottA13-Jan-09 14:45
EliottA13-Jan-09 14:45 
QuestionDatasets / SQL [modified] Pin
CrimeanTurtle200813-Jan-09 13:42
CrimeanTurtle200813-Jan-09 13:42 
AnswerRe: Datasets / SQL Pin
leckey13-Jan-09 14:36
leckey13-Jan-09 14:36 
QuestionAutoresize column width in owner drawn ListView [modified] Pin
CodeBerserker13-Jan-09 12:30
CodeBerserker13-Jan-09 12:30 
QuestionNumber Vaildation Pin
tswright104113-Jan-09 12:26
tswright104113-Jan-09 12:26 
AnswerRe: Number Vaildation Pin
EliottA13-Jan-09 12:38
EliottA13-Jan-09 12:38 
AnswerRe: Number Vaildation Pin
RyanEK13-Jan-09 14:03
RyanEK13-Jan-09 14:03 
AnswerRe: Number Vaildation Pin
PIEBALDconsult13-Jan-09 14:18
mvePIEBALDconsult13-Jan-09 14:18 
AnswerRe: Number Vaildation [modified] Pin
Jon Rista13-Jan-09 14:36
Jon Rista13-Jan-09 14:36 
GeneralRe: Number Vaildation Pin
tswright104114-Jan-09 3:37
tswright104114-Jan-09 3:37 
GeneralRe: Number Vaildation Pin
Jon Rista14-Jan-09 12:05
Jon Rista14-Jan-09 12:05 
QuestionInternet Explorer running an application by file association Pin
bfrank197213-Jan-09 7:29
bfrank197213-Jan-09 7:29 
AnswerRe: Internet Explorer running an application by file association Pin
DaveyM6913-Jan-09 9:32
professionalDaveyM6913-Jan-09 9:32 
GeneralRe: Internet Explorer running an application by file association Pin
bfrank197213-Jan-09 13:58
bfrank197213-Jan-09 13:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.