|
|
I couldn't get that one to work like the list grouping. It must be the grouping that does the trick. In this case I used the table's primary key.
I'll have to fiddle with this one later on when I've got some more time.
(Time? You mean someday I may actually have TIME?)
|
|
|
|
|
Paul Conrad wrote: I'd recommend modifying your subject line
What is next: suggesting the OP to ask another question ?
|
|
|
|
|
Originally he had a certain word in his subject line that would have gotten him flamed, and he took it out
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Paul Conrad wrote: Originally he had a certain word in his subject line that would have gotten him flamed, and he took it out
I figured that, so I chose not
|
|
|
|
|
Hey all,
I am attempting to create a program that runs in the background, takes keypresses from the keyboard, changes the keypresses to different keys, and sends the new key to the program running in the foreground (for example: I press "A" and the program in the foreground gets "F"). I thought that DirectInput would be the best way to go about this. However, I cannot seem to initialize the program correctly. I want to use the below code to gain control of the keyboard:
Dim keyboard = New Microsoft.DirectX.DirectInput.Device(<SEE BELOW>)<br />
keyboard.Acquire()
However, "Microsoft.DirectX.DirectInput.Device" wants the guid of the keyboard passed to it as an argument, and I cannot find out how to get this. So, How can I find the guid of the keyboard? I have looked all over the internet for the way to do this, but all I can find is information about directx8 or code in C++.
Also, while I am asking, will this program prevent the actual keypresses from getting to the program in the foreground? Using the example from above, if this program can't hide the actual keypresses, then the program in the foreground would get "AF", instead of just "F". Thanks for taking the time to help me.
NOTE: I am using Visual Basic 2005 Express Edition.
|
|
|
|
|
|
You don't need DirectX or DirectInput for this. Just write a Global Keyboard Hook. Search the articles for "keybook hook", or Google for "VB.NET Global Keyboard Hook" and you'll find lots of resources.
|
|
|
|
|
You can find the keyboard's guid on here:
Microsoft.DirectX.DirectInput.SystemGuid.Keyboard
In other words, you should create your dxkeyboard object like the following example:
Protected mKeyboard As Microsoft.DirectX.DirectInput.Device = Nothing
mKeyboard = New Microsoft.DirectX.DirectInput.Device(Microsoft.DirectX.DirectInput.SystemGuid.Keyboard)
Sincerilly yours. Manusoftar®
|
|
|
|
|
I have developed a software in .Net framework 2.0.
When I install it and then try to uninstall it, it shows the following error message:
Could not open key:HKEY_Local_MAchine\Software\Microsoft\Protected Storage System Provider\*Local Machine*.Verify that you have sufficient access to that key,or contact your support personnel.
I am using my administrative account and it is showing the same error.
What to do?
X
|
|
|
|
|
Not sure and it doesn't sound good.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi, would you please explain the Encoding.UTF8.GetBytes("abc") part of the following line:
Dim b As Byte() = Encoding.UTF8.GetBytes("abc")
I've read about what UTF8 is but I'm not real sure on how to use it. Also I don't know whether "abc" is the name of a datafield or a function. Please elaborate, thank you in advance for your help.
|
|
|
|
|
The GetBytes method will return a byte array containing the UTF8 representation
of whatever string is given to it.
I trust "abc" is just a silly example here.
Read the documentation for more.
|
|
|
|
|
"abc" is a literal string, concisting of the three characters 'a', 'b' and 'c'.
Encoding.UTF8 is a static property in the Encoding class that returns an Encoding object for the utf-8 encoding.
The GetBytes method encodes a string into an array of bytes. Each character in the string is encoded into one or more bytes in the array.
The three characters in this specific string are each encoded into a single byte, so in this case the array will contain three bytes.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thank you. You took the words out of my mouth, errr, off my keyboard
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Suppose I have a file called MyDocumument that is stored as a blob in a database. So if I want to put it in an array of bytes so it can be displayed, I probably can not simply pass the name of the file in like this Encoding.UTF8.GetBytes("MyDocument") . How would I then put this in an array of byte, and do I even need to encode the file inorder to display it? Please explain, thanks for your time.
-- modified at 18:55 Saturday 28th July, 2007
|
|
|
|
|
How are you displaying the information? Unless you are writing the output as a binary stream, you don't have to encode the data. Most ways of output takes strings, and does the encoding automatically according to a previously selected encoding.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi all,
i am using showModalDialog to open the popup window. I am sending one object from parent window to child window and doing some processing in child window. Now I have to set the values in the parent window based on the calculations in the child window.
I came to know that from the child window, we can set the values for the controls which are in parent.
I appreciate if some one can let me know how to do this…..
Thanks in advance,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
Thanks Paul for responding to my query.
I saw this article. Nice one. Unfortunately, I didn't find the solution for my problem. In this Article, Colin focused on passing the data from Parent to child but not child to parent.
I am sending some data from the parent form to child in the form of object, when the user closes the popup window; I want to populate the controls which are placed on parent form, with the data which is processed in child form.
Thanks,
Rahi
-- modified at 23:45 Saturday 28th July, 2007
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I thought you were going from child to parent, my misunderstanding
Good way to pass data from parent to child could be to modify the constructor for the child form to have a parameter that is the data you want to pass. For example, if I wanted to pass a string from MyTextBox.text from the parent to child, I could do something like:
<font> ...
Dim MyChildForm As New ChildForm( MyTextBox.text )
MyChildForm.Show ' or ShowDialog
</font>
In the code for ChildForm, you would have the constructor look like:
<font> Dim Private MyParentString As String
Public Sub New(ByVal MyTextString As String)
MyParentString = MyTextString
End Sub
</font>
Change the form names to the ones you are using, and the data and datatype of what you are passing.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Sorry Paul,
i sent the wrong message...just now i modified my message.
i am able to pass the data(in the form of object) from parent to child. my problem is i have to pass the data from child to parent.
when user clicks on Close Button on child(pop-up window), i have to populate the controls which are on Parent form.
Thanks once again for your response...
Rahithi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
The child form, you could overload the Close method with something like:
Overloads Function Close() As { Your-DataType-Of-Data-To-Pass-Back }
Return { The-Data-You-Want-Parent-To-Get-From-Child }
End Function
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Ok!! i will try this .
but one more simple doubt.........is it possible to directly populate the data in the parent controls using this overloaded close function??
Many Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Are you loading a dataset or something like that (datatable adapter, datarows, etc) in the child form? If so, pass the dataset back as a return value from the overloaded Close function.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|