What Are The Following Key Constants On The Keyboard?
Sep 24, 2011
Can anyone explain what the following vbkey constants are as actual key presses? I've tried searching and really can't find any info other than vbKeyCancel = CANCEL key. Well, what's a cancel key? I dont have one on my keybaord...I read somewhere that CANCEL = Ctrl+C. Is that true? If so, what are the other few I have listed?
Constant
Value
Description[code].....
View 2 Replies
ADVERTISEMENT
May 31, 2012
I am calling this function when a button is CLICKED and received the error; The name "The" is not permitted in this context. Valid expression are constants, constants expression, and (in some contexts) variables. Column names are not permitted. Unclosed quotation mark after the character string 'True)'.
The function is as follows;
Private Sub Save()
Dim conn As SqlConnection = GetDbConnection()
Dim query As String
Dim cmd As New SqlCommand
View 3 Replies
Oct 13, 2010
I have created a virtual keyboard like the "Windows onscreen keyboard". So, I have used the method sendkeys.But if I click on the button, it doesn't write nothing.
I think I have a problem with the FOCUS.As you can see, the "Windows onscreen keyboard" is always on top.This doesn't happen to my form. How can I do?
View 4 Replies
Nov 28, 2010
There are a bunch of constants like vbTab in VB.Net, is there corresponding one in C# ?
View 1 Replies
Apr 24, 2012
i cant understand what constants are.
View 3 Replies
Jun 29, 2010
Say I have some constants that depends one of other, and I decided to keep them together in a container instead of keeping it as individual constants in a class.I thought use a Structure for that scope, but compiler force me to declare a private member for that structure.
[Code]...
View 4 Replies
Jan 8, 2009
How would you declare constants from a .dll, so you can use it in your program.
View 2 Replies
Jan 4, 2010
i was concerned if constants take up storage. if a class had 10 integer constants at class level, will that adds up to 40bytes of storage or is that actually not true because they are constants?
what i'm trying to do: find the best place to put the constants that i need to access at class scope, and whether its best to make them shared or not. [constants are private]
View 31 Replies
Sep 2, 2011
I want to define several constants of pens like SystemPens. How do I do that?
View 6 Replies
Apr 6, 2011
Every time I do something that ends up using windows API calls in VB, I always end up having to look up the values for the windows constants. Does anyone have a file with a class or something for VB that defines all the WIN-API constants?
View 2 Replies
Oct 17, 2011
I have two list boxes that have a list in each and each one has a constant. I am trying to add the selections that are made together and output the total in a third label. I am stuck at this point and am not sure how to proceed, it is entirely possible that i am doing it wrong. Would someone please have a look at this and let me know what the next step would be or if there is a different wayof doing it than I am.[code]...
View 4 Replies
Jul 30, 2010
It would be good if visual basic had standard math constants like pi, the Euler number, and others built-in so one doesn't have to define them each time and have the possibility of making typos. Even some of the physical constants in MKS unit could be included like the Boltzmann's Constant, speed of light, permittivity and such. Each could be a special simple like kb for the Boltzmann's constant. Or it could be a properties like phyconst.c for the speed of light, phyconst.kb for the Boltzmann's, phyconst.sb for the steffan-Boltzmann's constant, pmathconst.e for e=2.71.
View 3 Replies
Dec 10, 2009
Calculate and display the total cost of the sale, as well as the total cost of all sales and the average cost of all sales. - Clear the box for the number of yards, the total cost, and return the quality, padding, and installation settings back to their defaults. Use constants for the cost of each quality of carpeting ($4.95 for Fabulous Flat, $8.95 for Precious Plush, or $12.95 for Super Sculptured), the padding charge ($1.25 per yard), and the installation charge ($3.50 per yard).
[Code]...
View 5 Replies
Feb 23, 2010
I've got a situation where I need a table of constants in my app. It's actually a table of 43 formatting options where the description will appear in a drop down and the detailed settings will be used by the codeIt appears that VB can't do arrays of constants. So I've fiddled around with a Constructor in a class that creates a new array then loads up each element with hard-coded .Add statements. It doesn't seem elegant though.So I then decided to try an XML file, that I load in the Constructor and assign the contents to an array. This is what I've decided is the best, most elegant, option - but I'm throwing this question in to see what you people might recommend ! The data is mostly strings
View 11 Replies
Mar 18, 2009
We're trying to trim the number of assemblies we load during startup, and one of the easiest to cut is the Microsoft.VisualBasic assembly. There are alot of things in it that were easy enough to replace, like Left(), but I'm struggling to find a good way to replace vbLf and Chr(). vbCrLf was easy enough to replace with Environment.NewLine, but we have a few spots where we generate content for a Unix-based system that is expecting line feeds only.
View 5 Replies
Sep 24, 2010
The code underneath works when I use WM_MOUSEMOVE but not when I use WM_NCMOUSEMOVE. Is WM_NCMOUSEMOVE not supported anymore?I use the correct values for the constants too.Protected Overrides Sub WndProc(ByRef m As Message)Dim MousePosition As Point
Select Case m.Msg Case WM_NCMOUSEMOVE MousePosition = New Point(m.LParam.ToInt32())
If MousePosition.Y < 50 Then CloseButtonState = ButtonState.Flat
Else
CloseButtonState = ButtonState.Normal
[Code]...
View 14 Replies
Nov 13, 2009
I am exporting data to an Excel spreadsheet from a VB.Net 2008 application. Now I'm trying to format the spreadsheet. So I am creating macros in Excel that format the spreadsheet, and then using the code it generates in my application. The problem is that the constants used in VBA are not being recognized in VB.Net (They are recognized in VB6). I have the following imports:
Imports Microsoft.Office.Interop
Imports Microsoft.Office.Interop.Excel
Is there something else I should be importing? For example, in this line, xlNone and xlDiagonalDown are flagged as not declared.
oXL.Selection.Borders(xlDiagonalDown).LineStyle = xlNone
View 5 Replies
Apr 19, 2012
I'm working with an API that spits out alot of data in name=value format. At first I processed everything by doing simple string comparison:
Sub ProcessData(ByVal name As String, ByVal value As String)
If name = "thisname" Then
DoThis(value)
[code].....
View 2 Replies
Jan 11, 2011
Is it possible to use a constant defined by the compiler in code like below?[code]...
I'm running batch processes and I'm experiencing problems with one of my customer's data. I want to add special code for only that customer, but I want to keep the code there so I can easily switch the customer ID in the future should i need to debug a different customer.[code]...
View 2 Replies
Jan 4, 2011
I inquired on VB's erratic behavior of treating all numerics as signed types back in this question, and from the accepted answer there, was able to get by. Per that answer:
[Code]...
View 3 Replies
Feb 15, 2011
after working with some VB.net files in a project, I find that somehow the values of hard coded numeric double values have changed,that is:[code]This has happened in a lot of the source files of the project.When does this replacement take place? While I can understand that the original numbers cannot be exactly represented as double, I do not want this substitution, is there some way to prevent them? Initially I thought that was some behavior of the source control system (TFS)
View 18 Replies
Feb 26, 2012
I have an app that I have been recoding in vb.net formerly written in VB6. In this app I use some ASCII control codes such as ACK NAK ENQ US RS EOT. The VB6 app uses the CHR() function with the proper ASCII codes to handle these but in recoding I would like to use something more meaningful and descriptive than CHR(4) for example.
[Code]...
View 5 Replies
May 11, 2010
I need a source for the VALUES of the constants used for dealing with video using SendMessage.
View 11 Replies
Jan 27, 2010
In our VB.net coding project, we have a module with the code shown below. In our frmMain.vb, we use every thing you see in the modeul.
However, when happily coding along, intellisense doesn't seem to see these or pick them up.
How can we change this so Visual Studio's Intellisense picks up our constants? For example, when typing:
If System.IO.File.Exists(SERVERS_CONFIGURATION_FILES) Then
I want to be able to type something and then the dot, such as Me.whatever and have it picked up. Below is our module:
Module ConstantsAndEnums
Public Const PROGRAM_NAME As String = "Server Monitor .NET"
Public Const TOOLTIP_BUBBLE_DISPLAY_TIME As Integer = 10000
[Code].....
View 6 Replies
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
Jun 1, 2009
I have a list of rather meaningless codes that I'm processing with a VB.NET Windows application. For the business logic I'm writing to process those codes, I'd like to use meaningful constants (like ServiceNotCovered or MemberNotEligible) instead of the original codes (like "SNCV" and "MNEL").As far as I can tell, Enums can only map to numeric values, not to strings. So the best I've been able to come up with is a static class that exposes the constants as static readonly string fields that are internally set equal to the code values, as follows.
Public Class MyClass
private _reasonCode as String()
Public Property ReasonCode() As String
[code].....
View 7 Replies
Sep 27, 2011
I have an API that I created and currently utilize successfully in C#. I am trying to create an example of interacting with the API in VB.NET (so that the QA without C# experience can still utilize it for creating automated tests).
In C# I do the following
[TestingForm(FormName= "Land Lines", CaseType= _caseType
, Application= ApplicationNameCodes.WinRDECode, HasActions= true)]
public class LandLines : RDEMainForm
[Code]....
This gives me a compile time error because it claims that FORM_NAME and CASE_TYPE is not defined, even though the class has it defined inside.
How can I use the defined constants inside the class in the class attributes?
View 1 Replies
Oct 3, 2010
where Windows Message constants can be found in the framework?Example: msg=0x2 (WM_DESTROY) hwnd=0x24038c wparam=0x0 lparam=0x0 result=0x0
I captured that with ...
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
MyBase.WndProc(m)
[code].....
View 9 Replies
Sep 21, 2009
I have a class in VB with some constants that represent the string name of my security roles. I need to be able to call a function to return to me a string array(or collection, or whatever) of the values of each of these constants. I will be using it to make sure that my databases Roles table has the same roles as coded into the application.
[Code]...
I'm looking to run a function, i.e. ClassConstantsToStringArray(gettype(Roles)) that will return to me "Administrator","Basic User","Power User" I'm know reflection is the way to go, I just don't know enough about using it yet to get what I want. I found a function on the net that would return to me the constant names in a FieldInfo array but still don't have enough smarts to make that work for me.
View 3 Replies
Sep 10, 2010
I've been looking through some of my predecessors code and in all of this data level classes, he's defined all his stored procedure names as constants at the top of the classif there's really any benefit of doing this, other than to have all the procedure names at the top of the class?
View 6 Replies