Opening Windows form shared add-in
Opening Windows form shared add-in
Opening Windows form shared add-in
Opening Windows form shared add-in
Opening Windows form shared add-in
Opening Windows form shared add-in Opening Windows form shared add-in Opening Windows form shared add-in Opening Windows form shared add-in Opening Windows form shared add-in Opening Windows form shared add-in Opening Windows form shared add-in Opening Windows form shared add-in
Opening Windows form shared add-in Opening Windows form shared add-in
Opening Windows form shared add-in
Go Back  Xtreme Visual Basic Talk > > > Opening Windows form shared add-in


Reply
 
Thread Tools Display Modes
  #1  
Old 10-29-2011, 04:10 PM
Alex30 Alex30 is offline
Regular
 
Join Date: Sep 2007
Posts: 51
Default Opening Windows form shared add-in


Hello,
I've created a shared add-in for Office that adds a button to Office application.

If I am using the button to show a message, it works good:
Code:
Sub settingsPressed(ByVal control As Office.IRibbonControl)
         MessageBox.Show("Hello")
    End Sub
But I am not able to use it for opening Windows form:
Code:
Sub settingsPressed(ByVal control As Office.IRibbonControl)
        frmSettings.Show()
    End Sub
The .Show() command is not available and is not proposed by intellisense.

Of course I've added a reference to System.Windows.Forms

Do you have any ideas?

Thanks.
Reply With Quote
  #2  
Old 10-30-2011, 05:33 PM
DennisW's Avatar
DennisW DennisW is offline
Junior Contributor
 
Join Date: Mar 2006
Location: Östersund, Sweden
Posts: 268
Default

Alex,

If You test the following will it work for You?

Code:
Dim frm As Form = Nothing

frm = New frmMain '<------ the name of the Windows Form

frm.Show()

' or use this
'frm.ShowDialog()
__________________
Kind regards,
Dennis

.NET & Excel | 2nd edition PED | MVP
Reply With Quote
  #3  
Old 10-31-2011, 02:29 PM
Alex30 Alex30 is offline
Regular
 
Join Date: Sep 2007
Posts: 51
Default

WOW, it worked.
Thank you!!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Opening Windows form shared add-in
Opening Windows form shared add-in
Opening Windows form shared add-in Opening Windows form shared add-in
Opening Windows form shared add-in
Opening Windows form shared add-in
Opening Windows form shared add-in Opening Windows form shared add-in Opening Windows form shared add-in Opening Windows form shared add-in Opening Windows form shared add-in Opening Windows form shared add-in Opening Windows form shared add-in
Opening Windows form shared add-in
Opening Windows form shared add-in
 
Opening Windows form shared add-in
Opening Windows form shared add-in
 
-->