最近在匯入元大API後發現找不到AxYuantaQuoteLib這東西,

才發現我沒用過COM的ocx組件。

印象中自己寫的ocx都可以在工具箱中直接跳出來,翻了好久都沒有,

才上網找看看有沒有相關說明:https://stackoverflow.com/questions/9678814/how-to-add-active-x-component-to-c-sharp-project

解答裡寫道:

  • Open the windows form file that you want to add an Activex control.

  • Right click on any tool on the tool box.

  • That menu contains "Choose Items".

  • Click on it and you can see the COM Components tab on the pop up window.

  • Select any COM component that you want to add.

  • Then it appears on the tool box.

  • Drag and drop it on to the form.

很好,馬上解決我前半天異想天開直接想從interface暴力寫入結果一直出現「災難性的失敗」這鳥錯誤的窘境,

元件拉上去Form之後就馬上可以進行API編寫了。

文章標籤
全站熱搜
創作者介紹
創作者 wings890109 的頭像
wings890109

幽嵐飋翼

wings890109 發表在 痞客邦 留言(0) 人氣(247)