I have a multi-tier application.
Application A (VB.NET) creates security object B (VB6) which then creates a data access object C which raises an error.
When the data access object is a VB6 object then the error is correctly handled by the security object (B) but when I replace it with a VB.NET...
I have seen this problem in VB.
There appears to be a bug in .NET where the load event is not fired when a form contains ActiveX controls and is displayed using the ShowDialog method.
My workround for this is to show the form and then hide it before the ShowDialog.
1. If the DLL is used by only one .NET application, then it can simply be placed in the same folder as the application itself and the .NET framework will find it.
2. If the DLL is shared by multiple .NET applications it should be placed in the global assembly cache, using gacUtil so that the...
I have now got the code to work by changing the called module to return a datatable rather than a database i.e. by changing the line
return datdataset
to
return datdataset.tables(0)
The documentation says that that SetDataSource requires a dataset and does not mention the possibility of...
Thanks for the feedback.
The report was set up using an ODBC connection to the database. What seems to be happening is that the report is always being populated using this connection rather than the data contained in the dataset that I am passing using SetDataSource.
The code used to display...
Thanks for the suggestion.
Unfortunately the problem is worse than I thought. The sorted dataset I am specifying in SetDatSource is being entirely ignored and what is displaying is the report using the database which I used to originally defined the report.
If I use an ADO Recordset in...
I have a VB.NET DLL which creates an ADO.NET Dataset by executing some SQL which includes an "ORDER BY" clause to ensure data is in the correct sequence. When I look through the Dataset.Tables(0) collection, I can see that the data is indeed sorted correctly. When I use this dataset as...
Thanks for the suggestion Kris,
I have now changed the application to close the form rather than hiding it. This resolves both the problem with the close gadget and the lack of the closed event.
I would still be interested to hear if anyone else has come across these problems.
I have a problem in a VB.NET application where the Closed event is not fired when I used the Close method on a form which has previously been hidden. Simply showing the form again before closing it makes no difference. The form is an MDI parent - I do not know if that is significant.
Also, I...
I have a project with a sub main & two forms (form1 & form2).
the sub main does application.run (x) where x is an instance of form2.
In the load event of form2 there is logic to show form1 as a dialog and if it returns cancel then it does me.close to terminate the application.
This works fine...
My problem appears to be due to the fact that Form2 contains an Activex control. The initialisation of this control stops the CentreParent property functioning correctly.
Has anyone else come across this problem or have any ideas for a workaround?
Glyn.
Thanks for the suggestion. It seems to work in a simple application, but for some reason it does not work in the application I am working on. Form2 appears in various positions near the top left of the screen!
Investigating a little, it appears that if Form1 is an MDI child then Form2 is...
I have a form Form1 which needs to show Form2 centred on itself.
This is achieved in VB6 by setting the StartupPosition property of Form2 to CentreOwner. Form1 simply then uses Form2.show vbModal.
How can I achieve the same result in VB.NET?
Has anyone come across a problem using the ActiveX Listview control (as supplied with VB6) in VB.NET?
I put this listview on a form and execute the following code:
Private Sub Button1_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
Button1.Click
Dim i As...
Is there any way of retrieving assembly attributes in VB.NET code?
I want to be able to retrieve the AssemblyTitle attribute to display it on forms.
Thanks for any help.
Glyn.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.