Custom PictureBox-derived control Add-in for Access
-
11 Nisan 2012 Çarşamba 09:22
I've developed a custom control in C#, that decodes a string we use internally and produces a DataMatrix code from it. All of this is working fine, but I really would love to develop an Add-in that we can use in MS Access to use that in Access reports.
I am a complete newbie with VSTO, done plenty of reading, but the documentation I found does not point me in the right direction. I thought that I could inherit from a PictureBox control that is available in the Access control box, and extend it with the desired functionality. This should then be available to be placed on a Access report.
Would be thankful for any hints as to where and how to start.
- Taşıyan Forrest GuoMicrosoft Employee, Moderator 16 Nisan 2012 Pazartesi 05:02 custom control in Access (From:Visual Studio Tools for Office)
Tüm Yanıtlar
-
12 Nisan 2012 Perşembe 02:49Moderatör
Hi Veichtlbauer,
Thanks for posting in the MSDN Forum.
Would you please tell me your Access version?
Have a good day,
Tom
Tom Xu [MSFT]
MSDN Community Support | Feedback to us
-
12 Nisan 2012 Perşembe 06:13We use Access 2010, Visual Studio 2010 SP1.
-
13 Nisan 2012 Cuma 05:28Moderatör
Hi Veichtlbauer,
Your issue is more complex than I thought. I think you need draw a matrix then show it in the Access 2010's report. Is it right? It seems out of the technical range of VSTO. I will involve some experts into this issue to see whether they can help you. There might be some time delay, thanks for your patience.
Have a good day,
Tom
Tom Xu [MSFT]
MSDN Community Support | Feedback to us
-
16 Nisan 2012 Pazartesi 06:12Moderatör
Hi,
Microsoft Access accept ActiveX control in designing form. So you can convert your control to ActiveX control, and register it.
I noticed that Access and Excel share same set of activex controls, Access doesn't provide UI way to register ActiveX control, but Excel does. You can register control via Excel Developers tab, Controls group, Insert -> More controls -> Register Custom Control.
Refer to this article: http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342148&lcid=1033&NS=EXCEL&Version=14&tl=2&queryid=&respos=1&HelpID=10212
Hope this gets you on right direction. VSTO doesn't help in this scenario.
best regards,
Forrest Guo | MSDN Community Support | Feedback to manager
- Yanıt Olarak İşaretleyen Forrest GuoMicrosoft Employee, Moderator 16 Nisan 2012 Pazartesi 06:12
- Yanıt İşaretini Geri Alan Veichtlbauer 16 Nisan 2012 Pazartesi 06:26
- Yanıt Olarak İşaretleyen Veichtlbauer 20 Nisan 2012 Cuma 09:05
-
16 Nisan 2012 Pazartesi 06:28
Hi, thanks for the replies guys. The problem is that currently I have this implemented as ActiveX (rather complex via a Visual Basic 6 ActiveX control). This is working fine, but I was looking for a better way to do it.
I was rather sure it would be possible to design a control with .NET :(
Memory consumption becomes a problem with the ActiveX (the reports are rather huge, and many Matrix codes there). Also, we are having troubles running it in 64bit Office. Any suggestions on that?
-
16 Nisan 2012 Pazartesi 06:46Moderatör
Hi,
Even if you reimplement the control in .NET, you will need to implement as ActiveX control. So I suppose you just upgrade VB6 to .NET languages.
As the high memory consumption problem, I think you need to revisit the code and release unreferenced objects;
As to running activex control on 64bit Office, you will need
- 64bit version activex control,
- Register the activex control in both x86 and x64 command line.
Hope this helps.
Forrest Guo | MSDN Community Support | Feedback to manager
-
18 Nisan 2012 Çarşamba 14:00
Hi, if you could tell me how to build a 64bit ActiveX? :)
-
19 Nisan 2012 Perşembe 15:05Moderatör
Hi,
To create a ActiveX control in .NET, you can refer to this step by step article: http://www.c-sharpcorner.com/UploadFile/dsandor/ActiveXInNet11102005040748AM/ActiveXInNet.aspx You can set 64bit at project property page, Platform Target = x64
Other language and platform have different ways to set 64bit.
Does this answer the question?
best regards,
Forrest Guo | MSDN Community Support | Feedback to manager
-
20 Nisan 2012 Cuma 08:29
Hi, well, I guess I should open another thread for this.
I'll mark one of your previous answers, and open a new thread for the problem below:
Building and registering an ActiveX works (also thanks to the CSActiveX example at All-In-One Code Framework. The thing is, when you compile it for x64, it just won't initialize (just shows an unknown error, whatever I do)...
- Düzenleyen Veichtlbauer 20 Nisan 2012 Cuma 09:05
-
20 Nisan 2012 Cuma 08:42Moderatör
OK. Please provides steps and detail errors you run into.
regards,
Forrest Guo | MSDN Community Support | Feedback to manager
-
20 Nisan 2012 Cuma 09:27