
Heike
Avatar/Signature-
Posts
56 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Heike
-
Within my application some things should be logged, e. g. what's the user doing, successful export of data, unsuccessful export of data, etc. My collegue told me to use NLog by SourceForge. But unfortunately I don't really understand how to use it. Can anyone give me an example??? Thanks...
-
I know I can set the selected index by Me.lvBenutzer.Items(mintIndex).Selected = True. But maybe it is an index whose item is not visible because may listview has so many entries. How can I scroll down automatically? I thought, TopItem may help, but it's a readonly property.
-
This is, what I really want: I have a DELETE-Statement and then some INSERT-Statements. If one of the INSERT-Statements fails, a rollback should undo everything, so that my deleted data record stays there (isn't deleted). Everything I tried, didn't work. Therefore I tried the following: objTrans = OleDbConnection_SYSTEM.BeginTransaction() objDBCommand.Connection = OleDbConnection_SYSTEM objDBCommand.CommandText = "UPDATE ..." objDBCommand.Transaction = objTrans With objDBCommand 'Connection pruefen If objIBS_QueryShare.blnOpenConnection(.Connection()) Then objDBCommand.ExecuteNonQuery() End If End With objTrans.Rollback() But: despite of ROLLBACK I can see the changed data record. As database I use DB2 and I use an OLEDB driver. Any idea what maybe wrong? Thanks.
-
Actually we use VSS. CheckIn and CheckOut work fine. But now we need the following: we have a version, that our customers can use. In the meantime we develop new things. But maybe we have to make changes in the customer-version. Such a workflow isn't possible within VSS. A collegue told me we may use cvs. But I'm not sure, if cvs works with Visual Basic .Net. Does anyone have any experience??
-
I think the interop.office.dll came automatically when I added the reference to word.
-
Yes of course that would be the way. But: I have multiple threads. In one thread a DataReader is opened. Now it may be that this thread is aborted and though the DataReader isn't closed. Then I can get the error.
-
Unfortunately I have no real idea... Maybe it's because you only reference to the office.dll and not to the interop.office.dll?! Why do you generate a dll? My AddIn is a exe?! Sorry....
-
I'm not sure if I can really help you, but I'll try... First here is an extract from my references: Office - Path = C:\WINNT\Microsoft.NET\Framework\v1.1.4322\Office.dll Office1 - Path = D:\VisualBasic\BOSS_IBS_Addin\obj\Interop.Office.dll Word - Path = D:\VisualBasic\BOSS_IBS_Addin\obj\Interop.Word.dll How did you "put" it on the other computer (the one where your addin doesn't work)? I do it by installing it. You can see the dependencies within my setup in the gif which I will attach. Hope that helps?!
-
In my application I have to execute several SQL statements. Therefore in the beginning I open a connection and in the end (when finishing my application) I close it. Now, in some cases, I get the error message "There is already an open DataReader associated with this connection which must be closed first." My question is: how can I determine if there is an open DataReader? I don't want to open and close my connection each time I execute an SQL statement because I think that would be bad to my performance. Thanks in advance.
-
Help!!!!!!! Until Friday everything worked fine. Today, nothing seems to work. I'm using GetObject: Dim objWordInstance As Word.Application objWordInstance = GetObject(, "Word.Application") Unfortunately after this objWordInstance is nothing even if I can see, that there is an instance of word. What might be wrong???
-
I have developed a COM AddIn. Now I want it to be saved in a different template, not in the normal.dot because even if I only start word and close it without doing anything, my normal.dot will be saved. Any idea how to to it?
-
I have just created my own control. I know how to include it into my toolbox. But I want my control to have a specific icon in the toolbox. How can I do it?
-
I am developing a Com AddIn for Word using VB.NET It works - but it is very slow. Does anyone have some experience in developing COM Addins? Where must I implement functionality like addin a commandbar with commandbarbuttons or verify something? I implemented it within the OnConnection but then every start of word takes ages.
-
No, my problem is not the waiting time. Because I only read 25 records a time, it is fast enough. My problem is that I seem to use the scroll event the wrong way or something like that. I am not working with SQL Server 2000; I work with an iSeries.
-
I have a datagrid with its DataSource set to a dataset. The first time the user clicks on the button "show" 25 records are read. Now I need the following functionality: If the user scrolls down and the last record is reached, the next 25 records should be read. This is how I tried to do it: Private Sub grdDataGrid_Scroll(...) Handles grdDataGrid.Scroll Dim intShowAnzahl As Integer Try intShowAnzahl = dgcTopLeftVisibleCell.RowNumber + Me.grdDataGrid.VisibleRowCount If intShowAnzahl = intSatzAnzahl Then DataGridLoadNext() End If Catch ex As Exception ErrorMessage(...) End Try End Sub Private Sub DataGridLoadNext(Optional ByVal blnSetPoint As Boolean = False) Dim intNewAnz As Integer Dim intAktAnz As Integer Try If mblnFirst Then mblnFirst = False DataGridLoad() Else If intSatzAnzahl > 0 And intSatzAnzahl < objIBS_Query.lngMaxReadRecord Then blnSatzAnzahlEnde = True End If If blnSatzAnzahlEnde = False Then Me.Cursor = Windows.Forms.Cursors.WaitCursor intAktAnz = Me.BindingContext(Me.DseDataSetPatient1, "KHSPET0").Count intSatzAnzahl = intAktAnz objIBS_Query.DataAdapterFillWaiting(objIBS_Query.dadDataAdapterPatient, Me.DseDataSetPatient1, intSatzAnzahl, CInt(objIBS_Query.lngMaxReadRecord), "KHSPET0") DataGridFormat() If blnSetPoint = True Then If Me.grdDataGrid.RowCount > 0 Then 'hb130103 poiPointInCell00 = New Point(Me.grdDataGrid.GetCellBounds(0, 0).X + 4, Me.grdDataGrid.GetCellBounds(0, 0).Y + 4) End If End If intNewAnz = Me.BindingContext(Me.DseDataSetPatient1, "KHSPET0").Count If intAktAnz = intNewAnz Then blnSatzAnzahlEnde = True End If If intSatzAnzahl > intNewAnz Then blnSatzAnzahlEnde = True End If intSatzAnzahl = intNewAnz Me.Cursor = Windows.Forms.Cursors.Default Me.grdDataGrid.Refresh() End If End If Catch ex As Exception ErrorMessage(...) Finally End Try End Sub Sometimes this works fine. But sometimes it seems that the scroll event is fired again and again. Or in some other cases I only get an hourglass and nothing happens. Any idea what I may have forgotten?
-
I've following problem: I have a COM AddIn for Word, developped in VB .NET. Within this AddIn some documents can be opened. To those documents the menu "Save as" (in Word) shall be disabled. For the other documents it should be enabled. This is how I do it: Dim objWord As Word.Application objWord = CType(objWordInstance, Word.Application) objWord.CustomizationContext = objWord.ActiveDocument objWord.CommandBars(cstrMenuBar).Controls(cstrMenuDatei).controls(cstrMenuSaveAs).enabled = False That's working fine. Now I want to save and close this document. (It's saved automatically when the user closes it; therefore I'm using the DocumentBeforeClose event). During this procedure I am sometimes asked, if I want to save the document. Just in the beginning of my DocumentBeforeClose I set the enabled-property to true again. Any idea what may be wrong?
-
We developed an AddIn for Word. One of our customers has installed it. But when he wants to use it, he gets the following error message "Setup error failed to load resources from resourcefile, please check your setup" Any idea what's wrong?
-
Simple said I have two programs. One is a EXE and the other is an addin for Word. If the EXE is called, it starts word and uses functions etc. of the addin. Maybe some code may help This is the EXE '[...] Call mAddin.Object.DokumentDazu2(...) mAddin.Object.udtExternCalls.item(GetCurrentProcessID).objExternCall = CType(Me.objExternCall, ExternCall) 'mAddin.Object.objThread.Join() blnAddinCallEnd = False blnAddinCallError = False blnAddinCallEnd = WaitForProcessCallEnd(blnAddinCallError) blnAddinCallEnd = True 'md070503 And this is the addin Public Function DokumentDazu2(....) As String Dim strDatei As String Dim udtExternCall As ExternCall Try Me.blnNewExternCall(intID) udtExternCall = Me.udtExternCalls.Item(intID) If Not udtExternCall Is Nothing Then udtExternCall.blnInParameter = blnVorlageGegeben udtExternCall.strInParameter = strNewBlobKey udtExternCall.intInParameter = intDruckAnzahl System.Threading.Thread.CurrentThread.ApartmentState = System.Threading.ApartmentState.STA udtExternCall.objThread = New Threading.Thread(AddressOf DokumentDazuSTA) udtExternCall.objThread.ApartmentState = System.Threading.ApartmentState.STA udtExternCall.objThread.Name = CStr(intID) udtExternCall.objThread.Priority = ThreadPriority.AboveNormal udtExternCall.objThread.Start() End If Catch ErrorMessage(...) End Try Return strDatei End Function Public Sub DokumentDazuSTA() Dim strDatei As String Dim udtExternCall As ExternCall Dim strThreadName As String Try Call blnCheckApartmentState() strThreadName = System.Threading.Thread.CurrentThread.Name udtExternCall = Me.udtExternCalls.Item(CInt(strThreadName)) objThread = System.Threading.Thread.CurrentThread If Not udtExternCall Is Nothing Then strDatei = mudtSchnittstelle.DokumentDazu(Me, udtExternCall.blnInParameter, udtExternCall.strInParameter, udtExternCall.intInParameter) udtExternCall.strOutParameter = strDatei udtExternCall.strOutParameter2 = udtExternCall.strInParameter udtExternCall.intIDEnd = CInt(strThreadName) udtExternCall.blnWordQuit = objIBS_INIT.udtExternCalls.blnWordQuit If Not udtExternCall.objExternCall Is Nothing Then udtExternCall.objExternCall.strOutParameter = udtExternCall.strOutParameter udtExternCall.objExternCall.strOutParameter2 = udtExternCall.strOutParameter2 udtExternCall.objExternCall.blnWordQuit = udtExternCall.blnWordQuit udtExternCall.objExternCall.intIDEnd = udtExternCall.intIDEnd End If End If Me.udtExternCalls.Delete(CInt(strThreadName)) DoEvent() Catch ErrorMessage(...) End Try End Sub It seems to work, but only on fast computers. I think waiting for the end of the thread started within the addin makes the whole program very slow. I tried a endless loop and thread.join to wait for the end; no difference. Any idea? I read a lot of monitor and mutex etc. but nothing helps.
-
One of our customers needs to install framework 1.1 on a windows NT 4.0 terminal server. In the system requirements I can read "Windows NT 4.0 Terminal Server is not supported". Has anyone ever tried to install it. Can you tell me your experiences?
-
I just read the help for the IsolationLevel . It is said that this enumeration has a FlagsAttribute that allows a bitwise combination of its member values. My question now is simple: how must I do that bitwise combination?
-
I have a form which has a treeview in it. The user can copy data from this treeview by using drag & drop. In recent times I called the form not modal (form.show()). Yesterday I opened it modal (form.showdialog()) and now it seems that drag & drop does not work. Is drag & drop not possible in modal forms or may there be anything else wrong? Thx.
-
Is there some kind of keyboard queue? I am developing a COM AddIn for Word. Now e. g. I press ENTER in one of my forms to start some action. In my code there are some DoEvents and each time this DoEvents is executed and there are still keys in a queue or something like that there is a "pling". Is there a possibility to clear such a keyboard queue if it exists? Or any other idea that may help?
-
I have a datagrid on my form. This is not the original datagrid but is inherited to allow moving columns. The datagrid is bounded to a datasource. It consists of two columns. First it seems like everything works fine. But sometimes I get the error message '200' is not a valid value vor 'value'. 'Value' should be between 'minimum' and 'maximum'. after clicking in the second column. At least I already found out that the number given in the message (in my example 200) is the width of the first column. Has anybody ever seen such an error message or has an idea what may be wrong?
-
I have an AddIn written in VB.Net. This AddIn includes a form with a treeview. Now I want to copy data from this treeview per drag & drop. That works. But after the data has been copied to my word document I want to bring my form back to front. How do I know, that the data has been copied? Thanks
-
I have a datagrid containing two columns. The first column is not editable the second is editable. What I want is, that after loading my form the datagrid has the focus and I can start to enter my data without clicking anywhere. This is how I tried it: Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As IntPtr, ByVal msg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Boolean '[.....] Dim dgc As New DataGridCell(0, 1) Dim dgtb As DataGridTextBoxColumn 'do something Me.grdData.Focus() Me.grdData.CurrentCell = dgc dgtb = CType(Me.grdData.TableStyles(IBS_Vorschau.objDataSetVorschau.strTableName).GridColumnStyles(1), DataGridTextBoxColumn) dgtb.TextBox.Focus() dgtb.TextBox.Select() SendMessage(dgtb.TextBox.Handle, 512, vbNull, vbNull) SendMessage(dgtb.TextBox.Handle, 513, vbNull, vbNull) At least this lets the user move through the cells using the arrow keys. Enter data right from the beginning isn't possible and another problem is, that I have to click twice on my toolbarbuttons. Any idea?