Suppose I have a class that represents a product to be priced using one of a number of different pricing strategies. This pricing occurs hundreds of times per second, so to eliminate repetitive if/else statements I am instead using a delegate to launch the appropriate strategy, like so:
Private Delegate Sub PricingModel(ByVal params As ...
Does a For-Each loop in VB have an iteration count, or would I have to do that myself?
...
Is there a way to force a form to be active and shown?
From another form i am doing:
Me.Hide
Form2.Show
When this code is run, the Form2 is minimized.
I've also tried:
Me.WindowState = FormWindowState.Normal
in the load event, and it still loaded it in minimized mode.
...
My form looks like this with a DataGridView:
http://sites.google.com/site/shadchanproject/Home/Untitled.jpg?attredirects=0
I would like to make it look more professional. Can someone recommend a "makeover" for it? Perhaps there is a more attractive way to display this data.
...
I have written code to pull some data into a data table and do some data re-formatting. I need some help splitting some text into appropriate columns.
CASE 1
I have data formated like this that I need to split into 2 columns.
ABCDEFGS 0298 MSD
SDFKLJSDDSFWW 0298 RFD
I need the text before the numbers in column 1 and the...
In VB.net 3.5 SP1 I have a Windows Form with three DataGridView controls. One DGV takes up the whole bottom half of the form. The other two share the top half and are side-by-side.
I'd like to have each DataGridView scale appropriately. More specifically I'd like to have column widths and row heights adjust to the size of the form....
I need to iterate a collection of objects. Based on a property value of the object, I need to group objects together. I also need a total count of each discrete property value. I do not know how many groups there will be and there could be 1 to n objects in each group.
How do I do this? Are there algortihms that could help me out with t...
I converted our project from .NET 2.0 to 3.5 and am looking for optimizations that can be done utilizing 3.5 framework. What are some of the things I can do with 3.5 as in Datastructures. Also any suggestions in using DataAccess apart from LINQ to SQL.
Any suggestions/pointers would be great. I am not looking at any specific optimization...
Can someone tell me how I go about upgrading the Telerik ASP.NET controls? I am currently using the Q3 2008 release and I just recently bought the Q1 2009 SP1 release. How do I upgrade my projects? Do I need to uninstall the old one and install the new one or just install the new one? Also how do my projects get upgraded? Also, what abou...
If I have a complex structure which contains properties which are both simple and complex types, how can I iterate over all the properties of this structure and any child properties which are not simple types?
I have a complex type called file, which contains lots of string properties and some which are other complex types which contain...
I'm currently on a co-op term working on a project nearing completion with one other co-op student. Since this project has been passed down from co-op to co-op, poor practices have been taken along the way and testing has been left until the end. I've decided I'd like to write unit-tests to learn something new while testing.
However, ...
Our current solutions/projects have several classes combined into one file, I'm told this was done due to the slow compile times in VS.
Is this a confirmed problem and solution?
Can we break these apart now that we are using VS2008 Team system? Has anyone else separated the classes into different files and still had good performance?
...
I have 3 similar functions, that only change based on numeric type:
<Extension()> _
Public Function ToNullableShort(ByVal str As String) As Short?
Dim intReturn As Short
If Short.TryParse(str, intReturn) Then
Return intReturn
Else
Return Nothing
End If
End Function
<Extension()> _
Public Function ToNulla...
I have two tables: a schedule table that contains information about how an employee is scheduled and a numbers table in which each number corresponds to a date.
The tables look like:
[Employee Schedule]
ID Employee ID Project ID Day ID
----------- ----------- ----------- -----------
1 64 2 168
2 ...
Is there a way to plot a chart with google chart api so that the X-axis values are days in a month?
I have data points that are not provided with the same frecuency. For example:
Date - Value
1/1/2009 - 100
1/5/2009 - 150
1/6/2009 - 165
1/13/2009 - 200
1/20/2009 - 350
1/30/2009 - 500
I want to make a chart that will separate each data...
I need a way to programaticaly block and then later unblock specific websites based on their domain names. I only need to block browsers (so http & https would be sufficient, I guess?) but not just Internet Explorer, it should also work for anyone trying to run Chrome or Firefox too.
This needs to work on Windows XP and be usable from ...
how do i include the skype libraries in my vb.net app?
how do i make a call on skype through vb,net?
...
Usage:
Users create pretty HTML news letters in another app. They post the newsletter to the web, but they also want to set the contents of the HTML news letter file as the body of an email and send it using Application In Question.
The users understand to use absolute link and image references when sending an E Newsletter.
Environm...
Porting an application from C# (1.1 framework) to VB.NET (3.5 framework), and I have this one last event based issue I cannot get my head around.
This is the original C# code
public delegate void SpecialEventHandler(object sender,SpecialEventArgs e);
public event SpecialEventHandler SpecialEvent = null;
_SpecialLogWriter SpecialWrite...
I know it most likely possible to access a winforms menu like an array but I am not seeing it in the menu designer of VS2008? What I mean is, my app has a typical menu bar across the top, with multiple items on each drop down. As it is written (I inherited this code), each menu item is a separate name, i.e.
myMenuOption1MenuItem
myMenuO...