vb.net

Custom .ToString() Formats in .rdlc Reports

I have a custom business object which overloads the .ToString() function. It also implements IFormattable.ToString, so I can define my own custom formats. This approach seems to work everywhere in my app, except .rdlc reports. For example, I have a text field on a report with the following expression: =Fields!MyField.Value.ToString("lr...

How do I get a reference to the Screens collection in VB Express 8?

I've tried this example directly from MSDN: Dim Screens() As System.Windows.Forms.Screens and I can't find a way to get a reference to the Screen. I've checked my references and they seem fine but I may have missed something. Anyone experience this or know of a bug? EDIT 0: It helps if you're using the correct project type. In WPF...

Protected Set in VB.Net for a property defined in an interface

We have an interface, which can be grossly simplified as: public interface IPersistable<T> { T Id { get; } } Most places that implement the interface want to have it so that there is a protected or private set on that property, i.e, in C#: public class Foo : IPersistable<int> { public int Id { get; protected set; } } Howeve...

controlling for each loop in visual basic

i have the following code.... For Each dgvRow In bout_grid.Rows vfile = dgvRow.Cells("FileName").Value video.FileName = "D:\bee\" + vfile vduration = video.Duration vposition = video.Position If vduration > 0 The bplayer_out.URL = "D:\bee\" + vfile ...

TcpListener.Start() does not open the port

Hello, I have a class that inherits from the TcpListener, this class Shadows the Start method just to call the base Start() and the base BeginAcceptTcpClient(). From time to time the method is called but the port is not opened (netstat does not show the port open). The class looks like this Public Class ExtendedTcpListener Inherit...

How can I "undo send" like in Gmail?

Hello, How can I undo send, save or delete in Vb like Gmail is using this feature in Messages. The feature used by Gmail is they are queing the message for 5 secs and if the user clicks on Undo before that 5secs the whole send process is pulled back. Now what I want is to implement this same in my Vb.net application. Is there any code ...

vb.NET 2008: How to use a database connection through multiple forms

Hi, I'm testing database programming in vb.NET 2008 at the moment and try to find a way to use a database connection in different forms, so e.g. I put the the database-connection-component into one of the forms. I know, I could access it by e.g. form1.databaseconnection.xxx, but is this the best way or can I "put" the connection into ...

Adding a global namespace to .net Webbrowser Control

Scenario: A widget developer codes using HTML and javascript. My vb.net application allows developers to create widgets for other users. in javascript you can call window.external to comunicate with the host windows scripting object and I would like to add a helper namespace with many functions to aid the development of widgets similar ...

Use two vesrions of Microsoft.Reporting DLL's at the same time in VB

Problem It looks like MS have removed support for nested Business Objects in their Report Viewer 2010 companant. We would like to upgrade our web app to make use of the new features, but need to maintain backwards compat for loads of legacy reports. Caveats 1: We cant put anything in the GAC as we are on a hosted shared web server. 2:...

loading html page as xml

I use this to load html page by xml Dim xmlDoc As New XmlDocument() xmlDoc.Load(Server.MapPath("index.htm")) Or Dim xmldoc As XDocument xmldoc = XDocument.Load(Server.MapPath("index.htm")) but i got some errors like : Expecting an internal subset or the end of the DOCTYPE declaration. Line 2, position 14. '>' is an unexpected to...

SagePay integration from Windows Forms

I’ve been asked to integrate a windows form application with SagePay to take payments directly from the application. The SagePay documentation talks about ASP.NET so I’m not sure whether this is possible. Has anyone integrated a WinForm application with SagePay before? Is it possible? ...

How can I delay a ASP.NET AutoPostBack so JavaScript fires first?

I've got an odd situation with a text box and an autocomplete setup on my page. I'm using a JQuery based autocomplete on a text box that has AutoPostBack="True". This works perfect if I use the keyboard to select an autocomplete item, which then fires Jquery to fill in the text box, and then when I tab out of the box the AutoPostBack fir...

How important is it to be fluent in both C# and VB.NET?

I started with VB4 way back in the day, so working in VB.NET isn't entirely new to me. Recently, I've been working mostly with C# (I also have a background in C++), but I started maintaining a project that was written in VB.NET. Most of my existing .NET and VB skills transferred over, which was nice, but I would imagine that other peopl...

String searching in Linq to Entity Framework

I am wanting to create a Where statement within my Linq statement, but have hit a bit of a stumbling block. I would like to split a string value, and then search using each array item in the Where clause. In my normal Sql statement I would simply loop through the string array, and build up there Where clause then either pass this to a ...

Moving A Listitem To The Top of A Listbox

When the user selects a name in the listbox and clicks a button I save the name in a var called "parent". What I want to do is programmatically move the selected name to the top of the list and take that whole list and drop it in a dropdown. I started the code below but don't know how to move the selected list item (parent) to the top o...

IHTMLWindow2 WebBrowser control vb.net

How do i implement IHTMLWindow2 in my own vb.net application? I would like to handle commands such as window.prompt with my own code and also add my own objects like the window object which can be accessed directly from javascript without using window.external. Thanks. ...

Need Help Parsing File for This Pattern "Feb 06 2010 15:49:00.017 MCO"

Need to parse a file for lines of data that start with this pattern "Feb 06 2010 15:49:00.017 MCO", where MCO could be any 3 letter ID, and return the entire record for the line. I think I could get the first part, but the returning the rest of the line is where I get lost. Here is some sample data. Feb 06 2010 15:49:00.017 MCO ...

Sending data from VC++ to Visual Basic in a .NET framework.

I'm having a heck of a time figuring this out, the tutorials I found on the web are not complete or are for VB 6.0 (obsolete in some cases). On the C++ side I have the following :: ..... hwndExternalApplication = FindWindow(NULL, L"Dromocast Client"); SendMessage(hwndExternalApplication, WM_SETTEXT, NULL, (LPARAM)"Hello"); ..... "Dro...

Gathering data from Access database

I want to gather some data from some tables of an Access Database, I've found some solutions online, but I haven't found ways to fill a datatable, or dataset, and get each single field properly. Is it easier for me to get whole tables then get just the info that i want, or should I make a lot of searches in the access DB getting just wh...

simulate click on link in html

Could someone please take a look at his link; its safe but if not comfortable just look at next paragraph. http://blog.isao.net/ When you look at the source page there is a link at the src tag <frame src="http://track-back.net/Top.blog?userType=1" name="main"> How would I activate this link from vb.net since when you click on it all ...