vb.net

Unable to debug web service project in Visual Studio 2008

I've been assigned a web app written in VB using VStudio.net 2003. I am trying to configure the source on my localhost (VStudio 2008) so I can explore and learn about the current app (before I begin any real changes) and I cannot get debugging working for the web service project(s). Symptom 1: "Unable to automatically step into the ser...

How do I cast a list of an object to a list of an interface that the object implements in VB.net?

I am working in VB.net and have a Class, Foo, that implements an interface, IBar. I have a List of Foo's, but I need to pass a list of IBar's into a function, but I keep getting casting errors, even when I use DirectCast. My code is Class Foo Implements IBar End Class Interface IBar End Interface Sub DoIt(ByVal l As List(Of IBar...

How do i perform a better colorize function?

Duplicate of http://stackoverflow.com/questions/885696/how-do-i-perform-a-better-colorize-function I am using this function in vb2005 to colorize a pixel, however when a user chooses a color >50 i begin to lose detail in the image, any idea how i can fix this? Private badcolor As Color = Color.FromArgb(0, 0, 0, 0) Public Function gra...

How do i dynamically call a function with delegates by passing a string to a background thread in vb2005.net?

How do i dynamically call a function with delegates by passing a string to a background thread in vb2005.net? currently my code is this Public Sub invertImageBK(ByVal image As Bitmap) Dim snxl As System.ComponentModel.BackgroundWorker = createBW() snxl.RunWorkerAsync(New ImageProperties(image.Clone, "invertImage", Nothing)) End...

Advanced level VB.NET Book Recommendation with good Lambda Expressions and LINQ chapters

I'm looking for an advanced level VB.NET book which covers LINQ and Lambda Expressions. Generally I read C# .NET books due to lack of good VB.NET books when it comes to generic .NET Framework related subjects. However Lambda and LINQ is quite different in C# and VB.NET I'm looking for an advanced level VB.NET book on this subject. Any ...

How to cast an object to a nullable of type struct?

In the code base I'm working in there have a method that has the signature Public Sub SetDropDownValue(Of T As Structure)(ByVal target As ListControl, ByVal value As Nullable(Of T)) The method I am writing is passed a parameter of type object. How can I cast the object into something that can be passed into the SetDropDownValue metho...

Performing an inner join

I've trying to do an inner join select statement where I select two fields from a table, and than all the records of a field in a second table that have the same id as the first table. The code looks as follow: Dim conn As OleDbConnection Dim cmd As OleDbCommand Public Sub openDB() rsConn = New ADODB.Connection ...

Comparing arrays in VB.NET

Let me provide a little detail to explain what I'm trying to accomplish before I get into the nuts and bolts of the question. I've got two data sources - one is a SQL Server containing part numbers, descriptions, etc. The other is a CAD system that does not have a database in a traditional sense. What I'm trying to do is read out the ...

CruiseControl .Net Plugin Vb.net Error

I am trying to make my own Labeller plugin for Cruise Control .Net 1.4.3. I have made a class based on another plug in example but I keep getting an error Class 'AssemblyVersionLabeller' must implement 'Function Generate(integrationResult As IIntegrationResult) As String' for interface 'ThoughtWorks.CruiseControl.Core.ILabeller' Here...

How do I use MSHTML on a machine that does not have Visual Studio installed?

I am using mshtml to parse HTML in my ASP.NET-MVC application. Works great on my development machine, which has VS2008 Professional installed. Works great on my staging machine, which has VS Express 2008/WebDev installed. But it throws a FileNotFoundException when trying to load the COM object on the production server, which has no ve...

Setting the focus to a MsgBox object

In my application, a user clicks a "save" button and is then presented with a MsgBox confirmation simply stating "Are you sure you want to save?", or something along those lines. It's been hit or miss, but occasionally, this MsgBox will load behind the browser rather than be the center of attention with focus. How can I stop this from ...

Should I use an interface for Type Codes?

I am working on a project that has several different codes. These codes all basically are used this way: CodeKey Description GetList GetSpecific SetProperties All of my classes implement this. I am hesitent, however, to use an interface because of one problem--the type Codes vary by type. Some are strings, some are integers, some a...

How can I render a graphics for couple of seconds into an existing AVI video file? (.NET)

I have VB.NET application that uses 3rd party component to record a screen video. The component is very simple and does not allow any manipulation with the video. I would like to post-process the created AVI after being recorded and e.g. highlight the mouse cursor with my custom graphics. Any ideas what's easiest? I don't mind buying...

writing sql code in vb.net

hi, I have information entered into a text box on an ASP.net 3.5 page. when i click the submit button i would like this information written to a sql server database. Can someone please tell me what I need to do to accomplish this. The end-user should not see anything. I am using visual web developer 2008. the event handling code is pl...

Label size changes

I have a Label, whose content is displayed by a while loop. when i display a text in label, it displays correctly. sometime minutes, the same text displayed in the same label, and the size of the text in the control changes. Here is the code : //Form_Load : Thread t = new Thread(displaySentences); t.Start(); //display sentences: voi...

Are there any good VB/C# x86 disassembler libraries?

I'm looking for a library that will disassemble x86 code into some sort of object model that I can then use to write routines that analyze the code. I'm not interested in a library that converts x86 code to text disassembly--I've found more than a few of those, but they're not that useful since I want to do some work on top of the code t...

Datalist not retaining values on postback

I have a datalist control that is not retaining it values during postback when the control causing the postback is outside of the update panel that the Datalist resides in. I have verified that viewstate is on for that usercontrol as well as all its parent controls. My basic situation is that I have a Datalist that contains a user co...

better way of linq multiple joins?

Hello, Here is what I am trying to do: I have three tables, manifest, details and billingJournal for each manifest there are details and may be a billingJournal entry or not, if there is and it has the field recordType = 1 then billingJournal.amount is the billing amount and I need it in my grid also. I currently am doing a two step ...

Implementing copy, cut and paste

I want to implement copy, cut and paste in my drawing program (copy part of an image that is selected) I don't know how to start Any Ideas? ...

Action(Of T) in Visual Basic in List(Of T).ForEach

I have searched high and low for documentation on how to use this feature. While the loop I could write would be simple and take no time, I really would like to learn how to use this. Basically I have a class, say, Widget, with a Save() sub that returns nothing. So: Dim w as New Widget() w.Save() basically saves the widget. Now let'...