Muller Stephan
Posts: 50
Joined: 2010-03-11
|
Hello,
I am currently converting a plugin from a standalone VB .net application to Add In Express.
I came up with two questions which I could not solve on my own :oops:
Question a)
I tried adding and showing a simple vb windows form. For this matter i used the following code:
Dim frm As Form1 = New Form1()
frm.ShowDialog()
=> Very simple. However, when I run it it does not work when run from the IE toolbar. It shows the form and immidiately hides the form again. When I run the same code from a context menu button, it works w/out any problems. Why is that?
I also tried using frm.Show(), that does show the form, but in the background.
I use Windows Vista x32 with Internet Explorer 8 and MS VB .net in VS 2008.
Question b)
I have a windows form with a link on it. When the user clicks the link, IE is supposed to navigate to the uRL on the link. How do I access the IEApp object from a vb form? I tried using IEModule.IEApp.Navigate(...), but IEModule.IeApp is not available.
Thanks for your reply in advance
Stephan |
|
Andrei Smolin
Add-in Express team
Posts: 18823
Joined: 2006-05-11
|
Hello Stephan,
1. Try using frm.ShowDialog(IWin32Window) overload. Use ADXIEModule.MainWindowHandle to initialize the class implementing IWin32Window.
2. You can create a constructor accepting ADXIEModule.
Andrei Smolin
Add-in Express Team Leader |
|
Muller Stephan
Posts: 50
Joined: 2010-03-11
|
Hey Andrei,
thanks for your reply! I am progressing with my addin very well.
Tip #2 worked very fine for me, however I have trouble implementing tip #1. How do I set up a wrapper class in VB .net to make that possible? Could you give me an example? My tries unfortunately did not result in success.
Furthermore I came up with a new question:
I configured some shorcuts for my context menus. However, none of them work - although I tried using combos that are not used by IE (e.g. CTRL+SHIFT+N). Although they are correctly displayed in the context menu, when I push the combination nothing happens.
I also have to correct myself. I am using IE7, not IE8. So IE7 on x32 Vista with VB .net 2008.
Thanks in advance for your help :D
Stephan |
|
Andrei Smolin
Add-in Express team
Posts: 18823
Joined: 2006-05-11
|
Stephan,
Muller Stephan writes:
Could you give me an example?
Public Class MyWindow
Implements System.Windows.Forms.IWin32Window
Dim theHandle As IntPtr
Public Sub New(ByVal aHandle As System.IntPtr)
theHandle = aHandle
End Sub
Public ReadOnly Property Handle() As System.IntPtr _
Implements System.Windows.Forms.IWin32Window.Handle
Get
Return theHandle
End Get
End Property
End Class
Muller Stephan writes:
I configured some shorcuts for my context menus. However, none of them work
Please check if you set HandleShortcuts = tue in the properties of the IE module.
Andrei Smolin
Add-in Express Team Leader |
|