vb.net

VB.NET Chat Server Error...

Hey guys, I recently got into this article. It makes a chat server and people can connect to it like an AIM. The problem how would I disconnect from the server from the client. Because if I close the client application when its connected to the server it will crash the server as well. Please let me know if anyone has any solutions... T...

handling connection timeout error

Hi sometimes when my server is down or busy, i get error telling "connection timeout" while connecting to MYSQL. but with the error program also crashes. my question is how can i prevent crashing, it would be better to show a msgbox when this happens. (visual basic 2010) here is a screenshot of the error i use this, Dim connStr As S...

how can i use ActiveDirectory

I have an active Directory (window) on the server ..and i want to connect it with my web pages.. this is my vb code: Imports System Imports System.Collections.Generic Imports System.Linq Imports System.Data Imports System.Web Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.DirectoryServices ' cannot be found ' Im...

driver of my sql?

what will I put in this code, in the braces--> (MySQL} Please help I'm not really good at this Dim connectionString As String = "Driver={MySQL};SERVER=localhost;DATABASE=student; ...

how to fix this error?vb.net

Here is the screen shot of the vb.net: http://www.mypicx.com/12132009/ers/ And here is my code: Dim connectionString As String = "Driver={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=my school;" ' Dim conn As New OdbcConnection(connectionString) conn.Open() Dim da As New OdbcDataAdapter("SELECT IDNUMBER, LA...

Is it possible to create a new instance of the Windows Media Player class in VB 2008 code?

I do not want a Windows Media Player control on my form. I am making an alarm clock. I have tried this: Friend WithEvents WindowsMediaPlayer As New Microsoft.Win32. But I do not see a Windows Media Player member. Thank you. I also asked on the MSDN VB Forum. ...

Advantages of vb.net over vb6 for CRUD application development

What are the improvements in vb.net compared to vb6 that make developing such an application easier? ...

VB.NET Read Certain text in a text file

Hey everyone, I want my program to read certain text in a text file. For example if I have a text file that contains the following info.. acc=blah pass=hello I want my vb.net application to get that the account variable is equal to blah, and the password variable is equal to hello. Can anyone tell me how to do this? Thanks ...

Aeroglass and Visual Basic.Net

Hi, are there any tutorials, or, is there simple code to be used to control Aeroglass in VB.NET? I would like to know how to play with various effects and, if possible, how to do the Aeroglass effects done in Paint.NET 3.5. (The inside of the topbar is not straight. ...

asp.net flip string (swap words) between character

Hi all, My scenario is i have a multiline textbox with multiple values e.g. below: firstvalue = secondvalue anothervalue = thisvalue i am looking for a quick and easy scenario to flip the value e.g. below: secondvalue = firstvalue thisvalue = anothervalue Can you help ? Thanks ...

Acessing DLLs in VB.NET

Hi, I'm not that good with VB.NET yet and I'd like to learn about API's and external DLL files. Perhaps someone can post some sample code with explanation/comments or point me to some tutorials. ...

Change ToolTipText display duration

I need to show the tooltips over a datagridview cell and that is currently achived using the tooltiptext of the datagridview cell property. I just need to increase the default duration of time that is tooltip is visible any quick ideas please ...

(VB.NET)Syntax Error in INSERT INTO statement - MICROSOFT JET DATABASE ENGINE

I need help, I developed a simple Access database and I create a VB .Net user interface. I can't INSERT data into the Table here's my sample code... I'm only a beginner in VB.Net i hope you could help me with this one Dim con As New OleDbConnection Dim cmd As New OleDbCommand Dim da As New OleDbDataAdapter Dim ds As New Data...

Changing date format from date field in database.

I am using ASP.NET with SQL Server 2005. My date get saved in the database with data type = "smalldatetime". I am displaying the date value into a text box called txtDate with a Reader...... Dim conn As Data.SqlClient.SqlConnection Dim Comm As Data.SqlClient.SqlCommand Dim reader As Data.SqlClient.SqlDataReader conn =...

Lambda Tutorial and Solving a Lambda-Function

Is it possible to shorten the following function to a lambda expression? Or (to do the trick by myself) what is the best and most understandable for beginners tutorial for lambda in vb.net? Function getit(ByVal wert As Integer, ByVal sk As Integer, ByVal list As List(Of Array)) As String Dim ergebnis As String ergebnis = "Null"...

Excel cell Format Changes in text

Dear Sir, I have use microsoft Excel Sheet ..I've fell different Values in excel sheet there is no problem.. but i've fell some numeric Columns like this (00023785678).. in this columns first zero is not get it.. so i went to change the column in cells format of text.. how to create in Vb.net code.. already i have fell excel sheet ...

Why this ToArray() extension method of IEnumerable throws ArrayTypeMismatchException?

Hello, why the next example throws a System.ArrayTypeMismatchException? New Int16(){4,5,6}.Cast(of UInt16).ToArray() I expected that this line returned a UInt16 array containing 4,5 and 6. Thanks in advance. ...

How do I save updates in a GridView control in VB to an existing XML document?

I have an existing xml document with music playlist information, which is read into a GridView control in Visual Basic. I am now wanting to save any updates in the GridView to that xml document. How can I do this? Private Sub cboUsers_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboUsers.Selec...

Table not getting updated while using LinQ

Hello, I am trying to update a table using LinQ. Though records are getting inserted, for some reason they are not getting updated. what can be possible problem Dim db as new empDataContext Dim emptable as new employee if update then emptable=GetEmp(txtempID.Text) emptable.Name="Test" emptable.Age=11 emptable.City="NYC" else emptable...

GridView SelectedIndexChange with Try Catch Block faulty in 2.0?

I am using ASP.NET 2.0. When i place a TRY CATCH block in my event it always go into the CATCH section, in my case it re-direct the page to Default.aspx. But if I remove the TRY CATCH block the code get's executed fine and it does what it suppose to. Protected Sub gridResults1_SelectedIndexChanged(ByVal sender As Object, ByVal e As Sys...