I'm in the process of Moving a project from Visual Studio 2003 to 2005 and have just seen the
The event Click is read-only and cannot be changed
when using inherited forms regardless of the Modifier on the Base Forms Controls will make all the Controls from the Base Readonly in the designer (Though in 2003 it didn't work this way)...
Hi again,
When trying to do a query using LINQ in VB.net in order to select some employees of a datatable previously filled with a dataset I have a problem when using where clause. What I want is select all the employees of the datatable except those that appear in a list of excluded employees named CurrentExcludedEmployeesLst. So I fol...
Writing a small command line tool, it would be nice to output in different colours. Is this possible?
...
I have seen a lot of info on how to subtract one datetime from the other and how to add years on to a datetime. but the following is giving me a headache....
When a user inserts a record a hidden field called subdate with a value of datetime.now is added to the db.
I then need to have an 'old records' page that lists all the entries th...
Hi Folks
I am trying to use a Main () function in a class to control the program flow in my vb .net Windows Forms application. I have added a splash screen component and a login screen, and customised my main sdi form. I have set the startup form to be my main function in the Application Page of the Project Designer, and everything seem...
Hi all,
Im a complete novice to the "best practices" etc of writing in any code.
I tend to just write it an if it works, why fix it.
Well, this way of working is landing me in some hot water. I am writing a simple windows service to server a single webpage. (This service will be incorperated in to another project which monitors the ser...
Hey guys I'm having a problem while reading a config.cfg file of my program. I can read the 23. char of the file but I can't read the 24. char (last char in file).
This is the code:
Dim CFGReader2 As System.IO.StreamReader
CFGReader2 = _
My.Computer.FileSystem.OpenTextFileReader(CurDir() & "\Config.cfg")
Dim Server(2) As String
Server(...
Does a .cs(C#) file compile under a .vbproj(VB.NET project) ? (VS 2005, .NET 2)
Say I have Animals.vbproj (namespace Animals)
I have Wolf.vb, Tiger.vb, Cat.vb, and a Human.cs
Could I use Animals.Human from a external AnimalsForm.vb form? Why?
...
Hi I want to know how to take a backup of database using programatically in VB.net of SQL Server 2005. if you are having and idea about it then pls send me the code for that.
...
I override a list in VB.
In C# the code compiles and looks like this:
class MyObjectCollection : IList
{
...
/// <summary>
/// Gets or sets the element at the specified index.
/// </summary>
public MyObject this[int index]
{
get { return (MyObject)innerArray[index]; }
set { innerArray[index] = ...
I remember reading in passing that some of the new language features in C# and VB that are available in VS2010 are backwards compatible with earlier versions of the framework, but that others are not. I'm pretty sure this was in reference to the new property syntax in VB.
Which new features are language features vs which ones are frame...
Hello,
I am searching for a way to Get Information from a local printer. Maybe with the SNMP Protocol?
The printer is connected with USB or PPI (parallel port). All printers have a internal TotalPagesCount and support SNMP.
Here some examples of the Printers:
Brother HL1430
Brother HL5150
Brother HL1230
Kyocera 1118
Kyocera 1128
Kyo...
I seem to remember seeing some neat way of calling InvokeRequired and Invoke to avoid repeating too much code in every event handler but I can't remember what that was.
So does anyone know a neat way of writing that code?
Preferably for VB.Net 2005.
...
Hello,
I am wondering if it is possible to style my VB.net application with CSS and HTML. So far all I can do is apply a windows based theme.
Any help would be really appreciated!!
...
I have seen the Tuple introduced in .Net 4 but I am not able to imagine where can be it be used. We can always make a Custom class or Struct.
Edit: I am looking for an example which can also be considered inside the bracket of best practices.
...
Date column does not display in sorted in GridView using vb.net. In sql server the select query is returning records in sorted manner or in order by. But for some reason GridView does not display properly. it goes to an event preRenderComplete then it binds automatically
Protected Sub Page_PreRenderComplete(ByVal sender As Object, ByV...
I am serializing a generic dictionary in VB.net and I am very surprised that it is about 1.3kb with a single item. Am I doing something wrong, or is there something else I should be doing? I have a large number of dictionaries and it is killing me to send them all across the wire. The code I use for serialization is
Dim diction...
When I click my "Query" button, my TestID textbox TestIDTxt retained its value, but both myDatePicker's are blank without any value.
Question: How do I preserve StartDate.SelectedDate and EndDate.SelectedDate between postbacks?
Solution:
As suggested multiple times, removing ReadOnly="true" on the DateTxt kept the text value across pos...
Is there a way to do this in C#? I know that the subclass will call the superclass constructor before calling its own constructor, but what If I have some code on the superclass that should only be executed after all the subclasses constructors have been called?
...
Hi guys,
I'm working on a new test app (just out of curiosity really) which is an add on to iTunes. I'm trying fairly basic things at the mo, and have managed to control volume, pause etc etc.
I have a function from some demo code which loops through all the tracks in my main library and gets their album name... I then show the indivi...