vb.net

VB.NET - Send [Delegate] through the classes to set AddressOf

How can I put AddressOf, from another class? I get this error 'AddressOf' operand must be the name of a method (without parentheses). " Is there an Eval () function in VB.NET? Or how does one do this? Public Shared Property e As UserControl Public Shared Sub SetButton(ByVal button As String, ByVal Objekt As [Delegate]) Dim errorbu...

VB - how to link up a Check_change to code behind for a checkbox

How do I enable a check_change for a checkbox in VB. Here is what I have so far. Code Behind: Protected Sub CheckBoxCash_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBoxCash.CheckedChanged Label1.Text = "Cash" End Sub Front end code: <asp:Label ID="Label1" runat="server" Text=...

RSS reader in VB 2008?

Are there any built in libraries/classes in VB 2008 to help to create an RSS reader? Are there any tutorials online that would help? Please provide links when answering the second part of the question. ...

Binary read jpeg and store it in SQL Server db

Hello, I have a jpeg file in my C drive from my vb.net application I want to binary read it and store it in SQL server. How can I do that? Thanks ...

Does making a class NotInheritable in VB.NET offer the same (potential) compiler optimizations as sealed in C#?

I've read that making a class sealed in C# is advisable in high-performance scenarios because it frees the compiler to make certain optimizations (e.g., inlining property getters) that it wouldn't be able to make otherwise. Is the same true for NotInheritable in VB.NET? My guess would be yes, but I'm posting this question in case someone...

Access a file within a project

In vb.net, when writting an application, I want to access a batch file that has been added to the project. My question is how to I find the relative path of this file to access it? I have used relative path on the ASP.NET side, but not on the application side. The properties that I am finding regarding the current directory and running ...

.NET MVC Localization (resourceprovider) implementation not working correctly

Hi, i'm currently implementing a localized website. I've created a custom ResourceProvider + Factory for storing resources in a database. This all works, i'm storing data as follows: resourceid | url (null) | type (null) | name | culture (null) | value 1 | NULL | Common | Test ...

read a specific line from a txt file in VB .net

Hi, In VB.net I'm trying to read in a specific line from a file. An example of the line in the txt file is: [PATH] = "/this/directory/run.exe" Now I understand how to open the file for reading and writing in VB, but I need to parse out the path in the "" (quotation marks). Any help would be greatly appreciated!! --Adam ...

Overridable Subroutine Without Default Behavior?

In a base class object, I have an overridable subroutine that I would like all derived objects to have the ability to include. However, they don't have to, and if it's not necessary for them to use it, I don't want them to be forced to declare it. To enforce this, I've left the default behavior empty. For example, here's my whole sub: P...

Why we use CLR procedures.

Why we use CLR procedures. Is there any significance of CLR Procedures or any example where CLR Procedure is the only solution? ...

Doing a lot of input validation in VB.NET

I have a form set up where users can enter their booking for a room at my college. I want to validate the user input to avoid SQL injection (my program uses a MS Access database) and also stop numbers and synbols in their name, etc. I can do the validation fine, but there is to be a lot of validation and then methods executed only if al...

how to calculate two values and display in third column in dev express

hi friends, How to calculate two values and display in third column.but i found and it calculating and display in third column but its taking it corresponding ID not its value My requiredment is to calculate its value and display in thired column... the first two column values are foreign key reference rilkTax.DisplayMember = "Name...

How to start an invisible process in vb.net?

Is it possible to use system.diagnostics.process.start("Process.exe") But the process would not be seen by the user? For example, I want to play an audio in the background using windows media player, the audio will play but wmp won't be visible. Is it possible? ...

.Net IPAddress IPv4

Hi, I have the following code: Dim ipAdd As IPAddress = Dns.GetHostEntry(strHostname).AddressList(0) Dim strIP As String = ipAdd.ToString() When I convert to String instead of an IPv4 address like 192.168.1.0 or similar I get the IPv6 version: fd80::5dbe:5d89:e51b:d313 address. Is there a way I can return the IPv4 address from IPAdd...

How to terminate a process in vb.net?

I've started a process through system.diagnostics .process.start("C:/process.exe") Now my question is, how can I terminate the same process in vb.net ...

Set roaming setting at runtime

Hi gurus In .net, is possible, at run-time, to specify if a user configuration setting should roam or not? Or is it possible to set this setting in the app.config file? ...

HOW to access ms access database with a password?

I've password protected an mdb file but then I cannot access it on vb.net. I don't know the correct code for defining the password. this is my current code, I know its wrong, but I don't also know the correct code: conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\search.mdb;pwd=nit" ...

How to write a Multi-line RegEx Expression

I have a vb.net class that cleans some html before emailing the results. Here is a sample of some html I need to remove: <div class="RemoveThis"> Blah blah blah<br /> Blah blah blah<br /> Blah blah blah<br /> <br /> </div> I am already using RegEx to do most of my work now. What would the RegEx exp...

Shared folder permission!

Hi! I use this code to share folder: Public Sub Share() Dim managementClass As New ManagementClass("Win32_Share") Dim inParams As ManagementBaseObject = managementClass.GetMethodParameters("Create") inParams("Description") = "My Description" inParams("Name") = "Share Name" inParams("Path") = "D:...

How can I make a property "Write Once Read Many" in VB.NET?

What is the best way to make a class property "Write Once, Read Many" such that you can only set the property once? I know that I could pass all the properties in the constructor and make them ReadOnly, but in cases with a lot of properties I don't want a constructor that has 20+ arguments. Also, I realize I can "roll my own" setters, ...