vb.net

How to make a object moving - How to make game with VB.NET

How to make a object moving on the screen- How to make game with VB.NET - In 2d game, ex i see a mario charator, which is object ( Label, image v.v.v) - Is there a physical engine for vb.net Sorry, bad english ...

Reading dates in a spreadsheet to and from a DataSet

Hi! My application uses a badly arranged Excel spreadsheet as a data source. I say badly designed because there's no unique identifier to each row aside from the column where dates and times are found. Long story short, my app uses the date and time on each row as an identifier to retrieve information from the other columns in the row....

How can I detect what OS the user is running?

I am using VB .Net 2.0. I know I can detect the OS using System.Environment.OSVersion Can anyone tell me if there's a list somewhere where I can find what that generates for different OS versions. Specifically I am trying to detect if a user is running Windows 7 64-bit. ...

Update a TextBlock with elapsed time causing an UnauthorizedAccessException

I have a very simple StopWatch application in Silverlight. I have the following private properties in my MainPage class: _StopPressed (bool), _TimeStart, _Elapsed (string). I also have a "Start" and "Stop" button. The "Start" button calls a method called UpdateTime that constantly updates _ElapsedTime until _StopPressed is true. Wh...

Validation against to database

I have several textboxes and users are entering same data in one of these fields. I have another table which is store machine_no. I would like to restrict user for possible wrong entries. Example if there is no machine_no #4 on table, user will be warn with message box. Machine_no Value1 In first day 1 500 2 ...

WCF Error Architecture

I am looking at implementing a Web Service API for our product. I have figured out how you go about the general architecture/fault handling within WCF. My question is a more general one of how to design the overall error handling system. For example I have a method called SaveCompany(companyobject). Each company name needs to be uniq...

DataTable sort test question

I was asked this question recently in a test, which I didn't pass. For the life of me, I couldn't spot what the problem was. It's probably something really obvious as well, but even a colleague of mine couldn't spot it either. The best I could come up with was issues with bottlenecks and naming inconsistencies of parameters! I blame i...

[VB.Net] How do I dispose a TextBuilder ?

Hello there! Out of pure curiosity, is there a way to free the memory used by a StringBuilder, other than the obvious MyBuilder = New StringBuilder and MyBuilder.Remove(0, Length) (although I guess the later wouldn't free anything, would it?) Thanks! CFP. ...

.Net RAD IDE - Opensource Preferred

I am looking for a tool that would allow me to use LINQ and build a .Net app rapidly. ...

Pound signs (£) disappearing from ASP.NET strings

Hi all, I'm usually a LAMP developer, but some .NET work has arrived on my plate and I'm a bit stumped. If I run the following code: <% poundsign = "£" %> <% Response.Write poundsign %> <% Response.Write "£" %> … nothing is displayed. However, outside of the <% %> tags (ie in the HTML) £ displays correctly. I have no trouble displa...

Basic LINQ to SQL Question: How to call stored procedure and retrieve single return value.

I'm new to LINQ and am having a problem getting proper results from a simple (working) stored procedure that takes no parameters and returns a single Integer. When calling this sproc with LINQ its returnvalue is always 0. When run using tableadapter or directly on the sql server it works, returning 6 digit values like 120123. Here is ...

How do you add image file to a image list in code?

I have an image list and would like to add a directory of images to the image list in my code. How would I do this? When I run the code: 'Load all of the items from the imagelist For Each path As String In Directory.GetFiles("Images\LanguageIcons\") imlLanguagesIcons.Images.Add(Image.FromFile(path)) Next I get an out of memory ex...

VB.NET ComboBox - Need to force a redraw when a key is pressed when it is dropped down.

I am using a DrawItem and MeasureItem events to paint a combobox with a DrawMode of OwnerDrawVariable. Basically, I'm trying to have the user highlight a selection with the mouse, and then press the space bar to toggle the Save status of a song list. Then I call the Me.Refresh() event for the form in an attempt to redraw the form and t...

Location of VB.NET "source" code, similar to Java's JDK src.zip

Hello, I apologize very much if this question has already been asked, or is hard to understand. I have not been able to find the answer after much searching. Does VB.NET have anything similar to Java's JDK source code? When I used to work in Eclipse, I could right click and view the generated code, or "look under-the-hood" so to speak. I...

Creating a Custom Media Library - Loading Images for Rendering (VB.net)

OK, I'm working on a project right now and I need to create a graphic library. The game I'm experimenting with is an RPG; this project is expected to contain many big graphic files to use and I would prefer not to load everything into memory at once, like I've done before with other smaller projects. So, does anyone have experience wit...

VB2010 - KeyDown Events Not Executing

I have a pong type of game and I want the spacebar to pause the game... Here is my code to detect when the space bar is pressed. Private Sub PongMain_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.KeyValue = Keys.Space Then Application.Exit() End If E...

Write metadata to PNG image in .NET

I see more than a few questions asking how to read metadata from an image, but I haven't seen as many asking how to write metadata. Basically, I need to add one item of metadata ("ImageDescription") to a PNG image I'm generating dynamically (creating a Bitmap object and procedurally generating all the content in it). What would be the ...

MessageBox-confirmation for critical operations

In my projects (WPF) I use System.Windows.MessageBox to show the user a confirmation dialog for operations that are critical, such as a delete-operation. My problem is that if I specify as button value MessageBoxButton.YesNo, the user cannot use the escape-key to cancel the operation. IMO this is one of the most annoying things, a progr...

How to use VB `option` statements (explicit/infer/strict) in T4 templates?

When creating a T4 template in VB.NET, how do you specify Option Explicit, Option Strict, and Option Infer settings? There's some sort of <#@ #> tag for doing this, but I can't find it. ...

How can I check if a character is a valid Key in VB.NET?

I need to check if a character is a valid Key (type) in VB.NET (I need to turn "K" into Keys.K, for example). I am currently doing this to convert it: Keys.Parse(GetType(Keys), key, False) However, if key is not valid it throws an exception. How can I check if key is a valid character? ...