vb.net

Create table from a business object with conditional layout

I need to generate a table from a List(Of Students). My Student class has properties for AcademicYear, TeachingSet, Surname and Forenames, is sorted in that order and also properties for ID and start date. The table should nest TeachingSets within AcademicYears and then the students within the TeachingSets, as shown in the table I've moc...

How do I resolve this scope issue in VB .NET?

I have a code structure something like this: For row = 1 To numRows Dim arrayIndex As Integer = 0 For column As Integer = startColumn To endColumn ' whatever code arrayIndex = arrayIndex + 1 Next Next Dim arrayIndex As Integer = 0 For column As Integer = startColumn To endColumn ' whatever code arrayIndex = a...

datagridview viewstate question

I have a gridview in asp.net using vb 2005. on " Protected Overrides Sub Render"some of the data in the columns gets modified. when i do a view source.. and look at a column1's values it says 0010. in the render i am taking a value of ab0010 and turning it into the 0010 that is seen in the view source.. later on, there is a button_cl...

Using Office 2007 extension (i.e. docx) for skin based On-Screen keyboard.

Hi guys, I'm creating a On-Screen keyboard for my application, and it supports skins as well. Here's what I'm doing with the skins, I have a folder which contains some images and a xml file which maps the images to the keyboard, I want to be able to have the folder as a zip file like in Office 2007 (.docx) and iPhone firmwares (.ipsw), I...

VB.NET Enumeration Representation

Is it guaranteed that the numeric values for an Enum with only uninitialized values start at zero and increment by one in the order defined? ...

Why isn't this infinite recursion? How does default variable initialization work in VB.NET?

I just made an interesting mistake in my code: Dim endColumn As Integer = startColumn + endColumn - 1 The code was actually supposed to be: Dim endColumn As Integer = startColumn + numColumns - 1 The interesting thing is, I would think that this code should be recursive and loop indefinitely, as the initialization of endColumn sort...

checkedlistbox vb.net multiExtended selection mode

Hi! First of all sorry because I don't know if this question is correct to put here. I have a little problem with a little VB.NET application that I am building. This is a winforms applications not WPF. I have a checkedlistbox with a few items and I want to allow user to select more than one using arrows keys or mouse clicks combined ...

VSTO Outlook : How to add a group into a build in tab ?

I wanna ad a group on the main tab of compose mail, like in this picture. ...

Linq to Datarow, Select multiple columns as distinct?

basically i'm trying to reproduce the following mssql query as LINQ SELECT DISTINCT [TABLENAME], [COLUMNNAME] FROM [DATATABLE] the closest i've got is Dim query = (From row As DataRow In ds.Tables("DATATABLE").Rows _ Select row("COLUMNNAME") ,row("TABLENAME").Distinct when i do the above i get the error Range ...

Differences in ansychronous VB.NET and C#???

So I've been posting this week for help with an API that has asynchronous calls. You can view the CODE here: http://stackoverflow.com/questions/2638920/c-asynchronous-event-procedure-does-not-fire With a little more digging, I found out that the API is written in VB.NET and I created a VB.NET example and guess what . . . the asynchronou...

ASP:Chart control - databind pie chart from datatable

Hi folks, I've got a datatable with two columns "Status" (string) and "Total" (integer). Status Total Success 34 Missing 2 Failed 10 I want to databind this into a pie chart with each Status per slice but I'm not sure what method of data binder is required? Thanks, Jonesy ...

Editing a Gridview row with drop-down lists gets too wide - how can I use popup panels instead?

I have a series of GridViews in a Tab Panel - databound to a generic List of Business Objects. The columns in the Gridview are all similar to the following: <asp:TemplateField HeaderText="Company" SortExpression="Company.ShortName"> <ItemTemplate> <asp:Label ID="lblCompany" runat="server" Text='<%# Bind("Company.ShortName")...

find the website url when it hits my landing page, like the url

i want to find out the websites that are people are coming from when they come on my website. so lets say someone comes from google.com or yahoo.com or someone came through email or somewhere else. how can i do this? ...

How do I get the DateTime that a page was last published in Sitefinity?

Here is what I have: Dim cmsManager As New Telerik.Cms.CmsManager() Dim currentNode As Telerik.Cms.Web.CmsSiteMapNode = CType(SiteMap.CurrentNode, Telerik.Cms.Web.CmsSiteMapNode) Dim currentPage As Telerik.Cms.ICmsPage = currentNode.GetCmsPage() Dim currentPageId As Guid = currentPage.ID Dim pageFromDb As Telerik.Cms.IPage = cmsManager....

VB.Net List.Find. Pass values to predicate

Having a bit of trouble using the List.Find with a custom predicate i have a function that does this private function test () Dim test As Integer = keys.Find(AddressOf FindByOldKeyAndName).NewKey here's the function for the predicate Private Shared Function FindByOldKeyAndName(ByVal k As KeyObj) As Boolean If k.OldKey = ...

how to check if ANY directory exists without knowing a specific directory name, but rather just the folder that the folder might be in

In vb.net how do you check if a ANY directory exists inside a directory I would need to know if there is a folder inside the c:\windows directory (WITHOUT knowing if there is ANY directory is in there). ...

how do you convert a directoryInfo file to string

Problem is that i cant convert to string Dim path As String = "..\..\..\Tier1 downloads\CourseVB\" If countNumberOfFolders > 0 Then 'if there is a folder then ' make a reference to a directory Dim di As New IO.DirectoryInfo(path) Dim diar1 As IO.DirectoryInfo() = di.GetDirectories() Dim dra As IO.DirectoryInfo '...

Disable proxy for entire application?

Ever since upgrading to Visual Studio 2010, I'm running into an issue where the first web request of any type (WebRequest, WebClient, etc.) hangs for about 20 seconds before completing. Subsequent calls work quickly. I've narrowed down the problem to a proxy issue. If I manually disable proxy settings, I don't experience this delay: Di...

Highlight Specific Rows In ListView

Can anyone help me on how to highlight specific rows of ListView in vb.net? ...

VB.NET code for running multiple threads

How to I run multiple threads in VB.NET? Say I need 2 threads - one that prints 100 numbers in a loop and the second one that asks for the user's name and prints it inside a message box. ...