Answer Questions
AlexM-VB Object instance lookup & lifetime
Hi there, currently still using VB6 but exploring the move to VB.NET. We have a multi tier application with a tier in which we have created object classes representing table records (Flight, Booking, Airstrip, Passenger etc.) Since these objects are referring to each other we need to be aware that we do not create more than one instance in memory for a certain FlightID. Hence we have a "cache" (dictionary) which holds a reference to every i ...Show All
Stefan Dobrev .NET Deployment with COM DLLs
I am using SQLDMO.DLL within my program which makes me include it in my deployment project. I built the deployment project and installed the output MSI and it works. It registers the SQLDMO.DLL (used COMSelfReg) when I install the package and unregisters the said DLL when I uninstall it. But I have a problem when I install and then uninstall this package on a machine with SQL Client Tools installed. The package uninstalls the program and unregis ...Show All
wcns Compiler Problems even though code is sound.
Hi, I'm having a strange problem with Visual Studio 2003 and I'm hoping someone can help. The problem is I'm getting compiler errors even though the code is fine. Here's an example.... This is code from a form I have... Public Class frmGasDiagram Dim udtGasDiagram As clsGasDiagram In some methods of the form I get errors saying the type udtGasDiagram cannot be used as it hasn't been defined, but it is. If I change the ac ...Show All
RikMertens Accessing a running program's ram
I want my program to access a program's ram (when the program is running in memory) so I can debug it explicitly. I know how to edit a file by storing it in a buffer but how would I do this when a program is running. If suggestions or code samples are given, please make sure they are for vb.net and they are explained. Thanks. How you get this offsets Really interesting. In sample you provide about VB Trainer - author already know offs ...Show All
Cha Chunchadatharn How to set the recordset of a classic ADODC (Data control) in .NET
rst = goLists.Facilities 'function returns an open recordset Debug.Print( CStr (rst.Collect( "ID" ))) 'this ensure the recordset is really open! me.adoData.Recordset = rst 'error message occurs here Why does this give an error message saying that I need to initialize using the new keyword (or else check for Null before setting the object) I have tried different variations of syntax, including putting this line first: Me . ...Show All
Lama Karmi Reading Registry Key
I am working on a VB.NET application that can take a computer name and connect to that computer over the server and check several of the local security policies and create a log of what policies are incorrectly set. In a nutshell, it is an automated way of going through a security checklist rather than manually looking at each policy at each computer. I am currently trying to read the "Audit Policies" such as "Audit Policy Chang ...Show All
Daeseong Han ActiveX - error 424
I made a new ActiveX control in VB 6. A very simple one.there is one circle of the original shape control which is called oval_shape.the usercontrol is called math_circle. in the intialize and the resize sections of the usercontrol I do the following stuff: oval_shape.top = 0 oval_shape.left = 0 oval_shape.width = math_circle.width oval_shape.height = math_circle.height when I put the new ActiveX control on anykind of form ...Show All
Yan Y. Multi language application
Hy, I am looking for a convinient way to write a multi language application in vs2005. I know is posible to use .resx files to a project, but I don't want the .exe filte to get to big, so I am looking for a possibility to have separated files for every language and gest copy them in the app.exe directory and the app should use them at runtime to convert itself to the specifig language. If you know links to tutorials or sample code, please l ...Show All
altbrot Invoking DateTimePicker Programmatically
I have a TextBox and a DateTimePicker next to each other on a form. Whenever the user changes the date in the DateTimePicker, I make it show in the TextBox and when they change it in the TextBox, I change it in the DateTimePicker too. I know this is redundant as the DateTimePicker displays the date in its own TextBox, but that's beside the point - this is just a small aspect of a bigger problem. Anyway, what I would like to do is have the ...Show All
bojingo Upgrading from vb6: Dim as New is VERY different
In Vb6, Dim myvar as New MyType would check whether myvar was Nothing at each reference and reinitialise it if neessary. Obviously this isnt the case with Vb.NET, and if the variable has been set to Nothing in the mean time then it will have a value of nothing causing an exception. Anybody got any clever ways of resolving this one (there are quite a lot of instances of this in the app I have been asked to upgrade) It sounds as if t ...Show All
Acid Cool Windows Service application example
Doess anyone have a sample windows service vb.net code A sample that waits and polls values from a SQL Server database Thanks alot! Hi, Here's a sample that goes step by step - but its in C# - this also explains using the Timer class for polling. http://www.codeproject.com/dotnet/simplewindowsservice.asp Another one for VB.NET http://www.freevbcode.com/ShowCode.asp ID=3242 Regards, ...Show All
Suscuaja Insert from Form with textbox for details
Hello, I want to insert data from a form with textboxes for entry of the information. I have a dataset,bindingsource and table adapter on the form and the text boxes are bound. So far I have managed to do a "manual" insert using the following code Me .HospitalTableAdapter.Insert( "1" , Me .NameTextBox.Text, Me .Address1TextBox.Text, Me .Address2TextBox.Text, Me .Address3TextBox.Text, Me .CountyTextBox.Text, Me . ...Show All
Mr.Mel [vb 2005 expr] Killing a copy-dir process
Hi. In my VB 2005 express application I make a copy of one remote directory (connected as a net unit) to my local hard disk with this line: My .Computer.FileSystem.CopyDirectory("F:\namedir1", "C:\namedir1", True ) This works inside a backgroundworker thread. When I cancel the thread, the copy still goes on, especially if the source-directory is big (some Gb). I want to stop immediately the copy, how can I do this Is there a way to know ...Show All
Zach7 How to use unmanaged com dll in VB.NET
How can I use an unmanaged com dll in VB.NET. I used Add Reference to use it in my project but can't seem to get it to work properly: Public Sub AccessDll( ByRef objMyDll As MyDll.IMyDll) Trying the above I get a curly green line under objMyDll with a message that Type of parameter 'objMyDll' is not CLS-Compliant. When I get to the MyDll. the Intellisense shows the Interfaces available. I've tried numerous unclear ...Show All
Lasfargues pierre TextBox BackColor change OnFocus and LostFocus
Hello, Is it possible to extend the TextBox class to include an event where the TextBox changes it's background color on focus and returns it to the default on lost focus Kind regards, Hello, Appreciate your answer. It works perfectly. Would the same solution apply with a form that has, say ten TextBoxes- I mean, repeating the same code for each one of the TextBoxes (TextBox1,....2,...3. etc) Kind regards, ...Show All
