Long ago I read a great book on C# and Visual Basic best practices:
Practical Guidelines and Best Practices for Microsoft Visual Basic and Visual C# Developers
by Francesco Balena, Giuseppe Dimauro
This book was very helpful to me in its time, which dates back to ASP.NET 1.1. Please list some current best practices for ASP.NET, C#, ...
My VB.NET application compiles, installs and works fine on the development PC.
However, when I take the install package elsewhere, it installs ok but crashes before any code is executed.
The error is " has encountered a problem and needs to close..."
I have removed all references to external files e.g. icon files etc.
I have only one...
I made an OCX with Delphi 2007. Now my customer claims that there is no icon in his VB when he installs this OCX.
How can I add such an icon to my OCX?
...
I am just starting out with ADO.net Entity Framework I have mapped two tables together and receive the following error:
Error 1 Error 11010: Association End 'OperatorAccess' is not mapped. E:\Visual Studio\projects\Brandi II\Brandi II\Hospitals.edmx 390 11 Brandi II
Not sure what it is I am doing wrong
...
I have inherited a rather large project consisting of an application written in VB6 and several DLL's and ActiveX controls written in VB6, VB.NET 1.1 and VB.NET 2. I want to change one of the settings for one of the DLL's written in VB.NET 2 that is in its application.dll.config file, but it seems to be having no effect.
My main VB6 app...
I often work with sales and marketing types that cannot figure out how to use Excel, let alone understand the scope of their requests from a technical perspective. Of course, it would not be fair to expect them to, but that still leaves me with a problem.
What is the best way to show marketing and sales types that they have asked for...
Hi, I have a problem in reading and loading items of a collection which belongs to another collection in vb 2005.Those are all nodes of xml file. For exemple:
Toto is a node in xml file, an item of collection Tocollect and also a child-node of Tocollect, Tocollect is an item of Collect and a child-node of it.
When write the code, are ...
Hello!
I wrote a VB script that creates an .xls file, based on .xlt file. Then it calls a macro from the .xls file that populates it with information from a database. In the last step the script saves the .xls file on the disk.
I did this before with VB and Excel 2003. Now I upgraded to Excel 2007 and before it saves the file, a windo...
How to automatically answer yes in a dialog box in VB script ?
...
I've got a multiline textbox and a button below it.
VB.NET, WinForms, .NET 2.0
System.Windows.Forms.Textbox
Multiline = True
AcceptsReturn = True
AcceptsTab = False
CausesValidation = False
No Events explicitly coded.
I'd like the Enter key to insert line-feeds and never move the focus to the next control (the button).
I'd like ...
Is it possible to test a string with IsNumeric() and for it to return true, but when you cast that same string to an integer using CInt() and assign it to a variable of type integer that it will give a type mismatch error?
I ask because I was getting a type mismatch error, so I used IsNumeric() to check the string was numeric before try...
I know this question might sound a little cheesy but this is the first time I am implementing a "tagging" feature to one of my project sites and I want to make sure I do everything right.
Right now, I am using the very same tagging system as in SO.. space seperated, dash(-) combined multiple words. so when I am validating a user-input t...
My problem is with understanding the finer point of mixed langage programming
and accessing API's in external libraries. My skills at C++ are nonexistent
and at VB, mediocre.
I have a c++ dll compiled (portaudio library), and am trying to access it from VB
(Visual Studio 2005).
I am getting MarshallDirectiveException errors when call...
I'm not considering this - I'm comfortable with C# and VB, but an expert in neither. But, some on my team have expressed an intention to do this since we're moving toward C# as a standard.
...
I have BaseAbstractClass(of T as WebControl) (VB Generics) which inherits WebControl.
BaseAbstractClass is inherited by ConcreteWrapper1, ConcreteWrapper2, and lastly, to shake things up a bit, ConcreteWrapper4. Each of these would inherit BaseAbstractClass using a different class inherited from WebControl.
What I would like to do is...
Callbacks in VB (from C dll).
I need to pass a vb function as a callback to a c function in a dll. I know I need to use
addressof for the function but I'm getting more and more confused as to how to do it.
Details:
The function in the dll that I'm passing the address of a callback to is defined in C as :
PaError Pa_OpenStream( PaSt...
I am using the Asp.net OutputCache on a page containing a usercontrol that in certain circumstances when the usercontrol is edited i want to be able to expire the page cache and reload the page with fresh data.
Is there any way i can do this from within the usercontrol?
If not, what are some other methods of caching the page that will ...
Dim count As Func(Of Integer, Boolean) = Function(x As Integer) x = 1
If (count(GetSelectedCount())) Then
'Proceed
Else
MessageBox.Show("You can only select one item at a time.", "Multiple items selected", MessageBoxButtons.OK)
End If
GetSelectedCount returns the number of items checkemarked in a grid. ...
VB has operators AndAlso and OrElse, that perform short-circuiting logical conjunction.
Why is this not the default behavior of And and Or expressions since short-circuiting is useful in every case.
Strangely, this is contrary to most languages where && and || perform short-circuiting.
...
Public Class A
Public Class B : Inherits A
Dim DictA As Dictionary(Of Integer, A)
Dim DictB As New Dictionary(Of Integer, B)
DictA = DictB
This doesn't work, as the type can't be converted. Is this somehow possible?
...