vb.net

Finding Squares in an array

I have an 2 dimensional array that is full of 1s and 0s such as 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 You can see there is a square in th array. I am trying to make a function that will make a rectangle or ...

Upload Photos in asp.net

Hello i have the code below to upload pictures for my application. I will like to add a line or more to this code that will display a success message like this"Picture has been uploaded successfully" I know i will need to add a label control to display the message but i dont know how to go about. Here is the code: Imports System.Data ...

VB.NET to C#: Imports/using

Is there a way to "Import" a static class in C# such as System.Math? I have included a comparison. Imports System.Math Module Module1 Sub Main() Dim x As Double = Cos(3.14) ''//This works End Sub End Module Vs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Math; /...

Question about datagridview

I have the following code which return a dataset in cuestionarios.obtenerCuestionarios Dim cuestionarios As New ObtenerCuestionarios Dim ds As New DataSet("Cuestionarios") ds = cuestionarios.obtenerCuestionarios DataGridView1.DataSource = ds.DefaultViewManager DataGridView1.DataMember = "cuestionario" Which creat...

OpenGL save render for later use

This is a pretty beginner question, but given that I render a complex shape in OpenGL which requires a lot of calculations, is there anyway to export that to a state like a model that can be opened again later given you wont edit it again? I can't create them outside the program (with something like Blender) since the shape is computed ...

Customizing the default "The application failed to initialize properly (0x00000135)" message

Hi, When the .net framework cannot be found, the following message is displayed: "The application failed to initialize properly (0x00000135)" Is there a way to make it a tiny bit more specific (instead of writing a wrapper in another language), eg. by telling the user about the .Net fx? Thanks! CFP. ...

VB.NET: is using Strutures considered nasty?

I use to use Structures quite a lot in the VB6 days, and try to avoid them now with .NET. Just wondering if using structures in 2010 instead of a Class is considered nasty? Thanks for the help. ...

VB.NET: Intellisense on items declared as 'Object'

I have a shared Queue that I use to dump various messages contained in different Classes, so I have its type as Object. The prob is, the messages are dequeued and processed but since the message type vary, Intellisense doesn't show the classes properties or methods. How does one find get Intellisense to work to? ...

cannot find microsoft media control component in vb.net 2008

hello, i tried to open Addreference->microsoft media control i cannot find it.... can any one tell me y i cannot find it ...

vb.net ADO CommandBuilder Insert ?

I'm using vb.net 2008 and ADO.NET. When using the ADO CommandBuilder and the Insert Command how can I get the newly created Key? (my Table as an Identity column and this is the key.) ...

How many variables point to the object and which [.net]

I want to make my own xml-serializer class because I need other formatting than the System.Xml.Serialization.XmlSerializer does. My idea is to treat properties of primitive type (such as Integer, Double, String) as XmlAttributes. To properly implement a usable Xml-Serialization I need to know which variables point to the same object (th...

Serching Database using LINQ

Hi, I have a database table (Access Database) that contains data under OrderNo field. When user enters new OrderNo, I want to check if that OrderNo already exists or not. If so, a message should be displayed. How can I do it using LINQ? Thanks Furqan ...

Setup Wizard outputs to be included from MyProject

i, When we add a setup project, a window appears (step 3 of 5), Choose Project Outputs to include. I normally choose Primary output from MyProject, which is .exe file I assume. I want to know what are other elements and what are their functions, especially Source Files from MyProject and Content Files from MyProject. Thanks Furqan ...

Loop through List(of Items) with each one being asynced downloaded

Hi, I have a list of object that i loop through, and in this loop i have an async webrequest that is getting a response from a site, according to the current object's data. How can i wait for each async request to complete b4 going to the next object in the list? Should i use application.doevents? ...

How can I bind an entity Data Source to the results of a query

I have a query that will go away an and find data Dim HSNs As String = String.Join(",", ListOfHSNs.Cast(Of String)().ToArray()) Dim query As String = "SELECT VALUE O FROM v_BillData AS O WHERE O.HSNumber IN {'" & HSNs & "'}" Dim hs As New ObjectQuery(Of v_BillData)(query, CType(Session("ObjectCon"), ObjectContext...

Dynamically add <asp:content to page, Nested masterpages

hi all, I am currently using nested masterpages in my latest asp.net 4.0 project and i want to change the look and feel dynamically, so the homepage may just be 1 column wide, about us page may be 2 columns etc. I am dynamically loading the masterpage dependant on the record selected in the DB (1column.master, 2column.master) on the pr...

ASPxGridview Custom Sorting?? by Month Name

Hi, I have an aspxgridview which groups first by year and then by month. Basically my query returns Month and year as seperate columns. Now if I return month as "January or February" then ASPxGridview does not know how to sort this. I heard of custom sorting, but even then if I return month column as a number and use dataitem templat...

Select method of Range class failed via VBA

This is the code that I'm currently working with, and I'm getting this problem. I'm novice at Excel and I can't figure out what's wrong. Private Sub cmdRecord_Click() Sheets("BxWsn Simulation").Range("Result").Select //This is the line with the problem, as excel told me. Selection.Copy Sheets("Reslt Record").Select Sheets("R...

VB.net findwindow/findwindowex

Hey all, i am trying to figure out how to go about finding this window's label when the control name is the same as all the other labels on the program. WindowsForms10.STATIC.app.0.378734a WindowsForms10.STATIC.app.0.378734a WindowsForms10.STATIC.app.0.378734a All 3 labels are named the same. The one i am most interested in is a progr...

#define - Migrating C++ to C# or VB.Net

Hi.. I need some advice on how to do the following in either C# and VB.net. In C++, in my header file I do the following: #define StartButtonPressed Input[0]==1 // Input is an array declared in .cpp file In my .cpp file, i have a code something like this: if(StartButtonPressed) // do something The reason of me doing so is s...