vb.net

I'm looking for some good object oriented books

I'm looking for some good quality OO books, if any exist for VB .Net, that'd be awesome. Have you read anything that you would recommend? ...

Send SMS from a PC using VB.NET?

hai how to send sms with sender name instead of phone number using the AT Command sets in vb.net 2005. is this is possible give idea to me. thanks ...

Create Image file (using C# or VB.NET) from MS Access OLE Object column

An OLE Object column contains images but the image type (jpg/gif/tiff) is unknown. These images need to be extracted from the DB and saved to disk. The application is primarily using VB.NET but C# examples are welcome too. thanks Rahul ...

Project nearing completion. Time to begin testing. Which methods are feasible towards the end of the development cycle?

Let's assume one joins a project near the end of its development cycle. The project has been passed on across many teams and has been an overall free-for-all with no testing whatsoever taking place along the whole time. The other members on this team have no knowledge of testing (shame!) and unit testing each method seems infeasible at...

Is there a better way to get visual studio to ignore try/catch in debug mode

I want the designer to catch the error when I am debugging and I want the user to see my friendly message if an error occurs for them. I know I can acomplish this with the following: #If Debug=False Then Try #End If 'some code here #If Debug=False Then Catch ex as exception Messagebox.Show("Errors suck") End Try #End If I...

VB.net Save File Dialogue error - Could not find special directory 'Desktop'

I have a fairly straight forward peice of code that just tries to set the default saved directory for a standard .net save dialogue to a specific folder. If that folder doesn't exist, it sets it to the desktop. This works fine for everyone but one user who is getting the following error: Could not find special directory 'Desktop' Ho...

How can I use VB.NET to execute a batch file on another computer?

In vb.net 2008 I want to execute a batch file that resides on another computer. There is no error, but nothing happens. Here is the code: Dim pStart As New System.Diagnostics.Process Dim startInfo As New System.Diagnostics.ProcessStartInfo(serverpath & "\file.bat") startInfo.RedirectStandardOutput = True startInfo.WindowStyle = Process...

CommandBehavior.SingleRow causing DB connection to remain open?

Recently I was working on a project in VB.NET, and I was encountering a mysterious problem with some of the DB connections. This was a project that I inherited from someone else and they had used something like this: Dim reader As SqlDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection And CommandBehavior.SingleRow) //a...

Add a space inside of a cell of a gridview

I have a gridview and I add some buttons programmatically to this grid. I have an edit and delete button right next to eachother and I simply want to put a space between them programmatically. Any idea how to do that? Here is the code to add the buttons. For i As Integer = 0 To GridView1.Rows.Count - 1 btnedit.ImageUrl = "\i...

Using a user control in a base page class

I have a base page class that inherits from Page. We'll call it SpiffyPage. I also have a user control called SpiffyControl. I then have an aspx page, ViewSpiffyStuff.aspx, that inherits from SpiffyPage. On page load, the SpiffyPage class is supposed to inject a SpiffyControl into the aspx page. The problem is that SpiffyControl is ...

No Access to an mdb database file after copying the file

Hi, I have the following code where I make an copy of my database that I use. the code executes 100% but the problem I have is I'm not able to access my database afterward.I get a "Cannot start your application. The workgroup information file is missing or opened exclusively by another user." and so if I restart the application it all w...

How can I identify which control I am in (vb.net cf)

Hello I have an issue with dynamic, runtime controls. I create a group of controls per record to display on a form. I add the record ID as a tag on each of the controls to identify which record they belong to. While rCONT.Read Dim txtphome As New TextBox txtphome.Name = "phone" + rCONT.Item("pcontID").ToString txtphom...

Live View with Canon EDSDK 2.5.2 VB.NET

I am trying to do 1 of two things, preference number 1: Turn on the Live View using VB.NET and the Canon EDSDK 2.5.2 and render the live output in a Windows Forms application. Currently I am trying to put it to a picture box; however, I am open to suggestions for sure. The second option would be to at least turn on the Live View and h...

Why does the VB.net compiler crash after I move a project?

I'm migrating data from an old laptop to a new laptop, including some vb.net projects in visual studio 2008. But when I try to open some of them on the new laptop, I quickly get a dialog stating that the vb compiler has crashed and asking me if I want to close, debug, or check online for solutions. Visual studio then, frustratingly, clos...

Vb.net How can I hide this variable from the rest of the class?

Public Class frmMain Private p_dlgAdd As frmAdd = Nothing Public ReadOnly Property _dlgAdd As frmAdd Get If p_dlgAdd Is Nothing Then p_dlgAdd = New frmAdd() End If Return p_dlgAdd End Get End Property Public Sub DoStuff() ''// Should not touch p_d...

Passing Hidden Variables in Vb.net

I want to pass a few variables to another page. Currently I'm using response.redirect and passing the variables in the url. I'm not really interested in using Session Variables. Is there a way to pass hidden variables in .NET to a completely different form? ...

LogonUser API to authenticate a user in VB.Net

I am having a problem using LogonUser from vb.net to authenticate a user. I am using the LogonType of "LOGON32_LOGON_NETWORK" (3). The documentation specifies to use this option for simple authentication and that it does not cache credentials. The problem I am having is if a user has just changed their password, they can login using e...

List of All Countries in any Language?

Hey all, I've got a bit of a dilemma where I need a list of all the country names in German. I can get this info for English using the following code but I'm not sure how to do it for German. Any ideas? Dim countries As Generic.List(Of String) = New Generic.List(Of String) For Each ci As Globalization.CultureInfo In Globalizati...

How to get a date field from MM/dd/yyyy to yyyy/MM/dd in vb.net.

Hi, I need to get a date field from MM/dd/yyyy to yyyy/MM/dd in vb.net but it should still be a date field afterward so that I can match it against a date in a database. At the moment all I'm managing to do is to change it to a string in that format. I tried this type of code which also did not work. DateTime.Parse(yourDataAsAStrin...

Detect if user is in a group

How do I detect if an arbitrary user is an administrator on a machine? I have the user's domain and username but not password. The user is NOT the currently logged in user, so I can't just use WindowsIdentity.GetCurrent. ...