vb.net

Using checkbox as gridview control

I have a gridview that uses a stored procedure for its select statement. The stored proecedure accepts a varchar and a bit. I want a checkbox outside of the gridview to change the value of the bit. I've set the parameter to the checkbox but it doesn't seem to be working. Am I missing something? ...

FieldAccessException when class accesses its own field (.NET project upgraded from 3.5 to 4.0)

I have a VB.NET solution, just upgraded from 3.5 to 4.0. One of the classes has a private field: Private _Projection As ICalculatedPath At runtime, any time the class containing that field accesses that field, I get a FieldAccessException. The first time that field happens to get accessed is a null check in a method, and one of the th...

Aggregate or join strings in linq to sql query (SQL Server)

Given a table like ID | Name | City 1 | X | Y 2 | Z | Y 3 | W | K I want to produce a result like ID | Description 1 | Y (X, Z) 3 | K (W) I tried something like From C In Clients Group C By C.ID, C.City _ Into G = Group Select New With {.ID = ID, .Description = City & _ " (" & (From C In Clients Select C.Name).Aggreg...

Looking for details on the PixelOffsetMode Enumeration in .Net, WinForms.

The possible values of PixelOffsetMode are: Invalid Default HighSpeed HighQuality None Half I'm guessing that HighQuality = Half, HighSpeed = None and Default = HighSpeed. If this is true then, like the SmoothingMode, I can offer just two simple options. Does anyone know if this is correct and, if so, where on earth did you find ...

How do I force a page to refresh the data upon reload after entering new record

When I create a new record by submitting an .aspx page the new record is not showing up. I have to navigate away from the page and back to it for the new data to show. How do I refresh the data up reload?? ...

Group by Week of year (Week number) in Linq to SQL

In regular SQL i could do something like SELECT * From T GROUP BY DATEPART(wk, T.Date) How can i do that in Linq to SQL ? The following don't work From F In DB.T Group R By DatePart(DateInterval.WeekOfYear, F.Date) Also don't work: From F In DB.T Group R By (F.Date.DayOfYear / 7) ...

How to Programmatically Fill Out HTML Invoice Form?

I have HTML template which has empty forms. How can i fill these forms from Winform? Should i create a new class called CreateInvoiceHTML which creates invoice programmatically? I haven't done this before, i need some quick ideas to make sure i don't go to the wrong track. ...

How to serialize and deserialize a form?

How do I serialize and deserialize my main form (and its controls, subcontrols, their values, etc.)? Edit, for clarification. Currently I am writing the current value of each control to an .INI file, one by one and reading it back when the program is next run. Every time I add a new control, I have to remember to update that save/load...

ASP.NET - ResourceNotFoundException is Undefined

I'm working through some Error stuff, and I've tried converting Richard Dingwall's example over to VB.NET. The problem is that I'm getting an error: Type ResourceNotFoundException is undefined '<AttributeUsage(AttributeTargets.[Class] Or AttributeTargets.Method, Inherited:=True, AllowMultiple:=False)> _' Public NotInheritable Class...

Why does C# define Byte+Byte=Int32 instead of Byte+Byte=Byte like VB?

Why does C# define Byte+Byte=Int32 instead of Byte+Byte=Byte like VB? ...

Visual Basic: dynamically create objects using a string as the name

Is there a way to dynamically create an object using a string as the class name? I've been off VB for several years now, but to solve a problem in another language, I'm forced to develop a wrapper in this one. I have a factory method to dynamically create and return an object of a type based on input from elsewhere. The provided input...

Game Design: Data structures for Stackable Attributes (DFP, HP, MP, etc) in an RPG (VB.Net)

I'm wrangling with issues regarding how character equipment and attributes are stored within my game. My characters and equippable items have 22 different total attributes (HP, MP, ATP, DFP). A character has their base-statistics and can equip up to four items at one time. For example: BASE ATP: 55 WEAPON ATP: 45 ARMOR1 ATP: -10...

Hide Member Without Using Underscore

I have a class written in VB.Net exposed to COM via the ComClass & ComVisible attributes. The class is then made available to VBA via a TLB. In VB6 you could easily mark a member hidden in the object browser but still available with a check mark. In VB.Net the only way I found to make a member hidden the VBA object browser is to prefixin...

MVC2 Multiple Model definition from linq to sql class VB.net

I call upon the VB ninjas out there. Here's my situation. I need to eventually be able to pass multiple models to a view. Currently I have a linq to sql class that, of course, has a bunch of generated model definitions. I need to make a model that implements multiple models. I somewhat understand how to do this in C#, but this project is...

DataGridView - how to hide the "new" row?

My DataGridView is read-only - the user cannot enter data into it, so that empty row at the end (the "new" row?) just looks ugly. How can I prevent it from displaying? ...

When running my site from my server I receive Server Error in '/' Application. Value cannot be null. Parameter name: type

Please see the end of the post for a detailed pasting of the error and relevant sections of my web.config I'm using VS2010, vb.net, .net framework 4.0, and SQL Server 2008 Express on Windows 7 Pro with all updates installed. I have developed a website that uses memberships, profiles, and roles. I allowed the built in providers to crea...

populating a combobox base on the grid selected

how to populate combo boxes of second form base from the datagrid results of first view ...

Using CD Writing Wizard in .NET project

I'm wanting to burn the contents of a folder to CD from within a VB.net project. After a few hours of research it doesn't appear as simple as I thought it would. Is it possible to control the native CD writing wizard on XP\Win7? All I need to do is add the folder, give the CD a name and start the burn - the Wizard would be ideal and sav...

time retrive in mask edit

Dear All , I am using the MaskedEditExtender control and i using the text box for entering times only so the time are all enterd in 24 hours format. i entered the time correctly in 24hour format with out no issue and it gets stored corectly in the data base but once i retrive it it comes wrong for example time entered as 13:30 it retrive...

GenerateResource / CoreResGen suddenly taking almost 30 times as long

Starting a few weeks ago, compiling a project (VB.NET, .NET 2.0, VS 2010) has taken several times as long as before. In Task Manager, I noticed ResXtoResources.exe taking lots of CPU for a while. I've finally been able to get some data on this using MSBuild's 'Diagnostic' output setting, and comparing that output to what I see in a branc...