VS 2010 Form Naming Standards?
Jun 6, 2011
have a form that is used to enter employee information and I also have a class object that I use to validate data and pass employee information around. What are the proper names for the form and the class?
View 9 Replies
ADVERTISEMENT
Feb 24, 2010
Are there any naming standards for constants that are different than variables? ex: Const for the prefix of the name.
View 3 Replies
Jan 7, 2011
I'm creating an application that allows the user to create their own queries based on criteria in various list boxes and my idea was to produce the results of the SQL in a "new" DGV, which in turn will be created in a "new" TabPage in a separate form . Each time the user runs a query a new DGV and TabPage is created. I've named each "new" DGV based on a user textbox so each "new" DGV will be named differently. The problem is how do I reference each new DGV? At the moment I get-"the value of type 'Syst.cannot be converted to string"It allows me to name the DGV with a string, but not reference it!
Any ideas how I reference a DGV when its created in runtime.
[Code]...
View 2 Replies
Oct 2, 2009
In VBA from Access 2003 I was able to employ the following :Form.Controls(" in here I am able to use a string variable holding the name of the control I want to reference ").property= etc.Is this kind of thing possible in VB .netI have a listview control to which I am adding 'errors' and the tag property of each item hold a string that is the name of the control I want to set the focus to when they double click on the listview item. So I want to do something like this :<listviewitem.tag>.focus()and have the string interpreted as a control name.
View 5 Replies
Jul 22, 2010
I am using this:
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = oFile.CreateText("e: est.txt")
oWrite.WriteLine("TEST")
oWrite.Close()
Which works, but I would like to have it so instead of creating test.txt it names the document using multiple input text instance.
View 2 Replies
Oct 25, 2010
Possible Duplicate: C# Coding standard / Best practices
What VB.NET or C# coding standards are you using for your .NET applications?I was looking at hungarian notation and I don't think it is a good idea for a .NET application.
View 7 Replies
Jun 21, 2011
I have the following controller actions:
<HttpGet()>
Function News() As ActionResult
End Function
<HttpGet()>
Function News(ByVal id As Integer) As ActionResult
End Function
I want it to be smart, and go to the first if I have no ID in the url, and the second if there is. I got the following error:
The current request for action 'News' on controller type 'MarketsController' is ambiguous >between the following action methods:
System.Web.Mvc.ActionResult News() on type TradeChaseMVC.MarketsController
System.Web.Mvc.ActionResult News(Int32) on type TradeChaseMVC.MarketsController
So, I thought if i explicitly created routes without the id parameter optional, like this:
routes.MapRoute( _
"Default2", _
"{controller}/{action}/{id}",
New With {.controller = "Home", .action = "Index"},
New With {.action = "^[a-zA-Z_]+$", .id = "d{1,8}|"}
[Code] .....
It would work, but it doesn't same error. Now I know the simple solution is to call my methods different things, but i don't want to do this. I was also thinking of creating an attribute to prefix the ID method, to check for ID being there, and if it isn't dont allow that method, but I can't get this to work either.
View 2 Replies
Mar 16, 2009
I'm having the exciting task of finding out about VB.NET's <> and Not operators. Not - I'm assuming by my small use of it - is the functional equivalent of ! in languages such as C# and <> being equivalent of !=.
In VB.NET a common problem is doing Boolean expressions against objects that don't have a reference, it appears. So if we do If Request.QueryString("MyQueryString") <> Nothing Then This will actually fail if the query string doesn't exist. Why, I don't know. The way that it's done by older coders is as follows: If Not Request.QueryString("MyQueryString") Is Nothing Then
And this tends to work. To me they're functionally equivalent though operators tend to do different comparisons dependent on certain factors such as operator precedence, why it doesn't work in this case however, I do not know, and neither have I found any relevant material. I ask this as I'm having to write standards documentation and we're determining the use of either the Not or <>.
View 7 Replies
Sep 6, 2010
What international organisations exist for agreeing a standard or standards for communications, file formats and so forth?I know for instance you can apply to a company like.>>URL}..to get a barcode.
For more see.>> http://www.google.co.uk/#hl=en&source=hp&q=how+do+you+get+a+barcode&fp=9b029eaa092cce63
View 12 Replies
Mar 25, 2011
What everyone uses for naming conventions?
View 3 Replies
Feb 21, 2012
I'm a beginner in visual basic programming.I want to make login form in vb and i want that after signing in,another form opens with message "Welcome (User name)".This user name will be given at run time. So i just want a guidance in how to implement this thing in vb.
View 1 Replies
Oct 18, 2011
I've created a VB.NET2010 stub service application with a bunch of common features that I'd like to be able to use repeatedly as the starting point for various more specialized projects.
For each spin-off project I want to be able to start with the stub and then rename the service "completely", so that each instance behaves as if it was created from scratch with its own unique name.
I've tried the steps below with limited success; the re-named service builds as wanted/needed, BUT it won't run because I can't add the new service name to the StartupObject pulldown list.
Change ServiceInstaller.ServiceName from stubName to newSvceName.
View 2 Replies
Mar 5, 2009
how when i open my text editor that in the blue area at the top it displays "untitled" but when a file is saved it shows in blue the new title name.im using vb2008?
View 7 Replies
Jul 27, 2011
I am creating the pictureboxes through code in VB, and I am trying to give them instance names through code, since they do not exist in the forms physically (I cannot manually name each one), only when I run my application (using VB 2008 express). The pictures work, they are displayed when I run the application but I need to find a way to be able to call each one because I need to create motion animation for every separate picture object.
[Code]...
View 2 Replies
Apr 5, 2010
Mostly because of reading this site, I'm trying to move away from Hungarian Notation. Or I guess the improper (system) Hungarian.
I can figure out a better way to name most data types, but I don't know what to do with objects. What would be a good naming convention for objects? I use objRS for recordsets now.
View 3 Replies
Mar 16, 2011
I know this is a stupid question maybe, but what is the naming standard for generics?Of t or Of TEntity or Of..it doesn't really matter?I see IQueryable(Of T) but then DBSet(Of TEntity).
View 3 Replies
Mar 1, 2011
I wish to be able to instantiate my Cell class while naming the cell instance with such name as "A", "B", "C", etc. just like in an Excel spreadsheet.
I have my Cell class like so:
public class Cell {
public Cell(Range nativeCell) {
NativeCell = nativeCell;
[Code].....
I would need to generate a name based on the alphabetic letters and double and triple them once I encounter the last alphabet letter 'Z'. The algorithm would have to generate the letters that I would concatenate with the rowIndex value that would result to this naming strategy such as Excel.
The letters would be:
A, B, C, D...Z, AA, AB, AC...AZ, BA, BB, BC...BZ, CA...XAA, XAB, XAC...
While we clearly know that colIndex value 1 will definitely designate column "A", value 2 = "B", value 3 = "C", etc.
My problem is particularly when we double the letters.
how I could achieve this in the simplest possible form?
View 2 Replies
Jan 25, 2012
I have a class (let's call it foo) that has several public properties.
private _fee as object
private _fie as object
private _fo as object
[Code]....
So far this seems to work... I'm just worried that something might get screwed up scope wise.
What is the normal way someone would name the constructor variables in a class like this?
View 9 Replies
Sep 1, 2010
Can some one please be kind enough to link me m$ naming guide lines.
View 2 Replies
Oct 30, 2009
I am trying to create a number of objects depending on the width of a row of an array, is there a way I can change the name of the variable being Dim 'd as I don't know how wide the array will be.
I have been trying something along the lines of:
pseudocode
For x as integer = 0 to UBound(MyArray,2)
Dim Object & CStr(x) As Object Type
Next
View 3 Replies
Jun 9, 2010
I am generally not one to engage in subjective arguments over matters like variable naming, code formatting, etc. So I have no intention of starting an argument here.I just came across this (old) blog post which recommends not prefixing member variable names:
[Code]...
I get it: member variables can be lower camelCase, and public properties/methods can be PascalCase. But VB.NET is case-insensitive, so you can't really give a private member the same name as a public property except with a lower case first letter.I've generally prefixed member variables with an underscore, but I've been told that's not idiomatic.
So really I'm just curious: how do you name your member variables in VB.NET? And is there a "standard" way?
I'm not asking because I believe there's a "right" way or because I particularly want to change my style, and certainly not because I have any desire to tell others they're "wrong." Like I said, I'm just curious.
View 7 Replies
Jul 7, 2009
In the code below, the namespace is called "Navigation" which I think is correct. Then I have a class called "Heading", which by definition is the direction a person/vehicle is truly pointing towards. I think that is also named correctly. In the code below, I have four things I have named:
_WhatToName1, WhatToName2, WhatToName3, and WhatToName4.
The value that gets passed in and stored is a double between 0 and 360 -- essentially the degree value from a circle. For WhatToName3 and WhatToName4, I have seen a lot of places that just use "value" as the name. Is that standard?
Namespace Navigation
Public Class Heading
Private _WhatToName1 As Double
Public Sub New(ByVal WhatToName3 As Double)
Me.WhatToName2 = WhatToName3
[Code] .....
View 18 Replies
Sep 21, 2010
I have experienced this in both VB 2005 and 2008. First, design a form by placing your UI elements where you want them. Then, go back and start naming your controls the way you want them (i.e. "txtWhatever" instead of the default "TextBox1", etc.).I find that after you change the name of a control, there is a slight but annoying delay as VS IDE digests the fact that you changed the name, thus slowing down my workflow. I recall that this process was much more rapid-fire in the VB6 days - i.e. name one control, click the next one and start typing, boom-boom-boom.
Has this annoyed anyone else, and if so, have you found any kind of remedy to speed things up in this regard?
View 8 Replies
Sep 16, 2010
What is the most commonly used convention (in C# and VB) to name object, when I want to emphesize that it is an instance of class that implements some interface. Like here:
//is iDisp correct name?
protected void Dispose(IDisposable iDisp)
{
iDisp.Dispose();
Console.WriteLine("Disposed");
}
View 4 Replies
Mar 25, 2011
I'm relatively new to .NET and am wondering how people handle naming their private variables and the public properties that access them. Like if you want to be able to just read it, but not write to it.
[Code]...
So far I've taken to putting a 'l' (for local) in front of the all the private variables so as to be able to use the full name for the property. Is there a better way around this, or do you just always have to have different names for private variable/public properties? If so, what sort of conventions do people use?
Its not a huge deal, its just a minor annoyance and I was wondering if I was missing something.
View 4 Replies
Apr 12, 2011
I am getting a strong naming violation for the dll file and really new to signing applications. How would I proceed in resolving this so that I can build the application I will be supporting? Also, as the FreeImage reference gets updated will I need to re-sign it?
View 9 Replies
Jun 11, 2008
I am trying to convert visual basic 6 code to vb net. How do you in Visual basic .net get the universal naming convention.
View 8 Replies
Nov 26, 2010
In the past when I have written classes and constructors, I named the variables in the constructor parameter something different than what would have been stored in the actual class itself.What I do now is name them the same, and reference the internal variables with Me.varname.Here is a class I just started building.Is my naming convention incorrect? [code]
View 1 Replies
Mar 15, 2012
I am using 3 unbound DataGridView controls to display certain information. To load the information into those DGVs, I am pulling the information from an encrypted file, decrypting it, parsing the information, then trying to fill the DGVs with that information. The loading from the file is called by the menu item click. Here is what I have so far:
Private Sub miCLoad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles miCLoad.Click
Dim FilePath As String = "C:FListCList.clt"
[code].....
View 2 Replies
Jan 5, 2011
iv got visual basic 6.0 and im trying to change the naming conventions because i need to change them to 2008 standards the code is for a basic book shop.im looking ofr the code for the calcualte button on a till.you enter the title,quantity and price.then it updates for extended price 15% discount and the discounted price. There is also a running total of no of books sold and the total no of dicount given in € the code is
[Code]...
View 5 Replies