Hi
I am building a large application where we use the combobox feature a
lot.
Its an office addin for office XP.
I am using Visual studio 2003 VB.
In outlook and excel it works perfect all the time, but in Word it
stops work after a randomly amount of time?
(The Event ".Change" does apparently not fire).
Does anyone have some ideas what can cause this problem?
Below are some code snippets from my application.
Any help appriciated.
Kind Regards:
Karsten Markmann
<GuidAttribute("9132AA66-FDA6-4023-BCEB-75BA61D2997C"),
ProgIdAttribute("KiCSystem.Connect")_
Public Class Connect
Implements Extensibility.IDTExtensibility2
Private WithEvents cmbSearchCoveo As CommandBarComboBox
----
cbrNewToolbar = KiCData.hostApp.CommandBars.Add(Name:="KiC LRØ
system 2", Position:=msoBarTop, Temporary:=True)
----
cmbSearchCoveo =
cbrNewToolbar.Controls.Add(Type:=MsoControlType.ms oControlComboBox)
With cmbSearchCoveo
.BeginGroup = True
.Visible = True
.Style = MsoComboStyle.msoComboLabel
.Caption = "Fritekst søgning:"
.TooltipText = "Fritekst søgefelt i KiC systemet.
Søger i alle dokumenter efter det skrevne."
.Tag = "SearchCoveo"
End With
----
Private Sub cmbSearchCoveo_Change(ByVal Ctrl As
Microsoft.Office.Core.CommandBarComboBox) Handles
cmbSearchCoveo.Change
ShowIEURL(HTTPSEARCH & cmbSearchCoveo.Text)
End Sub
--- 3 2191
Hi Karsten_Markmann,
I am building a large application where we use the combobox feature a
lot.
Its an office addin for office XP.
I am using Visual studio 2003 VB.
In outlook and excel it works perfect all the time, but in Word it
stops work after a randomly amount of time?
(The Event ".Change" does apparently not fire).
Does anyone have some ideas what can cause this problem?
Difficult to tell, but it looks like you didn't declare the object
variable for the toolbars and buttons at the class level? If you do
not, they'll eventually be garbage collected.
The other thing to watch out for is that you should assign a unique
string value to the controls' TAG property. Word uses this (with its
MDI UI) to keep track of what window you're currently in.
Cindy Meister
INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
I have tried this now, but still having trouble?
The following is the start of my conect class:
Isn't this what you mean?
I alse have different tags for the buttons.
Option Explicit On
Imports Microsoft.Office.Core
Imports Extensibility
Imports System.Runtime.InteropServices
Imports System.Drawing
Imports System.Windows.Forms
Imports System.IO
<GuidAttribute("9132AA66-FDA6-4023-BCEB-75BA61D2997C"),
ProgIdAttribute("KiCSystem.Connect")_
Public Class Connect
Implements Extensibility.IDTExtensibility2
Private WithEvents cmbSearchCoveo As CommandBarComboBox
Public WithEvents cmdFindKiC As
Microsoft.Office.Core.CommandBarButton
Private WithEvents cmbFindKiC As
Microsoft.Office.Core.CommandBarButton
Private WithEvents cmbSaveEmailKiC As
Microsoft.Office.Core.CommandBarButton
Private WithEvents cmbSkabelonerKiC As
Microsoft.Office.Core.CommandBarButton
Private WithEvents cmbSearchCoveoButton As
Microsoft.Office.Core.CommandBarButton
Private cbrNewToolbarPrivate As CommandBar
-----
Karsten,
I an not (yet) known with using Microsoft.office in VB.Net.
However be aware that an event in a combobox in VB.Net will often result
that he calls himself again (recursive) a good reason that your program
stops because the combobox has eaten all your memory.
Cor
"Karsten_Markmann" <km*@lro.dkschreef in bericht
news:11**********************@o5g2000hsb.googlegro ups.com...
>I have tried this now, but still having trouble?
The following is the start of my conect class:
Isn't this what you mean?
I alse have different tags for the buttons.
Option Explicit On
Imports Microsoft.Office.Core
Imports Extensibility
Imports System.Runtime.InteropServices
Imports System.Drawing
Imports System.Windows.Forms
Imports System.IO
<GuidAttribute("9132AA66-FDA6-4023-BCEB-75BA61D2997C"),
ProgIdAttribute("KiCSystem.Connect")_
Public Class Connect
Implements Extensibility.IDTExtensibility2
Private WithEvents cmbSearchCoveo As CommandBarComboBox
Public WithEvents cmdFindKiC As
Microsoft.Office.Core.CommandBarButton
Private WithEvents cmbFindKiC As
Microsoft.Office.Core.CommandBarButton
Private WithEvents cmbSaveEmailKiC As
Microsoft.Office.Core.CommandBarButton
Private WithEvents cmbSkabelonerKiC As
Microsoft.Office.Core.CommandBarButton
Private WithEvents cmbSearchCoveoButton As
Microsoft.Office.Core.CommandBarButton
Private cbrNewToolbarPrivate As CommandBar
----- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rey |
last post by:
Howdy, all.
Appreciate your help. Have a one to many relation between a client and
visit table.
In the visit subform, I have a visittype and counselor field which are
comboboxes. If I set either field to drop down via Me.dropdown in the
GotFocus event for the field, each time the client record changes the
visittype or counselor field...
|
by: Nicolae Fieraru |
last post by:
Hi All,
I am trying to change the rowsource of a combobox when I click on it. I
played with many events, associated with the form and the combobox, but
still haven't figured out what is the way of doing it.
I have a table with products, tblProducts, some of them are Active while
others are Inactive.
The form shows all the products...
|
by: Zlatko Matiæ |
last post by:
There is a form (single form) and a combobox. I want that current record of
the form is adjusted according to selected value in the combobox. Cuurrent
record should be the same as the value in the combobox.
What is the solution?
Thank you in advance.
|
by: Tamir Khason |
last post by:
Why this does not work???
cb1 - combobox
DataProvider.DataProvider.DS_BringRacks() - DataSet
cb1.DataSource=DataProvider.DataProvider.DS_BringRacks().Tables;
cb1.DisplayMember = "id";
cb1.ValueMember = cb1.DisplayMember;
|
by: perspolis |
last post by:
hi
I manage a double click event in a combo box..
but this event doesn't fire
????
I don't know why??
| |
by: freekedoutfish |
last post by:
Hi. New member here
Im sat at work, pounding my head off the desk because this tiny bit of simple code refuses to work.
The sub is intended to pull data from the "companyname" column in the "cmSelectAllCompanyNames" table, and put all the company names it finds into the "cbFilterCompanyName" combo box.
Now the confusing aspect is this:
...
|
by: Frnak McKenney |
last post by:
Can I use a bound ComboBox for both browsing and editing?
I'm working on a small, standalone database application using Visual
C#.NET 2003 and an Access data file.
In order to keep the number of different screens down to a minimum,
I'm trying to use the same Windows Forms for both browsing and for
updating. This works fine for TextBoxes,...
|
by: tbrown |
last post by:
I have a combobox with items like this: {one,two,three}. The selected
index is 0, so "one" appears in the combobox text. When the user drops
down the list, and selects "two", for example, I modify the Items
collection to be {two,one,three} and now want "two" to appear in the
combobox text. However, the combobox text is now blank. the is...
|
by: ApexData |
last post by:
COMBOBOX REFRESH DILEMMA
' I have been working for hours trying to figure out how to requery a
combobox in a subform, from a Popup form
' that this subform had launched. Basically, I designed a form that
pops up when the user dbl-clicks a combobox.
' This popup form displays the table that the combobox uses. The user
can change the...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |