make a VB.Net toolbar for Internet explorer






2.24/5 (12 votes)
May 22, 2005

162665

2804
this source code help you to make a toolbar with Band Objects in VB.net
Introduction
Five days ago , i searched for an example for IE toolbars in VB.net , but i found only one source code in C# . Please take a look to this article By Pavel Zolnikov before read my article! many people wrote some thread for Pavel for some source code of bands objects in VB because there are many problem in converting this source code from C# to Vb ! im a VB programmer and when i write a new version of this toolbar in VB , i decide to put it in the Code Project for Other people that search for it later ;).
Some source code of IE toolbar in VB.net
make a refrence of bandobject.dll for your form
Imports System
Imports System.ComponentModel
Imports
System.Windows.Forms
Imports BandObjectLib
Imports
System.Runtime.InteropServices
<Guid("AE07101B-46D4-4a98-AF68-0333EA26E113"),
_
BandObjectAttribute("Shokouh Bar", BandObjectStyle.Horizontal Or
BandObjectStyle.ExplorerToolbar Or BandObjectStyle.TaskbarToolBar,
HelpText:="Shows bar that says hello.")> _
Public Class
SampleBars
Inherits BandObject
this application make a Persian text box for an online dictionary too
,
Public Function e2f(ByVal key As Integer, ByVal shift As
Boolean) As String
Try
Dim str As
String
str
=
Chr(key)
If shift =
False
Then
Dim fa() As String = {"ض", "ص", "ث", "ق", "ف", "غ", "ع", "ه", "خ", "ح", "ج",
"چ", "ش", "س", "ي", "ب", "ل", "ا", "ت", "ن", "م", "ک", "گ", "ظ", "ط", "ز", "ر",
"ذ", "د", "ئ", "و", "پ", "ژ", "ؤ", "
"}
Dim en() As String = {"Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P",
Chr(219), Chr(221), "A", "S", "D", "F", "G", "H", "J", "K", "L", Chr(186),
Chr(222), "Z", "X", "C", "V", "B", "N", "M", Chr(188), Chr(192), Chr(220),
"<", "
"}
If System.Array.IndexOf(en, str) > -1
Then
e2f = fa.GetValue(System.Array.IndexOf(en,
str))
End If
ElseIf shift = True
Then
Dim fa() As String = {"ض", "ص", "ث", "ق", "ف", "غ", "ع", "ه", "خ", "ح", "ج",
"چ", "ش", "س", "ي", "ب", "ل", "ا", "ت", "ن", "م", "ک", "گ", "ظ", "ط", "ز", "ر",
"ذ", "د", "ئ", "ؤ", "پ", "ژ", "ؤ", "
"}
Dim en() As String = {"Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P",
Chr(219), Chr(221), "A", "S", "D", "F", "G", "H", "J", "K", "L", Chr(186),
Chr(222), "Z", "X", "C", "V", "B", "N", "M", Chr(188), Chr(192), Chr(220),
"<", "
"}
If System.Array.IndexOf(en, str) > -1
Then
e2f = fa.GetValue(System.Array.IndexOf(en,
str))
End If
End
If
Catch ex As Exception
End Try
End Function
Please after unzipping the source file, open " Register/register.vcproj " in the notepad and replace the path of samplebars.dll whth your own path
And at last , please visit of my website , if you want to support a global movement for peace : www.BlueAppleWorld.com
enjoy it ;)