Find Values For The WM_CAP_ Set Of Constants?
May 11, 2010I need a source for the VALUES of the constants used for dealing with video using SendMessage.
View 11 RepliesI need a source for the VALUES of the constants used for dealing with video using SendMessage.
View 11 RepliesThe 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]...
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].....
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.
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
I am using Visual Basic express edition 2008.I am trying to know if a value in a single dimensional array is repeated in the array. If yes, then multiply one of them by 100. For example:
MyArray (14) = 12, 15, 18, 15, 18, 11, 15, 18, 16, 14, 18, 8, 12, 17, 10
In the above example:
MyArray (1) = MyArray (3) = MyArray (6) = 15
MyArray (2) = MyArray (4) = MyArray (7) = MyArray (10) = 18
MyArray (0) = MyArray (12) = 12
[Code]...
I have a two different tables, Table 1 and table 2.
Table 1
-----------
Resource
Start Date
End date
[Code]....
Here I have to match the total hours of each table according to the resource,
then have to find the mismatched data and find difference with that values of mismatched data.
how to find max values using MySQL as the database? examples in the database ID (primary key and AutoNumber) data that will come 12. so, in the form at the moment want to add data, automatic number 12 also
View 1 RepliesI'm building a program to read a text file and display and find the min and max values within the textfile and display them in text boxes (txtMac, TxtMin) for the user. The program also needs to count the number of items in the text file and put the number in a textbox called count.
So far i've made the code to find the max value (below) but have no idea how to get min value and count.
[Code]...
I have this dictoinary:
Dim chardict As Dictionary(Of Char, Integer) = Nothing
chardict.Add("A", 0)
chardict.Add("B", 1)
I wanted to do the following if statement but I am a bit stuck on the syntax:
if chardict.containskey("A")
'display the value that corrosponds to the letter "A"
'in this case display the character 0
[some code]
end if
I am trying to extract querystring values from a htmldocument. It contains a number of anchor links with a querystring parameter called id. I would like to get all the ids in a commaseperated string. How can I fix this? So I would like to get: Result = {1,2,3,4,5}
[Code]....
I need to find rows in resultsets that have every column without null.these resultsets got variable number of columns.currently, the only way that I can think of is creating a view on each resultset and filter this way:
select field1, field2, field3, field4, ...
from "huge query"
where field1 is not null and
field2 is not null and
[code]....
and then in a storeproc/function or .net code(c# / vb.net) loop through all rows / columns and flag or remove every row that got any null?
Is there a way in LINQ to Entities (SQL) to identify all records where a specified word is repeated at least/less than a specified number of times?
I can do this in memory, looking for at least 3 instances of the word "word" using:
Where(Function(x) x.Description.Split("word").Count > 3)
However the Split() function cannot translate to a SQL equivalent, and so this can only be executed in-memory, which is excruciatingly slow by the time any number of records are involved.
The SQL to do this would be something like
WHERE Description LIKE '%word%word%word%'
And that's as far as I get - I can't work out how to get that SQL generated by LINQ to Entities. I tried the ugly hacky .Where(Function(x) x.Description.Contains("word%word%word") on the off chance, but I'm almost relieved that it doesn't work!
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
I have the following setup[code]...
What I would like is a Item property in the collection that I can say [code]...
I know about predicates but what I am struggling with is how to set the criteria of the predicate (i.e passing x,y,z)
I have been searching everywhere to figure out how to access the G-Sensor/Accelerometer in my HTC Touch Pro and other like devices. I've already created a number of app's for windows mobile but now I'd like to add some more customizations into my app's. I don't mind installing 3rd party app's but I'd like to add the same fuctionality into my own apps with regaurds to the G-Sensor/Accelerometer funtions. I got a hold of some code(Rhaakmeester)...
[code]...
This code helped a bit but only detects the change after a 3rd party app has already changed the screen orientation or if the KB was slid out. How do I access the G-Sensor data myself.
Find common values in multiple arrays with PHP Pretty much does what I need, but in PHP, I need VB. My situation is I am trying to create an intelligent stock pick system based on multiple stock locations. At the point of invoicing, we loop through the items invoiced and check the stock database for available stock.
If all items on the invoice are available to pick from stock location 1, then all should be picked from stock location 1... etc. If all most items are available from stock location 1 except one or two, then pick all stock from stock location 1 except for the exceptions which should be picked from the location with the highest available stock. Finding highest available stock is simple, but I can't work out how to analyse the stock availability from multiple locations and finding the common stock locations.
[Code]...
How to find a matching pair of values in two different arrays? Here's the scenario:
Index Array1 Array2
0 1 3
1 2 5
[code].....
I have a table called tblComparison - this table has the following columns[code]...
Once the averages for each column are created it needs to save them to tblMonthlyComparison - again the column names in this table are the same so in the fldDate column the program needs to enter 31/12/2011. In fldAverage of this table what we do is take the average that we found above for each column then plus them together and divide them by 5.
I've got a chart showing data as a part of a vb.net forms application. The Chart object makes a really pretty picture, but I need it to match the color scheme on the rest of the UI. How do I get the RGB values for the palette?
View 2 RepliesI have a table with the below structure.
ID VALUE
1 3.2
2 NULL
4 NULL
5 NULL
7 NULL
10 1.8
11 NULL
12 3.2
15 4.7
17 NULL
22 NULL
24 NULL
25 NULL
27 NULL
28 7
I would like to get the max count of consecutive null values in the table.
Having a bit of trouble using the List.Find with a custom predicate i have a function that does this
[code]...
by doing it this way means i have to have a shared "currentKey" object in the class, and i know there has to be a way to pass in the values i'm interested in of CurrentKey (namely, keyname, and oldkey) ideally i'd like to call it by something like keys.Find(AddressOf FindByOldKeyAndName(Name,OldVal))however when i do this i get compiler errors.How do i call this method and pass in the values?
Basically, I have an array of data with about 1000-2000 data points that form a rough Poisson distribution. What I need to do is take the maximum value of the distribution (which I know), and find the leftmost and rightmost values that are, say, 70% of the maximum. (I don't really care what the value of these numbers are. I want to know what index position they are in.) I then want to find the centerpoint between these two indices, rounding if necessary, and return all three values (left, right, and center).
View 2 RepliesHow can I query a DataTable to find all of the unique values in a column? SQL has the 'unique' or 'distinct' keywords, but I dont know how to do this against a DataTable.
View 6 RepliesI am having so trouble with the ToUpper() procedure with strings. I am using LINQ to find unique values in a list of objects. In that whole process I set the values to compare to all lowercase in order to get a proper list. My goal is to populate a dropdown list with the values. I'm attempting to set the first letter of of the string to uppercase and keep the rest lowercase however the toUpper() procedure is not working?
Private Function FixCase(ByVal strIn) As String
Dim strOutput As String
Dim intStringLength As Integer = strIn.Length - 1
strOutput = strIn.Substring(0, 1)
[code].....
How would I go about reading a textfile, finding values and using the values in the program?Now I want the program to read the text file, find [1], use the first line after [1] as value for a variable, and the second line as value for another variable. After that I will run some code with the values and then do the same thing again for [2] etc.
View 2 RepliesI have a DataGridView with 3 columns (metric_key, metric_name, metric_value).There are for example, 6 ROWS in this table (6 different metrics), added programmatically (DGV is not bound in any way)
Now, when I assign values in my grid I do:
dataGridView1.item("Metric_value",0).value = "value of the metric in row 0, in the column named "metric_Value".
[Code]...
There are a bunch of constants like vbTab in VB.Net, is there corresponding one in C# ?
View 1 Repliesi cant understand what constants are.
View 3 RepliesSay 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]...