vb.net

vb.net - backgroundworker & listview.items.add()

Hello, I'm using a vb.net backgroundworker thread for processing and I need to periodically add items to a listview (with multiple columns) during the thread processing. I can easily use the following code for delegating the task to add an item to a listview, but I can't figure out how to additional info to other columns on the same ro...

vb.net - case sensitive/insensitive search text in a string

Hello, I've been using text.indexof() to see if a string is located inside another string, however is it it possible to do a case sensitive/insensitive search option? I've been looking around Google and not having much luck with it. A huge bonus would be if it could count the number of occurrences inside the string! ...

vb.net - lockwindowupdate and backgroundworker

Hello, I've got a bit of a problem, I'm using a backgroundworker to do a lot of processing and it adds items to a listview with: AddListItem(ListView1, listItem) Here is the delegate code to send the command to the listview outside of the thread: Delegate Sub AddListItem_Delegate(ByVal [ListView] As ListView, ByVal [text] As Object)...

Adding Port to Ping

I am using VB.net to ping a domain/IP, using the following code; My.Computer.Network.Ping(Address, 1000) I now want to add a port to the domain/IP - e.g google.co.uk:21 How would I go about this? ...

VB 2010 Express: Text-to-speech

Hi, I'm very confused about how to get TTS working in VB 2010 Express. I read several how-tos, each of them showing how to do TTS in a different way (through System.Speech, adding a reference to Microsoft Speech Object Library, using SAPI etc.). Unfortunately none of them works out-of-the box for me, so I need to install additional packa...

is there a better way to find rows with all column with values?

I need to find rows in resultsets that have every column without null. these resultsets got variable number of columns. currently, the only way that I can think of is creating a view on each resultset and filter this way: select field1, field2, field3, field4, ... from "huge query" where field1 is not null and field2 is no...

Cross thread operation on WinForm controls

Here is my code scenario, In main thread I create panel(s) (based on some configuration), and then in the next step based on the file type (like video, ppt, image...) I create appropriate controls (dynamically) to show on the forms. The creation of the control will be done in separate threads (for each file). After creating the control...

Listview in vb.net

Is it possible to display the contents of a two dimensional array vertically on a form in vb.net using listview, and if so how would I do it? So, if my array is declared as dim myarray (2,10) how would I display the contents vertically in listview. All and any help much apprciated, thank you. ...

How to get my dropdown to default to first row name in table

Edit: more code Dim oControl As New Forms.Control() Using types As New DataSet With oDal .Parameters.Clear() .Execute(sql, types) End With Wi...

My.User.Name vs. My.User.CurrentPrincipal.Identity.Name

I've found that both My.User.Name and My.User.CurrentPrincipal.Identity.Name both return the Windows login ID of the user logged in to the PC. However, is there a difference between the two? Will there ever be a case where they won't return the same value? ...

Grid won't refresh everytime. Can I do a whole window refresh?

How do I create a Javascript method in here that RELOADS the .aspx page, that I can call during one of those other existing methods. <%@ Page Language="VB" Inherits="Core.Web.BaseView(OfLending.Controllers.Workspace.DocumentUploadData)" %> <%@ Import Namespace="Framework.WebControls.Forms" %> <%@ Import Namespace="Framework....

How can I handle property mappings to other domain classes that aren't yet mapped with NHibernate?

I'm working on a project to replace ADO.NET data access logic using NHibernate where we're not able to map the entire domain model at once. This means we'll have domain classes with property mappings to other domain classes that aren't yet mapped with NHibernate. Consider a Person class with an Address property (Address being a domain ...

Use HTTP POST for logging into a website

I'm not sure how to do this as I've never done it before. I've seen some things on google but not sure how to use them in my situation. I want to be able to send a POST to a website ( http://www.ritani.com/salespersons/login ) with login credentials through a web browser control in .NET so I don't have to use a send-key work-around met...

vb.net - vertical toolstrip scrolling

Hello, We have a vertical toolstrip with a few items. Is it possible to scroll the vertical toolstrip with either buttons or else mousedown and move the mouse up/down which would scroll the toolstrip? ...

Winforms Flickering While Drawing Image on Taskbar

Right now I'm drawing a small 16x16 image on the title bar of my window. It works nicely, except for an obnoxious flicker that I cant figure out how to get rid of. I'm simply drawing the image like this: Protected Overrides Sub WndProc(ByRef m As Message) If m.Msg = WM_SIZE Then wnd_size = New Size(New Point(CInt(m.LParam)...

Indexof with String array in vb.net

How would I find the index of an item in the a string array following code: Dim arrayofitems() as String Dim itemindex as UInteger itemindex = arrayofitems.IndexOf("item test") Dim itemname as String = arrayofitems(itemindex) I'd like to know how I would find the index of an item in a string array. (All of the items are lowercase, so ...

vb6 to .NET conversion. i'm stuck...

I have this, and i've been fiddling around with it for a while but i'm completely stuck. can anyone help me make a little sense of this. i'm trying to rewrite this into .NET. thanks. Set objCmd = Server.CreateObject("ADODB.Command") Set objRS = Server.CreateObject("ADODB.Recordset") objCmd.ActiveConnection = Application("ConnString") ...

I need help about deploying a windows application

I have visited http://msdn.microsoft.com/en-us/libr...(v=VS.71).aspx. I have learned many things. But it didnt make clear about those files what I have used there in my program. I know I can add additional files. Does it mean that I have to add those files there in additional file dialog box what I have used there in my program like imag...

Creating a general SQL module in VB.NET

Hey everyone. I'm fairly new to VB.NET and I'm looking to create a module that will contain all general SQL functionality like connect, disconnect and execute a sql query etc. I think I'm almost there but the code keeps bombing in one place. Can anyone see what is wrong with the following code? It bombs here, setting the command obje...

Background Image on Panel flicker when scrolling

I've got a panel in windows forms (Visual Studio 2008) which has a background image (A book shelf). When scrolling the image flickers and does not redraw so looks awfully - I've tried creating a new object to use double buffering but this has no effect, any suggestions? Public Class DoubleBufferPanel Inherits Panel Public Sub New() Me...