vb.net

VB.net Color one part of text -- Listbox

In VB.net is there anyway to make a certain part of the string to have a different color to make it stand out? This doesn't work but if I could something like this string = ("How".ForeColor(red) & "are".FontColor(green)) Would it be possible to make anything similar to this in a ListBox? If this is not possible is there a way to hav...

regex using vb.net

hi, i have this html code <div class="name"> <span id="businessNumOnMap2" class="resultNumberOnMap" style="display:none;">2</span> <span> <a href="/len/aapproximatch%20search/284096.php" onclick="loadBusinessInfo('1', '284096'); return false;" class="businessName">Bangsar Seafood Garden Restaurant</a></span><span id="phoneSpan1">...

Synclock a section of code while waiting for ShowDialog to return

I'm having trouble working out how to lock my application out of a section of code while it waits for a response from an external program I've used Synclock on a section of code with the Me object in the expression. In this Synclock I call an overridden ShowDialog method of a dialog box, which has a timeout parameter, but does return th...

upgrading of datagrid from vb6 to vb.net

hi guys, I am upgrading from vb6 to vb.net. I used to list my query results in datagrid in my previous applications. What can be more visually attractive control in replacement of datagrid? I hate the classic look of datagrid ...

How to get the path of a shortcut (NOT target path) in .net?

Hello world! I have an .exe application written in vb.net. When I make shortcuts to the application, say on desktop (or anywhere else) and then click on them I want to programatically get the path to that shortcut, ie. C:/Users/xxx/Desktop/shortcut.lnk. I want this so I can store the pairs shortcuts : (program + different cmd args). ...

VB.NET generates properties in the release build

I have a form and i drag and drop a control in VB.NET. I have a line say, private WithEvents radioButton RadioButton Also, I have a handler like, private void click(.....) Handles radioButton.Click { ... } Now, When I build this is .NET 3.5 in release mode, and see the generated code in reflector tool, the code is something li...

Generic Class VB.NET

hi guys, I am stuck with a problem about generic classes. I am confused how I call the constructor with parameters. My interface: Public Interface IDBObject Sub [Get](ByRef DataRow As DataRow) Property UIN() As Integer End Interface My Child Class: Public Class User Implements IDBObject Public Sub [Get](ByRef DataR...

The targeted version of the .net compact framework does not support late binding warning?

Hi, i am developing a mobile application on visual studio 2008 under .net compact framework for windows ce platform. i use vb.net language i want to add a new row to datatable using Bindingsource object. my code is Me.BindingSource1.AddNew() Me.StokBindingSource1.Current("id") = "01" when i use Current methot of bindingsource it gi...

BindingSource1.current methot not working

i am using vb.net under .net compact framework for windows ce platform. i want to add a new record with bindingsource object. but when i used bindingsource1.current("field")="value", it says error and error description is "The targeted version of the .net compact framework does not support latebinding" how can i add a value to field usi...

How to replace HEX character in an xml document?

I'm trying to import an xml file into vb.net XmlDocument but am getting the error: '.', hexadecimal value 0x00, is an invalid character. Line 94, position 1. I'm wondering if there is a way to replace the hex character 0x00 The following are lines 92,93,94 the file ends on line 94 92 | </request> 93 |</rpc> <!-- XML Finishes he...

Vb.NET String.Format with ArrayList

Hi, I'm trying to use an arraylist as the parameter to String.Format. msg = msg & String.Format("<td>{0}</td>" & _ "<td>{1}</td>" & _ "<td>{2}</td>" & _ "<td>{3}</td>" & _ ...

ConcurrenctBag(Of MyType) Vs List(Of MyType)

What is the advantage of using a ConcurrentBag(Of MyType) against just using a List(Of MyType)? The MSDN page on the CB (http://msdn.microsoft.com/en-us/library/dd381779(v=VS.100).aspx) states that ConcurrentBag(Of T) is a thread-safe bag implementation, optimized for scenarios where the same thread will be both producing and ...

Is there a getproperty or equivalent function in VBA?

I'd like to know if something like this pseudo code: myVar = "functionName" call someObject.(myVar evaluation) which would then be equivalent to: call someObject.functionName is possible in VB. I know this is done in some other languages using a GetProperty method. Thanks in advance. ...

Does binarywriter.flush() also flush the underlying filestream object?

I have got a code snippet as follows: Dim fstream = new filestream(some file here) dim bwriter = new binarywriter(fstream) while not end of file read from source file bwriter.write() bwriter.flush() end while The question I have is the following. When I call bwriter.flush() does it also flush the fstream object? Or should ...

Modify jkpanel to load internal content instead of external content

I am using an implementation of jkpanel in a vb.net app, the script (see below) loads an external file into the drop down panel. I need to modify this script to load an internal content like a specific div or span so that I can have this nested within the master page. //Drop Down Panel script (March 29th, 08'): By JavaScript Kit: http:/...

SQL Database application written in Visual Basic in Visual Studio 2010

Hello, I am writing a program and part of it is to store the keyed entry in a database on an sql server when the enter key is hit. The database is small and simple with only three entry spots in the table. one for the tracking number, one for the date entered, and one for the time entered. The only thing the user will see is the trackin...

Is there a way to know in VB.NET if a handler has been registered for an event?

In C# I can test for this... public event EventHandler Trigger; protected void OnTrigger(EventArgs e) { if (Trigger != null) Trigger(this, e); } Is there a way to do this in VB.NET? Test for null I mean? MORE INFO I forgot to mention. I have classes written in C# but I am writing my unit tests in VB.NET. I am tryin...

How to show previous day values in query

I am going to be crazy I think. Please Help. I have a table which fields are Date, No, Turnover, TotalWin, Opencredit, Handpay, Billin, gamesplayed and I am trying to write sql in vb.net that will show me previous day value but I cant. Here is what I am trying to do. SELECT Meter.* FROM Meter AS Previous, Turnover As Prev_turnov...

String tokens in .NET

I am writing a app in .NET which will generate random text based on some input. So if I have text like "I love your {lovely|nice|great} dress" I want to choose randomly from lovely/nice/great and use that in text. Any suggestions in C# or VB.NET are welcome. ...

Having trouble debugging class library plugin

Hi all. I have a windows form application in which I'm attempting to utilize a plugin (class library). In the code I have it load the assembly from a dll file, which means I have not been able to debug. Furthermore I have not found out how to compile the library so I've had to use the debuged dll version for testing. I've run into a bug ...