vb.net

Is there a difference between declaring and constructing a value type object?

I've been working in .NET for some time now, but occasionally I still get confused by a disparity between the framework and my prior experience in C++. In .NET, all objects are either value types or reference types. Reference types are allocated on the heap while value types are allocated on the stack (in the current CLR implementation,...

Unattended application best practice question

We have an unattended app w/o a user interface that is is periodically run. It is a VB.NET app. Instead of it being developed as a service, or a formless Windows application, it was developed with a form and all the code was placed in the form_load logic, with an "END" statement as the last line of code to terminate the program. Other ...

VB.NET Preprocessor Directives

Why doesn't #IF Not DEBUG work the way I'd expect in VB.NET? #If DEBUG Then Console.WriteLine("Debug") #End If #If Not DEBUG Then Console.WriteLine("Not Debug") #End If #If DEBUG = False Then Console.WriteLine("Not Debug") #End If ' Outputs: Debug, Not Debug But, a manually set const does: #Const D = True #If D Then Con...

Binding problem which drives me crazy

Hello, I (and other programmers from another forum) have been trying to solve a binding problem for a few days. No one could help... Will anyone here be able to help me ? Apparently, the problem seems quite simple but when you dive in it, trust me, you burn some neurons... Here it is : I've created a test project which reproduces the pro...

Updating a DataGridView bound to a changing source without interrupting the user

i have a DataGridView in vb.net that's bound to a SQL server table. The table is being updated by another program. i use a timer that fills the table adapter and merge that data into the existing dataset, but this action has a bunch of UI repercussions. How can i make sure this update affects the user as little as possible? Mostly i'm...

Where can I find a list of .NET unicode (wide) functions?

I would like to get a list of the VB.net/C# "wide" functions for unicode - i.e. AscW, ChrW, MessageBoxW, etc. Is there a list of these somewhere? ...

Beginner: How do datalists work in asp.net/vb.net?

I'm very new to asp.net and I have a general question about datalists. I was able to get this to work, but I don't understand how really. I think I need someone to give me the "theory" on this. So first I connect to the database: Dim MyConnection As SqlConnection MyConnection = New SqlConnection("myconnectionstring=workingfine") Dim DS...

Custom SNMP Trap Implementation in .Net

I need to create a monitoring mechanism using SNMP (in .Net). I think we'll be using an nsoftware component to handle most of the work. It appears we must use 'traps' to communicate from the agent to the server. We'll have a number of different traps and various information detailing each trap. What is the best way to implement cust...

VB.NET List(Of T) - Can I use it to hold items of several types?

Assuming a base type of "Message"... Public Class Message Public ID As Int64 Public Text As String Public MessageType as String End Class ...and then two derived classes... Public Class PhoneMessage Inherits Message Public MessageLength As Int64 End Class Public Class MailMessage Inherits Message Public Postage ...

How do I return a value to a sqldatareader if value is null?

I am currently using a sql data reader (in vb.net) to extract an article object via a stored proc from a SQL Server 2008 database. Part of this object includes the two properties shown below: theArticle.Truthfulness = ((myReader.GetInt32(myReader.GetOrdinal("Truthfulness")))) theArticle.Relevance = ((myReader.GetInt32(myReader.GetOrdina...

Making Textbox type into a textbox?

Hi, I'm a noob to VB.NET and I was wondering how to make something you type into a textbox on the application type that text into a website textbox and submit whats in the textbox by pressing a button? I am using visual studio 2008. ...

ASP.Net Error - Unable to cast object of type 'System.String' to type 'System.Data.DataTable'.

I get the below error Unable to cast object of type 'System.String' to type 'System.Data.DataTable'. This is the code I'm using Dim str As String = String.Empty If (Session("Brief") IsNot Nothing) Then Dim dt As DataTable = Session("Brief") If (dt.Rows.Count > 0) Then For Each dr As DataRow In dt.Rows...

Which number cast is a registry Dword in vb?

Which number cast is a registry Dword in vb based on its minimum and max values? I am trying to build an editor that can read and edit registry dumps ...

delete from gridview using stored procedure

Hi i have a gridview, linked to a sqldatasource. I have added a stored procedure to delete from multiple tables, and then enabled deleting on the gridviews smart tag. When i click the delete button i get an error message, "Object must implement IConvertible". I read that it is a problem passing the parameter to the stored procedure, pos...

WCF Service Not Returning Current Values?

I am using VB.NET, 3.5 Framework. I created a WCF Service running as a console application. It is doing event listening for my workflow engine. The second application I am trying to do is a WinForm that can monitor the service and return me back the current states of the engine's workers. I am able to connect to the service fine, and ...

How long dose it take to analysis, design and program a CMS using ASP.NET ?

Hi, I'm a student and I have to choose a final year project for my diploma in computer programming. I intend to choose developing a Web Content Management System using asp.net with VB.net 2008 but I'm not sure about how long it takes to program such system. Is 4 months enough for developing such system? This 4 months is the duration of ...

VB.NET project upgrade VS2005 to VS2008

Hello, I have a VB.NET 2.0 project developed using VS2005 Free Edition and I am considering to upgrade it to VS2008 FE, mainly because I have problems once per year, whenever my Temporary Certificate expires. I was wondering if you can point to some resources describing in what parts of the code I should pay attention after the upgrade...

VNC server & multiclient in vb.net

I want to create an application that acts as a vnc client which is connected to multiple servers at once. First and foremost, how do I access the VNC protocol in vb.net (make a client/server, output the display etc)? Second, how can a single client connect to multiple servers? Thanks for the help! I take it there are no VncServer or Vnc...

Data confusion - Selecting data in one DataGridView based on selection in another

This probably isn't the best way to do what I want, but I can't think of anything else to try... NB: I'm using Visual Basic.NET My form has 2 DataGridView controls. One of these is bound to a DataSet, the other isn't visible - at least not until the user selects a uniqueidentifier cell in the 1st grid. When the user makes this selecti...

2 Resultsets in Datareader

Hi, Is it possible to store more than 2 resultsets in Datareader?I have different methods which returns datareader,can i store resultsets of them in the same datareader? (I use vs 2008 ) ...