vb.net

Losing VB.NET "My.Settings" with each new ClickOnce deployment release

I am using the built-in My.Settings functionality in VB.NET to save application settings. This is very convenient but I notice that each time I release a new version, the settings are lost. Why and how can I prevent it? ...

Interfaces and function return types (with Linq)

I have two interfaces: Interface iContact Property ContactID As String Function Services() As System.Linq.IQueryable(Of iService) End Interface Interface iService Property ServiceID As String End Interface I have a host app that implements these (properties skipped for brevity): Class Contact Inherits iContact F...

Choose Enter Rather than Pressing Ok button

I have many fields in the page and the last field is a dropdown with list of values. When I select an item in a dropdown and press Enter, it doesn't do the "Ok". Instead I have to manually click on Ok to Submit. How can I do by pressing Enter on my Keyboard rather than Clicking on "Ok" button after selecting the value from dropdown list....

Access EXIF data in a NEF (Nikon) file

How can I access the EXIF data stored in a Nikon NEF file? I can't seem to find a lib that will allow me to extract some basic information from the metadata. (Preferably without having to install the Nikon codec) ...

Why is my Sitemap.CurrentNode null????

System.NullReferenceException: Object reference not set to an instance of an object. Making the Sitemap.CurrentNode work in my code is oddly a problem. I haven't figured out how to list code on STOF yet... so here is the code that will easily be displayed. Title: "localhost/home.aspx/about" Response.write(SiteMap.Curren...

Connecting to a Source game server in VB.NET

I'm developing an application that detects Source-based games running on the LAN. Following up on the specifications provided by Valve, I have it narrowed down to exactly what I want: making a UDP connection on port 27015, sending an A2S_INFO query (0xFFFFFFFF followed by "TSource Engine Query") and parsing the binary reply. This is the...

How to hook up an event to an event in VB.Net

Is it possible to hook up an event to another event in VB8? I have this code in C#... public event ShowAboutDialog = delegate {}; private void hookupEvents() { myButton.Click += ShowAboutDialog; } And am trying to convert it into VB8, but can't get it to work.. Public Event ShowAboutDialog As EventHandler Private Sub HookupEvents()...

DateTime question in VB.NET

Ok, so I need to find the date of Monday this week programmatically. For example, for this week Monday was on the 9th, so the date I need is: 09/11/2009 And when we roll over to next week it needs to calculate: 16/11/2009 I have tried doing this myself but I can't see how to do the arithmetic, thank you. ...

Using SortCompare event to sort datagridview integer-wise

I use the streamreader to fill a datagridview. I need to sort the datagridview integer-wise and have tried to use the SortCompare event. To compare the row values i use the function Public Function CompareIntegers(ByVal value1 As String, ByVal value2 As String) As Integer Dim int1 As Integer = Integer.Parse(value1) Dim int2 As I...

How to change a global variable value based on linq query while executing

I have two module-level variables and Linq query. I want the results of the Let clause to change the global variables - is this possible? For example: Dim X As Integer = 0 Dim Y As Integer = 0 Sub One() Dim query = From e In <picture> _ Let X = e.@x _ Let Y = e.@y _ Select <im...

Is there any way to clear subscription to an event in VB.NET?

In C#, I took the habit on clearing every subscriptions to my custom events in Dispose() to avoid memory leaks of subscribers forgetting to unsubscribe from my events. It was very simple to do, simply by calling MyEvent = null since the C# compiler automatically generates a delegate field. Unfortunately in VB.NET, there seems to be no s...

Application/User Settings with Roaming Profiles

Hi Guys any help would be much appreciated. We have an application that’s installed at several locations but we are having an issue at one particular site. In short the application settings (My.) are not being saved after a reboot. The application is build in VB.Net v3.5 Framework and we are not experiencing any issues elsewhere. T...

Can anyone show a sample of two threads reading messages from a Queue(of String)?

I'm trying to improve performance of an application by introducing threading (see my earlier question). I have filled a Queue(of String) with XML messages and I now want to setup two threads to post these messages to a webserver). This process needs to ensure that each message is only posted once. Would a BackgroundWorker (or two) be sui...

How to make the default value of a type as Nothing?

For example Dim aInt as Integer should have the value as nothing instead of 0. ...

HttpWebRequest Class Text + File in Vb.net

How to create an POST with the HttpWebRequest Class in VB.net (2008)? I can find exemples with text only but not with text and files. Thanks. ...

Outlook is unable to accept french-accented characters in my mailto string?

Outlook is causing some problems when being passed a mailto string with accented characters in it. Changing the codepage for my entire webpage that has this string on it solves this problem, but that causes other problems in the system, so I would not like to do that. A string like such returns a lot of garbage characters: "mailto:H...

Data sync with vb.net and php

I have a windows application and a php web application(not connected to internet all times), eventually data add/remove/update can happen at either places. So data has to be synchronized every day or manually. I have a small sqllite database file (less than 500K) in my end, and the php web app uses Mysql, the structures remain the same....

Subsonic and the VB.net 2005 interop toolkit

I have an application I am converting over from vb6 to vb.net 2.0/3.5. Using Subsonic 2.2 and the vb.net Interop Toolkit 2005. Cannot seem to get the .net form using subsonic to work inside the interop environment. It keeps saying it cannot find the subsonic service provider in the app.config. But I know it is there. Has anyone used thes...

Do I want Publish or Release Build in VB.net?

I wrote a little (like 40 lines little) Winforms application with VB.net in Visual Studio 2010. Now I've released the code as a Google Code project. It's easy for a developer to get the source but I'd like to make it easy to install too. What I did was make a release build then zip up what it created, this included a setup.exe. There wa...

Return multiple ilists from a dal function in asp.net vb.net

I modified a function that returns a strongly typed Ilist of products (from a web search form) from a stored procedure. Because of the complexity of the stored procedure I have changed it to return productcategories as well using the product results. I can get this into another strongly typed ilist but for the life of me I cannot return...