vb.net

Popular VB.Net forums?

Hello For those of you hardcore VB.Net developpers, what forums would your recommend to ask VB.Net-related questions? Google returned the following, but there might others I should know about: http://www.vbforums.com http://www.vbdotnetforums.com/ http://www.xtremevbtalk.com/ Thank you Edit: For those interested, here are some sug...

Upload file - Progress Bar?

Hi, I'm trying out uploading of files from local computer to a server and I'm using these few lines of code: My.Computer.Network.UploadFile("C:\Temp\test.mp3", "192.168.1.2\test", "", "", True, 500) This does exactly that and the "True" in the above string shows a progressbar in its own window. I would like for that progressbar to dis...

Arrays in UserDefinedFunctions?

I created a User Defined Function with VB.NET and want to use that function in SQLServer. Everything seems to work fine. Now I want to use an array as parameter. Is it possible? Example of my test method (without parameters): Partial Public Class UserDefinedFunctions <Microsoft.SqlServer.Server.SqlFunction()> _ Public Shared ...

How to set username and password for particular days?

Using VB.NET and SQL Server 2005 In my software I am using login page with UserName and Password. Suppose I am setting a username and password work for 20 days. After 20 days, when I try to login in software, the software should not to allow to login. Is possible to make a SQL query or VB.NET code. Can any one provide a sample code o...

Are there BDD/TDD tools for developing in VB.NET?

I am responsible for rewriting an internal tool for my company. I am currently reworking the most time consuming step to run faster which should give me time to re-think the design of the application for a full rewrite as the interstitial version will meet the current needs. I really want to take this opportunity to implement this code...

Translating vbscript string to c# string

Ok I have a vbscript string in a wsf file as below: Dim strTransData = "1,1,2,123457,1,20051012093000" & vbCrLf & _ "2,1" & vbCrLf & _ "2,2" & vbCrLf & _ "2,3" & vbCrLf & _ "3,""5449000000996"",0,3,39" & vbCrLf & _ "3,"""",100,1,500" & vbCrLf & _ "4,0,200,""""" What I need to do is convert this string to...

Error 2 'If', 'ElseIf', 'Else', 'End If', 'Const', or 'Region' expected

I've made some function that generates an email template. Code it generates is pure HTML with CSS. Problem is compiler does this odd error and highlights each time '#' sign appears which is needed to define colors in CSS. I did try to change '#' to '/pound/' and then string.Replace() on RETURN but no luck. I'm more into C# so there i can...

upgrade vb.net 2005 to 2008 and now debug will not work

I've upgraded a windows form app from vb.net 2005 to 2008. I've gone into the project and told the debug to point to bin\Debug and active to point to bin\Release. Now when i change the mode to active, it puts the files in the release folder. when i change it to debug, the files are not put into the debug folder. I think it is putting...

Avoid building all VB.NET projects in a VisualStudio solution

We create a class library and ship C# and VB.NET examples. I have a solution of 60 C# projects. If I make an edit to one of them, Visual Studio only builds the changed one. I have an equivalent solution of 60 VB.NET projects. Visual Studio always builds all 60 projects. Why? Is there a way to force Visual Studio to behave like it does...

Problem with databinding manual writevalue in .net winforms

If I turn off automatic updating of a binding data source by setting DataSourceUpdateMode = Never and then use a button to update the whole lot (using binding.WriteValue), a problem occurs - Namely, only the first bound control's data source is updated. All other controls are reset back to the original values. This is because when the c...

Use Lambda Expression within ASP.NET MVC View using VB.NET

With ASP.NET MVC 1.0, .NET 3.5 and C# you can easily pass a method a lambda expression that will do a "Response.Write" some content when it's executed within the method: <% Html.SomeExtensionMethod( () => { <% <p>Some page content<p> %> } ) %> The method signature is similar to this: public void SomeExtensionMethod(t...

vb.net: index was out of range error

can someone please help me. why does this return an error: Dim stuff As New System.Collections.ArrayList() Dim i As Integer i = 1 Dim split As String() = temp_string.Split(",") For Each s As String In split If s.Trim() <> "" Then stuff(i) = s i = i + 1 End If Next s the ...

Very long build time in Visual Studio.

I've a solution with 15 projects (14 class libraries and one web application). Each class library has corresponding test project (i.e. if I have MyApp.Services project there exists MyApp.Services.Tests -- using NUnit). Everything is written in VB.NET. The problem is that when VS tries to compile any of *.Tests project it stops responding...

LameShell - Cross threading error / Cannot find lame.exe?

Hi, just has really got me wondering if it's me there's something wrong with or what. In my previous thread I was asking how to connect the progress of lame.exe processing a wav to an mp3 file over to my own progressbar. So I was pointed in the direction of LameShell. So I downloaded this and put it in my own Solution. And I get this e...

How to bind Image field to PictureBox in VB.Net 2008

Hi all, I have a table with image field that I need to bind to System.Windows.Forms.PictureBox, and I need to Load new images o Overwrite existing images or delete the image int the field with ADO.NET dataset object. ...

vb.net: clearing all contents of string array

i have this: Dim split As String() = temp_string.Split(",") ''#feed all info into global variables patient_id = split(0) doc_name = split(1) lot__no = split(2) patient_name = split(3) how do i clear all the contents of split() ? ...

vb.net: extract string from "a123" to "b123"

i have a string that looks like this: sodjfoisdfsdf sdofij sodiosifosf fsdi a123 sdfoi sdofi osdi foi sdofd oi b123 sdfoijsfdoifsdiosfdoifsoifsdofjssfdoji how do i extract everything from a123 to b123? ...

vb.net: can you split a string by a string

for example, can i do this: split = temp_string.Split("<beginning of record>") those of you recommended: split = Regex.Split(temp_string, "< beginning of record >") its not working. its just returning the first char "<" and those of you that recommended: Dim myDelims As String() = New String(){"< beginning of record >"} split = t...

vb.net: finding a position of a string within a string?

is instr used in vb.net for this? ...

vb.net: weird behavior with getting position of string

lot__no is a public string Dim myDelims As String() = New String() {"<beginning of record>"} split = temp_string.Split(myDelims, StringSplitOptions.None) For Each s As String In split If InStr(s, lot__no) <> 0 Then........... all of this code works, except it is not finding lot__no in s for some reason, even thoug...