vb.net

references in visual basic .net

Hi, Somewhat unclear to me are references (pointers?) to classes in Visual Basic .Net. The question I am about to ask can be answered by a little bit of testing, but I was wondering if anybody could post a decent explanation (or links, too). If you create a class: Public Class ReferenceClass private myBooleanValue as Boolean = F...

Catch block not catching exception

...

How should a http-handler fill the calling xmlhttp object's responsetext property?

Hi Everyone, I'm trying to implement a http handle (.ashx) using asp.net for an environment where the clients will be using serverxmlhttp to request information from the handler. Here is the code so far... CLIENT.ASPX <%@ Page Language="VB" %> <% On Error Resume Next Dim myserver_url As String = "http://mydomain.com/Server.a...

Simplest method to determine if the current time is AM or PM?

What is the best method to determine if the current time is AM or PM using VB.NET? Currently I'm using If Date.Today.ToString.Contains("AM") but I'm sure there is a better method. Good <%If Date.Today.ToString.Contains("AM") Then Response.Write("Morning") Else Response.Write("Afternoon")%> ...

ActiveMQ Message Receipt Event Only One Message Per Second?

We've built up an application infrastructure based on ActiveMQ. We can send and receive messages just fine, and for the most part things are pretty fast and OK. However, we've noticed that if we submit a batch of messages "at once", say 5,000 messages - that ActiveMQ will get the messages to the 3rd party application on the other end p...

check string for nothing and then for certain value in 1 line?

I always seem to see if a string (querystring value usually) has a value but first I have to check that it is not nothing first so I end up with 2 if then statements - am I missing somethign here - there has to be a better way to do this: If Not String.IsNullOrEmpty(myString) Then If CBool(myString) Then //code End If End If ...

ToString vs. ToString() in VB.NET

What is the difference between using ToString and ToString() in VB.NET? ...

How to make sure that there is one instance of the application is running

I want to check when the user double click on applictaion icon that no another instance of this application is already running. I read about My.Application but i still don't know what to do. ...

How to add Autocomplete to a Masked Text Box?

In .Net, there is the MaskedTextBox and there is the TextBox which has an autocomplete member. Autocomplete doesn't seem to be available for MaskedTextBox. How do you get MaskedTextBox working with autocomplete? I am attempting to do this in Visual Basic. ...

VB.NET 2005 DataGridView Redraw

Hello Every one :D Description : I'm using a Global DataGridView which is been created once , then I'm sharing that grid ByRef on multiple User controls , the strange thing is -> first control adding or Initializing that grid will draw it all others controls will not draw it (For sure and I know why Its not drawing) Question : h...

Transparency for images in Visual Basic .net?

I have a picture box on my form, which I add a picture to. This picture has a transparent background, but unfortunately, it seems lost in the picture box... I'm guessing that's because the picture box's background colour property is set to grey (the default). I can't see any option for "transparent" though. Any idea how I can do it? ...

How to I create my own primitive data type in .NET?

How do I create my own primitive? For example an integer that has a range of to 1-10. EDIT: This came from a task on Rosetta Code. Defining Primitive Data Types: Demonstrate how to define a type that behaves like an integer but has a lowest valid value of 1 and a highest valid value of 10. I added it here because I thought it mig...

Figure out the focused control

I'm trying to add a CSS class to the Control that will get the focus, once a page is rendered. While the SetFocus() method of the Page class lets me set the Control, there is no corresponding GetFocus() method. According to the .Net sources, the information is stored in the private member _focusedControl of the Page class. The property ...

Windows application

How the variables can be transferred between the Winforms? Example customer id Thanks ...

Creating An Insert Statement -- Windows application Vb.Net

I am doing windows appliction in vb.net. i have customer object contains save method. how do i generate insert query? I need to save the object in relational database (SQL server). I need to know which is the correct way of doing the insertion ie,. Inside the save method i have written the SQL statement to save the object. Is it the cor...

Getting the Request Variables from an ASP.NET page

I wrote the following function that works about 95% of the time, but I need it to work 100% (obviously): Public Shared Function getPassedVars() As String Const keyCount As Integer = 54 ' 54 seems to be the number of parameter keys passed by default (for this web_app). ' there are more if there i...

Add Checkboxes to VB.NET WPF 3.5 TreeView

Is it possible to add checkboxes to the WPF TreeView object? I'd like to have someone be able to check a specific entry for data retrieval at a later time. Thanks for the help in advance! JFV ...

ASP.NET Error Handling Question

I've been doing some research on how to globally handle errors in my ASP.NET application. I have settled on using the web.config file with the following code: <customErrors mode="On" defaultRedirect="errorpage.aspx"> </customErrors> Here is my errorpage.aspx.vb code: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System....

Gridview link button click event - Windows application

How to handle click event of the linkbutton in gridview in vb.net (windows application ) Thanks ...

Get most frequently used applications in VB.NET

Is there a way that I can get the most used applications via VB.NET? I'm developing a sort of hobby project as a quick launcher kind of thing and thought this would sit perfectly on the main form. If possible, would somebody be able to explain to me how add/remove applications manages to get the frequency of used applications? It would ...