Constant Values For Windows?
Jun 25, 2009
where i can find out constant value used to control the windows. like i'm using wndproc to disable validation and i use constant value for closing of form and that value is &HF060&
i was also looking for constant value for leaving the form. is there any place where i can find out these values?
View 3 Replies
ADVERTISEMENT
Jun 22, 2012
I need to know the IOCTL constants for the various strings (for example the value of the constant of IOCTL_ATA_PASS_THROUGH). Searching the net I found that those constants are defined in the header Ntddscsi.h but those constant are wrong. For example the constant value of IOCTL_ATA_PASS_THROUGH should be 4D02C while in the header file it is 40B
The question is: where can I find a list with ALL the right values?
I've found [URL].. where there are listed all the codes. the value in Ntddscsi.h is not the "final" value
View 1 Replies
Apr 3, 2010
I have the following constants declared:
Private Const LuxuryRate As Double = 74.84
Private Const FullSizeRate As Double = 48.44
Private Const MidSizeRate As Double = 44.91
Private Const CompactRate As Double = 30.46
And a combobox that lists each option. How can I set an if statement that uses these values if the option is chosen from the combobox? This is going to be part of a calculation performed when the button is pressed.
View 3 Replies
Jun 27, 2012
We are using a custom API in our project which provide an attribute for class fields/members which lets the interface to present a popup of some range values like "On/OFF" and pass the corresponding values of the choice to our code. The attribute requires a string array to know that values.We have many enumerations defined for these ranges,We are thinking to use Enum.GetValues() kind method to get a string array for this method.However, As we know the field declaration do not allow dynamic values in the declaration? so is there any other of doing same thing in efficient way.To clerify the problem i will write the examples below;
Current Working
<RangeLookUp("On:1","Off:2")> Public ASimpleRangeVariable As Integer
While I wanted to do like this or kind of
<RangeLookUp(SomeMethod())> Public ASimpleRangeVariable As Integer
Public Shared Function SomeMethod() as String()
'use Enum to get all the items as string values forexample Enum.GetValues & enu,.GetValues [code]....
Where SomeMethod suppose to return string array to be passed in the RangeLookup constructor.Which means if we change enumeration then we don't have to update the declaration.i know there are better ways to do it but due to some custom API, the ground is limited.
View 1 Replies
Mar 30, 2012
When developing ASP.NET websites (using VB.NET web forms) - a lot of my time is spend writing CSS files and they always seem to get messy (code duplication) and very long.
All I want to achieve is to be able to manipulate the CSS using VB.NET code in the following ways:
Use an integer variable to store my "golden" number 7 and use that for width, padding, margin etc where needed
Use string variables to store my "golden" hex color codes e.g. "#44C5F2" and use them for color, background-color, border-color etc. where needed Use an integer variable to set the height of an element and have four child elements each with height: mynum / 4
I just want to use basic VB.net number and string manipulation in order to create a CSS file on the fly.
I understand that the end product - the CSS file shouldn't change much - it should at most change on a daily basis otherwise caching couldn't be used.[code]...
View 3 Replies
Aug 13, 2011
When building a class library which contains many classes, all classes uses a lot of common constants and functions, what is the best to do:
1- Declare these constants and functions as public in a module.
2- In each class declare constants and functions used by individual class as private.
The first choice is good for easy and fast implementation, but re-using a class in a different project will require importing the module to the other project.The second choice require a lot of copy/paste for code snippet but a class can be re-used in different project easily.
View 3 Replies
Nov 8, 2009
I have a URL which returns a XML. I have been looking around to find what is the best way to do it where I will need to get 2 values from it, I have tried 3 different ways but I always received a blank result.
View 2 Replies
Oct 13, 2010
I have a need to schedule an application for auto run.
The problem: I need to pre-populate the form and retain those entry values to be used at run-time.
Anyone have any ideas or suggestions on how this can be accomplished?
View 1 Replies
Jun 24, 2010
I have the following code to read values in the ABCInstall folder inside SOFTWARE sub key of which is under HKEY_LOCAL_MACHINE.
This works fine in Windows XP but not in Windows 7. make it work in both XP and Windows 7?
Dim Key As RegistryKey = Registry.LocalMachine.OpenSubKey _
("SOFTWARE\ABCInstall", False)
Dim SubKeyNames() As String = Key.GetSubKeyNames()
[Code].....
View 2 Replies
Oct 6, 2010
This time i'm tring to work with registry values and so i'm using the following code Private Function RegKeyExists(ByVal hKey As Long, ByVal sKeyPath As String) As Boolean
[Code]...
View 1 Replies
Aug 11, 2011
I'm looking for an example of a service application with an user interface.
I've currently a project with a service. Now I want to display some values from that service into a windows form.
View 1 Replies
Sep 17, 2011
I want to take the values from textboxes on a windows form and then update the values in the sql server database...I want to update only those fields for which a value has been entered by the user and leave the database fields as it is (no change or updation) for which the textboxes are left empty by the user.....I opted for sql command and then i couldn't find out How can I generate the query dynamically for such a situation??? Like I intialize the string by str= " Update Bookings set " and then how i can alter it by considering the textbox values that have been changed....I couldn't find the way...I need shortest and optimized code for this situation....
View 5 Replies
Sep 16, 2011
I want to take the values from textboxes on a windows form and then update the values in the sql server database...I want to update only those fields for which a value has been entered by the user and leave the fields for which the textboxes are left empty by the user.....How can I generate the query dynamically for such a situation???
Edit:
I haven't yet coded for the update option...Here is my insertion code and i wanted to implement the update feature the same way just couldn't figure out how i can generate the query dynamically....It's a Booking System application
[Code]....
View 1 Replies
Apr 20, 2012
How can I convert the following code into VB.Net?
private const UInt32 temp = 0xE6359A60;
I tried the following but it doesn't work.
Public Const temp As System.UInt32 = 0xE6359A60
View 2 Replies
Apr 12, 2011
visual basic 2008 express
' the following lines declare the variables and constants
Dim intDiameter As Integer
Const dblPI As Double = 3.14159
Const dblAREA As Double = 140125
Dim intLabel As Integer
Private Sub PizaSliceCalculator_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code]...
I made a working program to calculate piza slices, i was told i needed to declare pi and the areas as constants. when i rewrote the program it no longer works. the result keeps coming back as 0.
View 8 Replies
Mar 13, 2010
I am looping through all of the forms in my app, and I am needing to get a value from the form somehow.Example, say if I have the form named "This Form" and somewhere in that form, dont know if you can use the tag property for this or not, but I need to put a word like "Tall" for an external reference to the form.[code]"How do I get another value like the forms tag or something else".
View 5 Replies
Jan 10, 2010
Explain or send me in the right direction.
View 2 Replies
May 17, 2012
I have strMyColor = "Red".I would like to make lblMyLabel.BackColor to be red.Without using a variable the code would be this:
lblMyLabel.BackColor=Color.Red
I tried using the variable like this: lblMyLabel.backcolor="Color." & strMyColor
But the error is that a string can't be converted to System.Draw.Color. I understand that, as the string "Color.Red" is not the same as the VB constant Color.Red.Is there a way I can construct a valid vbConstant from a string?
View 10 Replies
Dec 25, 2009
I mean why? I mean to organize things I often turn modules into classes where all the methods are share.But then I thought, why not organize them into namespace?But then we can't declare constant in namespace.
View 10 Replies
Jun 12, 2011
i am making a program on visual basic 2010 and part of my objective is to calculate the tax, i am trying to calculate the TAX so this is part of my code and this is the only part which gives me errors:[code]
1. Constant cannot be target of an assignment
2. value of type 'string' cannot be converted to 'System.windows.forms.Lebel'.
View 2 Replies
Apr 14, 2011
I'm trying to make following subroutine work. The problem is this part of the statement.[code]I've tried everything and can't seem to come up with a constant to use here.[code]
View 3 Replies
Apr 27, 2010
I have created a program that creates a blank database in a users account (each user has a seperate folder when registered) by pressing a command button, i have got it to create the database but when i try to populate it with a table to go to the correct folder i get an error
Constant expression is required
the code im using for this is:
Const strConnection As String = ("Provider=Microsoft.Jet.OLEDB.4.0;" & _
[code].....
View 1 Replies
Jun 16, 2011
Alright, So i have two forms open. One in a listview and i have another window with a browser control in it. The browser is adding data to the listview but i made it so it hides while doing this using Me.Hide(). I can make it appear if i click the menu item "Show browser" i made.when im on Form1 (the listview) and its doing its thing with the browser window hidden. It keeps making form1 flash. Well not flash but like the browser window is poping to the front (while hidden) causing me not to be able to click on anything on Form1.This happen everytime the web browser navigates somewhere.Making Form1 always on top fixes it, but it also gets on top of other programs like my web browser . I want it to be on top only to the web browser.
View 1 Replies
Feb 11, 2012
Having problem declaring constant on Visual Basic. rents is $200 per hour and is charge by minutes this is what I have so far.
const TOTAL_CHARGE_GROUP as Interger = 200 ©
View 8 Replies
May 13, 2009
What's the difference between enum and constant?Are they useful in real-life programming? or do they exist solely to make coding more tidy? Do they serve any real purpose?
View 1 Replies
Sep 7, 2011
I want to display a constant value in a text box. I have a constant of 2% calculated and the function works ok - as planned but i would like to display the tax rate of 2 % in the form at the time of calculation.[code]
View 5 Replies
Aug 8, 2009
I want to know that how we access a constant which is declared in a public structure, with an instance of that structure?
View 7 Replies
Jul 26, 2011
I need some of my initialization code to be blocked off if I am in Design Mode. This code is ran in the new method of the form, so it runs before the DesignTime Property can be set. Is there, or is there a way to setup, a compiler constant which indicates whether or not you are in Design Time. The Debug Constant doesn't work because when I run the application in Debug mode I want it to run
View 14 Replies
Nov 23, 2010
I currently have a table that has a few hidden text boxes... The text boxes become visible when certain actions are performed.
The table though changes size according to when the textboxes are visible or now. Ex. When the textboxes are visible the table grows, and vice versa.
View 2 Replies
May 11, 2012
I save a lot of settings in an INI file as 1 (enabled) and 0 (disabled), all around the project's module i have this check If setting = 1 then ' do somethingEnd If ' OR If setting = 0 then ' do somethingEnd If
My question, is it good for performance to declare public constants to hold 1 & 0 and use them in such above checks instead of using real number?
In general, if i use value like 8, 9, "", "$", etc... in just two different places, should i declare constant for it?
View 16 Replies