vb.net

Publishing::: ClickOnce or Windows Installer

Hi, While publishing, how can I select ClickOnce or Windows Installer. Where can the choice be made? Thanks Furqan ...

what is trycast and direct cast in vb.net

Possible Duplicate: Why use TryCast instead of Directcast ? hi, I want to know about the trycast and direct cast in vb.net. What is the difference between them? ...

Does NGEN'ing a .NET application help protect it from reverse engineering? If not when would I use it?

If Ngen doesn't protect my application, when would I reasonably expect to use this application in my career? ...

How can I change WebBrowser1 rendering mode programmatically?

Ok so i know how to do it. I already have. Problem is I did it manually. So my question is how to create/edit the registry key programmatically. I'm using vb.net but can understand C#. I've read some tuts but never got them to work.....i create open a new key but i think the problem is editing it. Any help would be appreciated. They reg...

vb.net - weird issue with mdichildren

Hello, I have a weird issue happening with an midform. The MDIform has a toolstrip with 3 buttons, each button is linked to an mdichild so when clicked it shows (bringtofront). The first mdichild is a form with the mdiparent set, the other mdichild is dynamically created. Now, it all works fine so when clicking the toolstrip buttons ...

SmoApplication.EnumAvailableSqlServers fails to return all servers

My application lists the available network SQL Servers using Return SmoApplication.EnumAvailableSqlServers(false) Until recently, I was running XP Pro, with SQL 2005, SQL 2008, and Visual Studio 2008. All worked perfectly, correctly listing the default SQL05 server, and the SQL08 named instance. I've now upgraded to Windows 7 x64, ...

Reading\writing to external app.config files

I need to read the keys from several external applications .config files, is it possible to specify the file for AppSettingsReader? ...

How do I obtain a list of Collections which contain Objects which Implement an Interface in C# or VB.net

I am new to .Net Programming and would like to know if Reflection is suitable for traversing an Object to discover Collections within an instance of a class. I am working with the Microsoft.SqlServer.Management.Smo Namespace. The plan is to connect to a database, determine what collections exists, then for each of those collections, if...

Random String in VB

I need to generate a lot of random 2 character strings for my application. it's a VB console application. basically what I have tried for random strings is this: Private Function GenerateRandomString(ByVal intLenghtOfString As Integer) As String 'Create a new StrinBuilder that would hold the random string. Dim randomString As ...

How to add Or to a While Loop in VB?

Currently, lets say that I have this code: While r <> "HI" r = RandomStringGenerator(1) time = time + 1 Console.WriteLine(r) End While how can I make it so that i can say basically this: While r <> "HI" Or While r <> "BY" r = RandomStringGenerator(1) time = time + 1 Console...

C# to VB.NET Code Converter

Hello, I need a C# to VB.NET code converter, and I'm willing to pay. I want something that's ultra convenient, as I want to reduce the amount of copy/paste that I have to do... so could anybody give me some tips to what is out there? I want processing in bulk too, and to support the latest operations (LINQ, new VB inline-function supp...

delete command in vb.net

...

Working of "imports namespace"

I knew from here that we have to do the explicit imports for child namespace because imports will not include the child namespace. But my question is that if I do "imports System" whether it will include all the classes/methods inside that namespace in the IL/native code or only referred ( used inside the application) will be included ...

Is it possible to inject a Windows Form application into another application as an MDI Child in VB.NET?

I am creating a program that interacts with another program and I would like to "inject" my program into this program as an MDI Child window. Is this even possible, and if so can it be done in VB.NET? What kind of pitfalls are associated with doing this? ...

Backgroundworker thread causing UI to hang

I have a background worker that's checking the status of four services on a remote server. This is setup on a timer (5 Seconds) as below. For some reason it's hanging the UI thread causing the application to 'lock' for a second each tick, I cannot work out why?! Private Sub ServiceTimer_Tick(ByVal sender As System.Object, ByVal e As Sys...

Add application to startup

Hi, How can I add my application in startup items? I want my application to get added in startup when setup is run at Client's computer. Also, how can it be automatically started after setup finishes? Thanks Furqan ...

netfileenum vb to vb.net migration

Hello, I am using netfileenum in vb.net to see open files. When I am passing null as the servername,basepath,user as a parameter in netfileenum function, it is working fine and showing the opened files of local system but if I pass servername as "servername" for remote machine, I am getting error as 123. How to pass the servername in ne...

Using List of (T) with Lucene.net in vb.net

hello, i want to use an List to store the title, path,... from Documents. I declared the list like this: Dim MyDocuments As New List(Of Document) But i don't really know how to handle the list. i want to use the list instead of an ReDim Array. For i = 0 To results - 1 Step 1 ' forschleife zum durchlaufen der Ergebnisse ...

How to close the Recycle Bin using VB.Net or C#.Net

i would like to call a function that Closes the recycle bin window. This is the code that opens the recycle bin, however i can't find the code that closes it : Process.Start("explorer.exe", "/n, ::{645FF040-5081-101B-9F08-00AA002F954E}") ...

VB.NET - Dimming an array of processes.

Trying to dim a certain amount of process (determined by Environment.ProcessorCount) to run several processes which do not support multi-threading. I have already Dim'd proinf(6) as Process.ProcessStartInfo because I have designed a queue for the processes and this encounters no errors. Any help is appreciated! ...