vb.net

How to add nodes to a WPF treelist using VB.net (2008)

I need to create a wpf treeviewlist to look something like this: AAAA BBBB ....CCCC ....DDDD .......EEEE FFFFF (where the dots above are indents) I need to do this from vb.net (2008) code. I've spent an embarrassingly long amount of time trying to figure this out, and so far all I’ve got is: vb.net: Dim tvi1, tvi2 As TreeView...

how to show highlighting arrows like in Coderush

I am programming winforms using c# and vb.net. I love the arrows used in coderush. for those who have not seen coderush arrows ,please see this image. http://www.aspnetpro.com/productreviews/2004/08/asp200408bn_p/asp200408bn_p_image002.jpg I want to have something similar in my program. only difference is i will be using it to hi...

MustOverride Properties with mixed access level Get / Set

Visual Basic allows for properties with mixed access levels, for example Public Property Name() as String Get End Get Friend Set(ByVal value As String) End Set End Property Is there a way to define a MustOverride property with mixed getter/setter access level? ...

Javascript RIA vs .NET GUI

I am looking at moving my company's internal business app from VB.NET to PHP. Some of the people were worried about losing GUI features that can be found in .NET. I am under the impression that with the right javascript framework, anything in .NET GUI can be replicated. While I am still researching this point, I would like to ask if for...

How to safely and effectively cache ADO.NET commands?

I want to use this pattern: SqlCommand com = new SqlCommand(sql, con); com.CommandType = CommandType.StoredProcedure;//um com.CommandTimeout = 120; //com.Connection = con; //EDIT: per suggestions below SqlParameter par; par = new SqlParameter("@id", SqlDbType.Int); par.Direction = ParameterDirection.Input; com.Parameters.Add(par); H...

How to hide/Unhide a MS Access DB form using vb.net

If a form in Access DB is set as hidden. Then how to unhide it? so that we can manipulate the form programmentically using vb.net. Thank you. ...

Why use TryCast instead of Directcast ?

Hi, When I am trying to cast Object obj to Type T, If it can not be cast then there is something wrong. And after I cast the object I will be looking for working with the casted object. Rather I will be expecting to get an exception at the place where I will be casting it than say where I will be using that object. In this sense ...

How to dynamically create a object of a generic class?

i have a sub with this signature Public Sub Save(ByVal obj As IPta) now i want the create a instance of Generic.PtaDao(of T) with the type of obj, which could be anything that inherits from my base class Pta how can i do that? i already found a c# example http://stackoverflow.com/questions/307984/declare-a-generic-type-instance-dynam...

How do you determine if a Char is a Letter from A-Z?

How do you determine if a letter is in the range from A-Z or Digit 0-9? We are getting some corrupted data "I_999Š=ÄÖÆaðøñòòñ". I thought I could use Char.IsLetterOrDigit("Š") to ID the corrupted data from "I_999Š", but unexpectedly this is returning true. I need to trap this, any thoughts? ...

Finding the type of Outlook.MAPIFolder

I'm building an outlook control for an application, and am populating a treelist by recursively adding child folders. These folders are declared as Outlook.MAPIFolder. But the application only allows import from actual emails, so I want to exclude folders containing calendar items. I can right click on those folders in outlook, go to ...

How do you select what properties will be displayed when databinding to a DataGridView?

Binding a List collection to a datagrid. How can you limit what properties will be displayed? DataGridViewAirport.DataSource = GlobalDisplayAirports ...

Is there a utility to create VB.NET classes from an XSD file?

Is there a utility out there that will create VB.NET classes from a Dataset.xsd file? And I don't mean like the XSD.exe utility does - all that does is convert the XML of an XSD file into classes in a .vb - it doesn't append any "extended" functionality. I'm basically looking for something that will generate the beginnings of a busin...

Remove or Reset Cookies

I am setting a cookie Request.Cookies("TemplateName").value on one of my pages(page 3) of my application. Now I can navigate from page 3 to page 4 and page 2 and retain the value of the cookie. But now when I logout and login again it still has the value, how can I reset the value of the cookie to be blank "" when I start a new instance?...

Containment Tree ?

OK thought I understood IDipose but just reading the best practices section of Accelerated VB.NET and it states that "The object doesn't contain any objects that implement iDispose, so you don't need to iterate through the containment tree calling iDispose" Is this "containment tree" just what the program know's he has used and then dis...

How do you implement the ? help, where user clicks ? and then clicks a control for more help?

I don't even know what this is called. But some Windows apps used to have a "?" near the X in upper right corner. You could click that and then click on something on the screen and get help. Anyone know what that's called or (better) have any pointers to instructions on how to implement it? Oh, and I'm using vb.net 2005. ...

Initializing DataSets in VB.NET

Is it necessary to use "Nothing" keyword to initialize a DataSet in VB.NET? ...

Parsing files to set data of an object - a design question

I recently had to write some code which parsed a file to set data in an object. As there were several objects and corresponding files involved here, I decided to separate the parsing code out. So I then had one class for parsing the files, CommandFileParser, and two classes per file/object type: one for the actual object itself and one ...

The best way to hit a URL (I don't need a response) in Visual Basic.Net

I am basically sending a URL to control the tilt and pan of an IP camera, so all I need to do is send the request, I am not worried about receiving anything. Currently I am using: Dim Request As HttpWebRequest = WebRequest.Create("http://xxx.xxx.xxx.xxx/nphControlCamera?Direction=TiltDown&Resolution=320x240&Quality=Standard&...

How does "Custom Event" work in VB.Net?

In C# if I want to create a "Custom Event" you do something like this: private EventHandler _MyEvent; Public Event EventHandler MyEvent { add{ _MyEvent += value; } remove{ _MyEvent -= Value; } } protected void RaiseMyEvent() { if(_MyEvent != nul) _MyEvent(this, EventArgs.Empty); } In VB this is not so straightforward n...

Best way to use a VB.NET class library from a C++ DLL?

Hello, I need to use one of my VB.NET projects in a C++ project. The interface between the two will be for the C++ code to instantiate and call methods on one of the .NET assembly objects. Both compile to DLLs (and then the C++ DLL is loaded from the NTVDM as a VDD, but that's probably not relevant.) If possible I would like to avoid u...