vb

How to use a mutex in Visual Basic

OK - I have imported the kernel32 library so I have the createMutex function available, but I am not quite sure of the various parameters and return values. This is classic Visual Basic, not Visual Basic.NET - but I can probably work with either code set in the form of an answer....

Best SVN Client Ignore Pattern for VB.NET Solutions?

What SVN Ignore Pattern should TortoiseSVN have for a VB.NET solution?...

Automatically incremented revision # doesn't show up in the About Box.

I suspect this is going to be a really easy one but I'm a .NET newbie so be gentle. I have a small VB .NET app that I'm working on using the full version of Visual Studio 2005. In the Publish properties of the project, I have it set to Automatically increment revision with each publish. The issue is that it's only incrementing the rev...

How do I page a generic collection without Linq?

I've got a System.Generic.Collections.List(Of MyCustomClass) type object. Given integer varaibles pagesize and pagenumber, how can I collect only any single page of MyCustomClass objects? This is what I've got. How can I improve it? 'my given collection and paging parameters Dim AllOfMyCustomClassObjects As System.Collections.Generic...

IntelliSense for XElement objects with XML schema

Reading an article called "Increase LINQ Query Performance" in Jully's MSDN magazine, the author states that using an Imports in VB providing a path to schema in the current project will turn IntelliSense on for XElement. In the code provided, he uses statements like xelement.@name to retreive attributes values, and so on. I did not try...

IIf() vs. If

In Visual Basic, is there a performance difference when using the IIf function instead of the If statement? ...

If, IIf() and If()

I recently asked a question about IIf vs. If and found out that there is another function in VB called If which basically does the same thing as IIf but is a short-circuit. Does this If function perform better than the IIf function? Does the If statement trump the If and IIf functions? ...

How do I enable Edit and Continue on a 64-bit application and VB2008 Express?

When I try to do that I get the following error: Changes to 64-bit applications are not allowed. ...

Is there a lang-vb or lang-basic option for prettify.js from Google?

Visual Basic code does not render correctly with prettify.js from Google. on Stack Overflow: Partial Public Class WebForm1 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'set page title Page.Title = "Something" End Sub End Class in...

How to implement mouse dragging in Visual Basic?

I need to create a quick-n-dirty knob control in Visual Basic 2005 Express, the value of which is incremented/decremented by "grabbing" it with the mouse and moving the cursor up/down. Because the knob itself doesn't move, I need to keep tracking the mouse movement outside of the rectangle of the control. I use a Label with an ImageList...

Getting Configuration value from web.config file using VB and .Net 1.1

I have the following web config file. I am having some difficulty in retrieving the value from the "AppName.DataAccess.ConnectionString" key. I know I could move it to the AppSetting block and get it realtively easily but I do not wnat to duplicate the key (and thereby clutter my already cluttered web.config file). Another DLL (one to...

How do I save each sheet in an Excel workbook to separate CSV files with a macro?

Title says it all. I have an excel with multiple sheets. And I was looking for a macro that will save each sheet to a separate CSV (comma separated file). Excel will not allow you to save all sheets to different CSV files. ...

Clean up Designer.vb file in Visual Studio 2008

I noticed that my Designer.vb file of one of my forms has a lot of controls that aren't even used or visible on my form. This is probably from copying controls from my other forms. Is there a way to clean up the Designer.vb file and get rid of all the unused controls? **UPDATE: This is for a Windows Form project. ...

python cgi on IIS

How do you set up IIS so that you can call python scripts from asp pages? Ok, so I found the answer to that question here: http://support.microsoft.com/kb/276494 So on to my next question: How do you call a cgi script from within classic asp (vb) code? Particularly one which is not in the web root directory. ...

VS 2005 Toolbox kind of control .NET

Hi, I'm looking for a control that the Visual Studio "Toolbox" menu uses. It can be docked and can retract (pin). Would you know where I can find a control or COM I could use which would look like this? ...

Giving class unique ID on instantiation: .Net

I would like to give a class a unique ID every time a new one is instantiated. For example with a class named Foo i would like to be able to do the following dim a as New Foo() dim b as New Foo() and a would get a unique id and b would get a unique ID. The ids only have to be unique over run time so i would just like to use an integ...

Is there a way to add global error handler in a visual basic 6.0 application?

VB 6.0 does not have any global handler.To catch runtime errors,we need to add a handler in each method where we feel an error can occur.But, still some places might be left out.So,we end up getting runtime errors.Adding error handler in all the methods of an application,the only way? ...

ASP.NET - Common Gotchas

When I am working with ASP.NET, I find that there are always unexpected things I run into that take forever to debug. I figure that having a consolidated list of these would be great for those "weird error" circumstances, plus to expand our knowledge of oddness in the platform. So: answer with one of your "Gotcha"s! I'll start: Under A...

equivalent vb code for a java code

Can anyone tell me what exactly does thi java code do? SecureRandom random = SecureRandom.getInstance("SHA1PRNG"); byte[] bytes = new byte[20]; synchronized (random) { random.nextBytes(bytes); } return Base64.encode(bytes); Step by step explanation will be useful so that I can recreate this code in VB. Thanks ...

generate thumbnail with white border VB.net/C#?

I need to generate thumbnails from a set of jpg's that need to have a small white border so that they appear to be "photos" when displayed on a map. Getting the thumbnails themselves is easy but I can't figure out how to get the border. ...