vb.net

Class member variables, methods and their state

How should class member variables be used in combination with class methods? Let's say I have a class 'C' with a member variable 'someData'. I call C.getData(), which does not return a value but instead puts data in C.someData. The class that instantiated 'C' first calls C.getData and then uses the data by accessing the member variab...

Having dynamic javascript on the same page as response.BinaryWrite

Hi All, I am display a pdf document on page using response.binarywrite i.e Response.ClearHeaders() Response.ClearContent() Response.ContentType = "application/pdf" Response.BinaryWrite(result) need to call some javascript function to open up the print dialog after the pdf is loaded. is it possible Please let me k...

My update query executes but doesn't update

I have this update query. UPDATE production_shr_01 SET total_hours = hours, total_weight = weight, percentage = total_hours / 7893.3 WHERE (status = 'X') The query executes fine but the problem is that when this query executes, it doesn't update the percentage field. What might be the problem? ...

How to find like integers in multiple list

In a vb.net application I have a set of integers currently stored in multiple Arraylist (But this could be something different if required) al1 = {1, 2, 3, 6, 7, 9} al2 = {2, 3, 4, 9} al3 = {2, 3, 19} I would like to get the set {2, 3} I thought about using LINQ to join the list, but the number of Arraylist can change. Im open to any ...

How can i access the templates of controls and modify them in vb.net

Where and how do i look for to access the default templates of say for e.g a checkbox, so that i can modify few styles in it. ...

IronRuby as scripting language in .net

Hello anyone! I want to use IronRuby as scripting language (as Lua, for example) in my .net project. For example, I want to be able to subscribe from ruby script to specific events, fired in host application, and call ruby methods from it. I'm using this code for instantiate IronRuby engine: Dim engine = Ruby.CreateEngine() Dim source...

AccessViolationException was unhandled, calling fortran dll from vb net

I have a subroutine that was written in fortran that I need to call from VB.NET where all of my other functions are written. I did not write the fortran, and hardly know fortran. I am getting the below exception on my dll function call and don't know how to fix it. I wonder if it is due to incongruent variable lengths? I have the sou...

Read assembly Guid without locking the DLL in an appdomain in medium trust ASP.Net

Is it possible to read the GUID from the Assembly without actually loading it in the current App Domain. Normally Assembly.Load loads the DLL into the app domain. I just want to read the value. The description of the GUID is 'The following GUID is for the ID of the typelib ' if this project is exposed to COM <Assembly: Guid("DEDDE...

onclosing form return value

Is there a way tha a form returns a value? something like ... sub main() Dim task as new TaskForm() dim res as integer=0 res = task.opendialog() end sub ...

Lazy Load An Entity Framework EntityCollection with criteria

In Entity Framework (specifically EF 3.5, but if it exists in EF 4 it gives me a reason to upgrade) is it possible to lazy load only part of a collection? I may be approaching this wrong too, so I'm open to suggestions. My tables/entities look similar to this: Person PersonMeal Meal ------ 1---* ---------- ...

VB.NET Inputbox - How to identify when the Cancel Button is pressed?

I have a simple windows application that pops up an input box for users to enter in a date to do searches. How do I identify if the user clicked on the Cancel button, or merely pressed OK without entering any data as both appear to return the same value? I have found some examples of handling this in VB 6 but none of them really fun...

How do I get the object that called (executed) my vb.net subroutine inside my object?

I'm trying to extend my new WPF Touch Screen Keyboard (DLL) Library, to allow the user to get events from the Touch Screen Object. I'd like to be able to tell the Programmer what Object made the call (or executed the subroutine) that raised the event. Not dissimilar to the Sender as Object event parameters one gets when working with a Sy...

vb.net how to start a folder monitor service at runtime and pass on the folder path to monitor?

hi, I have the following windows service file: Imports System.ServiceProcess Imports System.IO Public Class fswService Dim fsw As FileSystemWatcher Dim lf As StreamWriter Protected Overrides Sub OnStart(ByVal args As String()) ' Add code here to start your service. This method should set things ' in motion so your service ca...

VB.NET Use WebRequest to check if URI is valid

Looking for the best way to determine if a URI exists in VB.NET without downloading the actual content. System.IO.FileExists/My.Computer.FileSystem.FileExists can be used locally to determine if a file exists, is there an equivalent for the Web? Currently I am using a HttpWebRequest to check URI existance using the ResponseStream. Thi...

I would like to create subdomains Dynamically under my domain using asp.net ,C#?

I would like to create subdomains Dynamically under my domain using asp.net ,C#? I can not find good solution for this. What are the things i should do to complete this. Scenario: 1.user register with site 2.domain name should be: http://username.domain.com Thanks ...

any .net Framework Application at some Point Memory?Other Errors Out with no errors

I have a strange problem/bug when I have many I believe .net Applications Open at once. I may at one point have 3 Visual Studio 2005 Projects open (big or small doesn't really matter) 2 Visual Studio 2003 Projects open & sql2005 Management Studio. Or various combinations of either/or. Always when I've got quite a bit open. What hap...

Use resource font directly in VB.net/C#

How to use resource font directly without saving font in local file system for standalone application[desktop application] in VB.net/C#? ...

It is Possible to Sift Cell Value by Drag and Drop in DataGridView

Hi All, It is Possible to Sift DataGridViewCell Value by Drag and Drop in Vb.net 2008. ...

Differences between migrating from vb6 to vb2005, vb2008, vb2010

I own a copy of vb2005 professional. I need to migrate a vb6 project to vb.net Is there any difference in terms of effort to migrating to these editions of vb.net thanks ...

Is there a more concise regular expression to accomplish this task?

First off, sorry for the lame title, but I couldn't think of a better one. I need to test a password to ensure the following: Passwords must contain at least 3 of the following: upper case letters lower case letters numbers special characters Here's what I've come up with (it works, but I'm wondering if there is a better way to do t...