vb.net

Changing styling of DataGridViewComboBoxCell from DropDownList to DropDown?

(This question is narrower in scope than this question I asked earlier.) Say I have a DataGridViewComboBoxColumn, and want to switch the style of the ComboBox control between DropDownList and DropDown (mainly for the text field editing capability). I'd like to do this on a row-by-row basis (at the DataGridViewComboBoxCell level). How ...

Drag file and reveal text - VB.NET

Hey guys, How can I drag a file into a textbox, and then it will show the directory of that file. It seems pretty simple, since its a drag and drop kind of thing. Thanks ...

How to catch events on form from class library (.dll)?

How to get events from dll? Yeah, but i dont know how use addhandler in a funtion. I'm stuck with that. ...

How to declare events on class library (dll) and catch them on form?

I need set events on a class library and catch them in an form. For example, I run a sub in the dll and I need "receive" the event that the sub in the class is running. The dll is creted by me in vb, but i don't know how raise events on it to be catched in the form. Please an example. ...

add images to listbox (visual basic)

I have sets of web hosted images that I need my user to be able to select 1 from each. I thought a listbox would work for this, but I can't figure out add an image to one. Is this possible? better way of doing this? I am using the latest free vb. ...

Regex for extracting second level domain from FQDN?

I can't figure this out. I need to extract the second level domain from a FQDN. For example, all of these need to return "example.com": example.com foo.example.com bar.foo.example.com example.com:8080 foo.example.com:8080 bar.foo.example.com:8080 Here's what I have so far: Dim host = Request.Headers("Host") Dim pattern As ...

Data type mismatch in criteria expression

I have one porject in VB.NET with Ms Access As Backend...While inserting data into table there is no error at query and Data Type Error,but sometime OleDB Exception occurs Error is"Data type mismatch in criteria expression." the query is .... Dim cmdstr1 As String = "" Dim constr As String = "" Dim sqlQuery As String =...

ASP.NET DataTable output problem

I can't for the life of me work out what I am doing wrong here, despite much searching on SO/Google. Basically I have a simple DataTable which is held in ViewState and adjusted during postbacks. When I try to write out the values, it is just an empty string. Please find below an abbreviated example of what I have - the output in this ca...

ASP.NET dynamic Command Button event not firing

I'm trying to create Command Buttons dynamically, but clicking the button in question doesn't seem to raise the corresponding CommandButton_Click event. I noticed that in the examples on SO a property is set for Button.OnCommand as well as the CommandName and CommandArgument but it isn't an option in intellisense. So the question is, wh...

Visual FoxPro and VS2008 do not show all DBF records. A separate build does.

Hi, I am working on a project in Visual Studio 2008 (in vb.net). The app needs to import data from a Visual FoxPro database (dbc file). Do not ask why FoxPro. It needs to be vfp and the database is updated daily by another application; therefore, I cannot use any other database format. I connect to the database through OleDb FoxPro dri...

Access to Path Denied - Vb.Net

Hey guys, I have this small file search engine here made in VB.NET: ListBox1.Items.Clear() ListBox3.Items.Clear() ChDir("C:\") Try For Each foundFile As String In My.Computer.FileSystem.GetFiles( _ My.Computer.FileSystem.CurrentDirectory, _ FileIO.SearchOption.SearchAllSubDirectories, Te...

Instantiating TransactionScope returns null

I have some VB.NET code that creates a TransactionScope instance: LoggingUtility.LogDebug("UpdateCallTable", "SatComCallDataImporter", "About to associate call data with contracts") Using ts = New TransactionScope() LoggingUtility.LogDebug("UpdateCallTable", "SatComCallDataImporter", "Getting all unimported SatCom calls") My appli...

How to design and develop a web page in asp.net using vb.net?

Using VB.NET AND ASP.NET Am new to web design and development, I want to know how to design and develop a web page using vb.net and asp.net. I need a link of samples and help sites for developing a web page. ...

How to display a next day date?

Using VB.NET Using DatagridView, In a Datagrid View values are displaying like this ID Date 001 23/02/2009 001 24/02/2009 001 25/02/2009 I want to display a date in a textbox after 25/02/2009 I Used a sql query for getting a next date Select CONVERT(CHAR(10), DATEADD(dd, 1, MAX(SDate)), 103) AS SDate from tb_Sched_Add the abo...

How to ask the user for confirmation of an action with a popup box?

I'm currently coding a button which will delete a record from a database if clicked. However, I want some sort of confirmation after they click it so there are no accidents. I was imagining a popup box that tells them they are about to delete this record with two buttons cancel and OK. If cancelled, nothing happens, but if OK is pressed,...

Can't get Linq to NHibernate to work

Hi all, I'm struggling with getting Linq To NHibernate to work. I have referenced NHibernate, NHibernate.Linq and NHibernate.ByteCode.Castle . Also I have all other dependencies in the same folder. Code / Error message: Public Function GetProjectsByName(ByVal ProjectName As String) As List(Of Project) Return (From x In _session....

Converting Linq to XML result to generic list in VB.Net. Odd error.

I have a function that works great in C# that I'm converting to VB.Net. I'm having an issue converting the result set to a generic list in VB.net. The code: Public Function GetCategories() As List(Of Category) Dim xmlDoc As XDocument = XDocument.Load("http://my_xml_api_url.com") Dim categories = (From category In xmlDoc.Descendan...

Dynamic variables in linq select statement

I have a listbox that is dynamically filled by certain values depending on what table has been selected from another list box. Once a value is selected, it is being graphed vs a date & time range. With my ignorance of linq: depending on what value is selected, the linq to sql statement I need to create to grab data from my database is di...

Binding a specific DataRow to a ComboBox?

I have Datatable with two Rows, and on the form I have two Combox Boxes - I want to bind comboBox1 to DataRow 1 and ComboBox2 to DataRow 2. How do I do this? ...

Index was out of bounds. For Loops and Arrays

I'm trying to create two arrays filled with a set of strings from twos tables in a database and then compare them. For example (array1[0]=1101 and array2[0]=0110). If the both respective characters =1 then perform an action. But when I run this code I receive the error Index was outside the bounds of the array. System.IndexOutOfRangeExce...