Any C# guru interested in helping with Outlook Sidebar Control to work in vb.net?
Any C# guru (perhaps just an experienced vb.net developer) interested in helping to get this really cool Outlook Sidebar Control to work in vb.net?
May be an easy fix! ???
http://www.codeproject.com/cs/menu/O...42&msg=1744742
Hi all,
Thanks for the time you're spending to read this post.
I'm a novice in vb.net 2005 Express.
With No experience in c# Express.
I've attempted to get this really cool and simple Outlook Sidebar Control to work in vb.net
but can't get it to save certain properties properly:
Enabled, Image, Tag, and Text
ie.
'Enabled' is already declared as 'Private Dim enabled As Boolean' in this class.
' Image' is already declared as 'Protected Dim image As System.Drawing.Image' in this class.
etc.
I'm hoping its just a quick fix in C# for a C# guru to get the control to work properly in vb.net.
For a vb.net guru (perhaps just an experience vb.net developer):
I've also already converted the code to vb.net (I think).
But, again, being a novice I'm out of my depth.
The attached code is as far as I got.
The attached error list is where I start to go under.
Again I'm using vb.net 2005 Express.
Which I'm finding very flaky.
Especially when moving documents around to different folders in the Project Explorer.
And when changing data types for fields in SQL Server 2005 Express.
Not only does it fail but saves the code in a manner that can't recover some documents.
Regretably vb.net 2005 Express does NOT come with Source Safe which I miss very much.
So I have to backup the project and data very often.
And have to recover just as often.
Perhaps vb.net 2005 would give a different result.
I've also downloaded and installed the Create New Project type -
"Windows Control Library"
that was missing in vb.net 2005 Express.
The errors are the same.
I hope this is enough info to peak someone's interest
and not too much to chase others off.
If anyone is interested and needs more info just let me know.
Of if anyone can tell me its not even close or not worth it,
I'm happy to drop the vb.net conversion.
Any help or any positive constructive suggestions would be greatly appreciated.
Thanks again.
Re: Any C# guru interested in helping with Outlook Sidebar Control to work in vb.net?
I produced a VB.NET version with our Instant VB converter. I made the necessary adjustments to get it to compile, but I have no time to test the control. I attempted to attach it here, but the 'Manage Attachments' button doesn't work for me.
Re: Any C# guru interested in helping with Outlook Sidebar Control to work in vb.net?
Hi David,
Thanks for the input.
I've sent you a private email with my direct email address.
Please feel free to post the entire project directly if and when you can find the time.
I'll attach it to a reply here.
Then see what I can do from there.
Thanks again ...
baz
1 Attachment(s)
Re: Any C# guru interested in helping with Outlook Sidebar Control to work in vb.net?
Here's the zip file for the VB version of the project (on a different machine, the 'managed attachments' upload works).
As I mentioned, it compiles, but I haven't tested, so I can't guarantee that it works identically.
Re: Any C# guru interested in helping with Outlook Sidebar Control to work in vb.net?
Re: Any C# guru interested in helping with Outlook Sidebar Control to work in vb.net?
As noted: Dave Anton from Tangible Software Solutions used their Instant VB converter - c# to VB on the full project and has left the full project zip file on the post above.
Dave has also hand edited the code to get it to compile.
At the moment its stil producing the same errors as the c# version when used in vb.net.
I'm using vb.net 2005 express can anyone confirm this is happening in vb.net 2005 as well?
I’ve chased the issue down as far as a vb.net novice can to:
VB Code:
<DesignerSerializationVisibility(DesignerSerializationVisibility.Visibl e)>
Where .content and .hidden DO NOT produce the commands but Visible does.
But, of couse, we need the commands:
'OutlookBarButton1.Tag = Nothing
'OutlookBarButton1.Text = "Test"
including Enabled and Image
As you can see below the (Me.) qualifier has been dropped from the properties giving the errors.
Me.OutlookBar1.AutoSize = True
Me.OutlookBar1.BackColor = System.Drawing.SystemColors.Highlight
Me.OutlookBar1.ButtonHeight = 30
OutlookBarButton1.Tag = Nothing
OutlookBarButton1.Text = "Test"
Me.OutlookBar1.Buttons.Add(OutlookBarButton1)
Me.OutlookBar1.Cursor = System.Windows.Forms.Cursors.Hand
Me.OutlookBar1.Dock = System.Windows.Forms.DockStyle.Fill
Which is produced (I believe) from:
<Browsable(True)> _
<Description("Indicates whether the button is enabled")> _
<Category("Behavior")> _
<DesignerSerializationVisibility(DesignerSerializationVisibility.Visibl e)> _
Public Property Enabled() As Boolean
Get
Return m_enabled
End Get
Set(ByVal value As Boolean)
m_enabled = value
End Set
End Property
Protected m_image As Image = Nothing
<Browsable(True)> _
<Description("The image that will be displayed on the button")> _
<Category("Data")> _
<DesignerSerializationVisibility(DesignerSerializationVisibility.Visibl e)> _
Public Property Image() As Image
Get
Return m_image
End Get
Set(ByVal value As Image)
m_image = value
m_parent.Invalidate()
End Set
End Property
Protected m_tag As Object = Nothing
<DesignerSerializationVisibility(DesignerSerializationVisibility.Visibl e)> _
<Browsable(True)> _
<Description("User-defined data to be associated with the button")> _
<Category("Appearance")> _
Public Property Tag() As Object
Get
Return m_tag
End Get
Set(ByVal value As Object)
m_tag = value
End Set
End Property
Protected m_text As String
<DesignerSerializationVisibility(DesignerSerializationVisibility.Visibl e)> _
<Browsable(True)> _
<Description("The text that will be displayed on the button")> _
<Category("Appearance")> _
Public Property Text() As String
Get
Return m_text
End Get
Set(ByVal value As String)
m_text = value
m_parent.Invalidate()
End Set
End Property
Perhaps its something to do with the collection editor?
Any positive contructive assistance directly related to this issues would be greatly appreciated.
Thanks to all for their participation.
All the best,
Barry G. Sumpter
Re: Any C# guru interested in helping with Outlook Sidebar Control to work in vb.net?
I edited your post to include the "[Highlight=VB]" tags for formatting vb code. :)
Re: Any C# guru interested in helping with Outlook Sidebar Control to work in vb.net?
Ahh, so its vbcode and not just code.
Excellent!
Thanks for that.
The post reads so much better now.
Re: Any C# guru interested in helping with Outlook Sidebar Control to work in vb.net?
Well, actually it works with both but the tag identifiers are the square brackets and not the "< >" signs ;)
Re: Any C# guru interested in helping with Outlook Sidebar Control to work in vb.net?