vb.net

Unload even on my form?

I want to run a subroutine to clear some things up when the user exits the application. I tried looking for a Form_Unload event or anything similar, is there a way to do this? I open a database connection on Form_Load, and would like to close it when the user exits the app. Thanks. ...

What is the best way to change the text of a label in a user control?

I have a User Control with a label on it. I have a Master Page that I have dropped the User Control on. I have other .aspx pages that use the master page that has the user control on it. What is the best way to change the text of that label on the user control from the .aspx page? ...

How do I setup a basic VB.NET WinForms application

Hi, I'm want to write a professional application for resale. I need to know how do I setup a WinForms application with effective error handling? ...

VB.NET How iterate through a BindingSource

I have a BindingSource bound to a DataTable. I use the BS Filter and would like to iterate the filtered dataset of the DataTable using the Bindingsource. I know I can do a MoveFirst and the MoveNext and each time using the BS.Position get the correct row in the underlying DataTable. But how do I know when the sets ends? I'm sure there ...

How can I add and remove bytes on from the start of a file?

I'm trying to open an existent file save a bytes in the start of it to later read them. How can I do that? Because the "&" operand isn't working fo this type of data. I'm using Encoding.UTF8.GetBytes("text") to convert info to bytes and then add them. Help Please. ...

Help with vb.et and BindingSource / DataTable/

I have a DataSet.DataTable based on a StoredProcedure. I connect it to a BindingSouce BS = New BindingSource BS.DataSource = DSCustomerPossibleRoutes BS.DataMember = "CustomerPossibleRoute" I then set a filter on the BS BS.Filter = "DayOfWeek=" & CType(DaysDates.DayOfWeek(DateTimePicker2.Value), String) BS.ResetBindings(True) Now I c...

How to open a Bing Maps from vb.net ?

I would like to pass and address to and open Bing Maps from a vb.net app. Anywhere I can find an example of how to do this? ...

Error on encryption/decryption files

When I decrypt an encrypted file; it doesn't have the same size in bytes as the original file and the the hash of the file is different. I get the bytes of the file using File.ReadAllBytes and send to EncryptBytes with the password. Also the same with DecryptBytes. When I receive the bytes encrypted or decrypted i save them using File...

VB.NET HTTP LAG! Trying to make an IM client on my own

Hello there, I have recently developed and finished a software in which works like aim. But here's the problem, the server worked just fine for local friends because they lived only 25 miles from the server, so it was lag-less. But when uploaded to a web host, it lags every time it pings the server. The server is in PHP, so there's no ne...

-One dropdownlist currency converter-

Hi, I wanted to convert my rate field by using one dropdownlist to convert it. Eg, if the dropdownlist selected on japan, when the user select and change to malaysia the rate field will automatically change to malaysia rate from japan rate. Anyone?... Thanks... ...

Moving Rectangle in VB?

It is my understanding and experience that VB.NET does not perform well with moving graphics from point A to point B in a form. How do I draw a rectangle or a line and move it from point A to point B? Is there a reliable way to do this without seeing a black rectangle around the moving object on every frame? I've tried this with bitmap...

vb.net - Search textfile from certain string, read from that point

Hi, this is probably not that hard to do. But I've got two text files. The first has got a list of certain keywords. Each one if these keywords are fed into a combobox. Now, when I choose one of the items from this combobox, I want to search the other textfile for the same keyword and read from that point to the next keyword. And the...

Use vb.net in VBScript

Hi! How to call a function in vb.net DLL from VBScript? I did the following: - I create public class named Class1 in vb.net. I go to Visual Studio 2008 Command Prompt and go to my class dll - C:\Myapp\bin\Debug and type following command tlbexp myDLL.dll after that i get message Assembly exported to C:\Myapp\bin\Debug\myDLL.tlb Aft...

Questions about advanced compiler settings in visual studio Express 2008 express edition

All the information I've found regarding compiler settings is with regards to the full version of VS, which seems to be at odds with the express edition. The first point is, there is no option on the screen to say if I'm setting options for debug or release mode. Now to the questions: (1) The enable optimizations option is checked. Is ...

How to Prevent the conversion of & to & using XmlTextWriter?

The '&' in the text gets escaped and gets converted to & when creating the xml file using XmlTextWriter but i dont want the conversion to take place how to prevent it? Is there any other way besides using WriteRaw func of xmltextwriter? ...

Office 2003 interop problems, interface, method not found.

This problem is making me crazy. Actually I have multiple problems. First one: Why on earth are is there a _Worksheet and a Worksheetinterface in the Excel interop. They both look the same, except for some attributes on the methods. It's confusing! Second of all: my job today is making a VB.NET file more strict, by settings Option ...

Firing 1 usercontrol used for 3 different window at page load with different data

Hi Every one, Iam Divya working as developer. I had some issues. Hope there are many knowledged persons to solve my problem. We are following Model -View -View Model Pattern for WPF Window Project. I have an Window (contains only an XamData Grid) Which is complete User control. This User Control is used in 3 windows(Male Window, ...

Why am I having problems passing argument to or from a FORTRAN DLL from VB.NET

I have a DLL written in fortran that I know works because I am getting it from a working software package that we use daily. I am trying to call it from anything but am having problems i believe with passing the correctly formatted arguments in and out of it, so i decided to try and access it from a VB program. I chose VB because I hav...

Accessing tables from different .mdb files

I need to show a grid of saved projects (compare "orders") in a datagrid, where the projects are saved in an Access 2000 database with a similar schema as follows: ID Name Country_ID Plant_Type 1 'Test' 1 1 2 'Second' 2 2 Let's call the file "Projects.mdb". This is then showed in the data...

Abort a Thread started with Delegate.BeginInvoke

Disclaimer: I know that Thread.Abort is evil. I'm using it as a last resort since some I/O functions (e.g., File.Exists when used on a non-existing network share) block for a large amout of time and do not allow you to specify a timeout. Question: Is it possible to Abort (as in Thread.Abort) a worker thread started using Delegate.BeginI...