vb.net

Use LINQ to omit some entries in the value part of a dictionary and project this into a new dictonary maintaing original keys.

Hi All, I have a generic dictonary which is templated in the following manner: Dictionary<object, IList<ISomeInterface>> dictionary1 = new Dictionary<object, IList<ISomeInterface>>(); If I wanted to omit certain list items against arbitrary keys (that is the items that are in the list contained within the value part of each of t...

Good exercises to transition from coding in VB.NET to C#?

What are some good exercises that an intermediate/advanced VB.NET web programmer should to do gain syntax chops on C#? I imagine some good examples would be: algorithms or project exercises that run the gamut of C# syntax reference material list of the key syntactical differences that VB.NET programmers should be aware of ...

Assignment "=" operator in VB.NET 1.1

I'm "cloning" objects in my code. For instance: objClone = objOriginal My question is: Does the assignment operator in VB.NET 1.1 do a member-by-member copy of the objOriginal to objClone or does objClone simply point as a reference to memory referenced by objOriginal? ...

Dislay MySQL Data in a Label - Vb.Net

Hey guys, I have some code here that connects to my Mysql database. It checks your username and password and if your login was successful and it retrieves the phone number under that account. How would the SQL Query look like for retrieving the phone number once connected? Then how would I be able to display that phone number on a label...

MySQL Query Glitch

I have this MySQL Query glitch in my VB.NET program. Here is the query in VB.NET: "SELECT Points FROM user WHERE Username = '" & UsernameText.Text & "';" It will select the points column from the user table from the Username they entered. When I deploy this it will set the value for points to 0 on their account. What's going wrong? I...

Converting some legacy VB.NET code to C#, what is it doing?

Reference: Public Const COLUMN_MODEL_ORDER As String = MDL_ORDER.ColumnName DataModel.Config.DefaultView is a System.Data.DataView What is this doing and how can I convert it?: Dim ModelOrder As Integer = 1 Dim DataModel As New ProfileDataModel(New DBConnection, Me.ProfileID) If DataModel.Config.DefaultView.Count > 0 Then 'what ...

How to switch between DataGridViewTextBoxCell and DataGridViewComboBoxCell?

I want to have a DataGridView that has two columns. The first column will always be of type DataGridViewComboBoxColumn. Based on the selection in that column, I'd like to be able to change the corresponding cell in the second column to either a DataGridViewComboBoxCell or a DataGridViewTextBoxCell. I'm thinking I just need to make the...

VB.NET Application does not fully close

Hey guys, When I launch my application, and press the "X" button on my app, or my quit button which deploys: me.close It will not fully close the application. Like the instance is still running in Visual Studio or if you go to task manager processes you can still see it there. How would I get this to fully close? Thanks Kevin ...

Add new row to database table from Datagrid

Hi All, I am trying to update a database table from my datagrid using an event handler and ItemCommand. I manage to call the routine and everything is working fine except the text that is inserted into my database is empty. I managed to track this back to the text not being passed from my datagrids footer to the sql parameters. I tried ...

Creating object instances globally

Hi, this is probably something I should know, but I'm puzzled by this. I'm trying to create some objects and being able to access and modify these globally. I tried to create a Public Module and declare a few objects in this. I am able to access these from another sub, but I get an exception error when after building and runing the pro...

Get first file in directory

This is probably pretty basic, but I'm trying to find out how I can find the first file in a directory? For example, if I've got these lines of code Dim di as New IO.DirectoryInfo("C:\Test") Dim aryFi as IO.FileInfo() = di.GetFiles("*.txt") I can see that the aryFi contains a list of all files, but I need only one and I need the ful...

Variation of the (x) button - VB.NET

Hey guys. You know the (x) button on the toolbar of your app? I want to add a pice of code right after the it closes the window. How would I do this? Thanks ...

vb.net DataGridView Uncommitted new row cannot be made invisible.

Hello, I have a DataGridView in my VB.net Form. I need to make some rows invisible based on a value. As there is not GridviewrowdataBound, I am trying to achieve it as shown in the below Code Private Sub DataGridView1_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles Dat...

Reordering of clientIds for controls when deleting a control in ASP.NET

I am keeping track of all of the controls rendered on a form in a dictionary.....Its a very fast and convenient way to getting a rendered control reference given a specific key..... Lets say I go ahead and delete a control which nestles in the middle of a series of 3 controls.... Before I delete the middle control the last control in t...

3-Tier VB.Net Forms vs. Web Based ASP.Net Solution - Which will scale better?

I am on a project helping to analyze the load a VB.Net WinForms application can take. This app has been in production for several years and has many many products on it. We plan to add more products but see the client footprint rapidly increasing. This is contributing the degradation of performance on the system overall. There is dusc...

Sphorium WebDAV Server Framework

Hi all, Does anyone knows how to working with Sphorium WebDAV Server Framework? http://sourceforge.net/projects/webdav/ ...

File.Copy FileNotFoundException reported randomly when it's never true

The code is very simple. If File.Exists(strFileMovingTo) Then File.Delete(strFileMovingTo) If File.Exists(strFileMovingTo) Then Call SendEmail(Globals.EmailInternetTeam, "[email protected]", "Display Jpg Problem", "The file " & strFileMovingTo & " cannot be removed by the file mover(to allow a new file to be moved over)") Return...

Displaying Image from SQL Server in Crystal Reports

Hello, I have couple of images in my SQL SErver 2008 table of which the datatype is image. In my VS.net 2008 project I have a crystal report which is displaying all the fileds from that table. But the image is showing as blank. Any thoughts, How I can make it work? ...

Best way of searching through a DataGridView in VB.NET?

Hi peeps, On my form there is a datagridview that may get upwards to about 70k items depending on how scan happy our customers get. I also have a textbox which allows the user to search the datagridview using the textchanged event. I'm using a select statement with the like clause and filling the dataset. I dont think this will cut i...

ASP.NET with VB. ListBox adding and removing items

Hiya i'm creating a web form and i want a user to be able to make certain selections and then add the selections to a text box or listbox. Basically i want them to be able to type someone name in a text box ... check some check boxes and for it up date either a text for or a list box with the result on button click... e.g. John Smith ...