Who ask you about difference between working and screwing around?
I only want to know how to hook keyboard press in a windows form even after it's minimized or not focused.
Look, I managed to solve my own problem.
I ask here nicely to get some help so I can finish this faster.
This is what I called (solution) even it's not what I want, I appreciate it.
Abhinav S wrote:
Handling the forms keydown event would give you a count of key strokes within the application.
Dave, I believe you know how to do this.
But I don't know why everytime you respond my question, always something weird like your question above.
I tried to learn, not "gimme code to hook keyboard press please thank you email me bla bla".
Next time if you're not going to give me some help, then please find another question to answer.
How do you define "more useful"? There are many reasons why you would choose one over the other but it will depend on the problem you are trying to solve and the skill levels and experience of your developers.
One of these days I'm going to think of a really clever signature.
You get Access Denied because the account your code is running under does not have permissions to the remote machine. By default, if you don't specify any account information in the Management connection objects, it'll use the account your code is running under. If that account doesn't have permissions on the remote machine, it'll fail.
On the Oracle DB there's a stored proc defined like:
PROCEDURE pGetHashes ( iFrom IN NUMBER, iTo IN NUMBER, sHash1 OUT CHAR, sHash2 OUT CHAR );
When I call this procedure from within my app, I only get a value for the sHash2 parameter. The value of the sHash1 parameter is always null. (Running the same stored proc from sqldeveloper gives a result for both hash values.)
Underneath I have added the code which I use to call the stored proc. Does anybody see anything I might have done wrong?
int iFrom = 0;
int iTo = 1000;
using (IDbCommand command = dbConnection.CreateCommand())
OracleCommand orclCommand = command as OracleCommand;
orclCommand.CommandText = "pGetHashes";
orclCommand.CommandType = CommandType.StoredProcedure;
orclCommand.Parameters.Add("iFrom", OracleDbType.Int32, iFrom, ParameterDirection.Input);
orclCommand.Parameters.Add("iTo", OracleDbType.Int32, iTo, ParameterDirection.Input);
OracleParameter orclParam = new OracleParameter("sHash1", OracleDbType.Char, 100);
orclParam.Direction = ParameterDirection.Output;
orclParam = new OracleParameter("sHash2", OracleDbType.Char, 100);
orclParam.Direction = ParameterDirection.Output;
orclCommand.BindByName = true;
// after this the orclCommand.Parameters["sHash1"].Value is always null.
// the orclCommand.Parameters["sHash2"].Value has the correct value.
For extra documentation. Running the following PLSQL from within sqldeveloper results in both a value for Hash1 and Hash2:
SET SERVEROUTPUT ON;
nFrom NUMBER := 0;
nTo NUMBER := 1000;
pGetHashes( nFrom, nTo, sHash1, sHash2 );
dbms_output.put_line('Hash1: '|| sHash1);
dbms_output.put_line('Hash2: '|| sHash2);
Thanks for any light you can shed on this problem.
My application works well on Vista, Win 7 32 and 64 bits.
It modifies some registry key in HKEY_LOCAL_MACHINE.
But when run on Win 8 (both 32 and 64), with minimum level UAC (I drag the slider to bottom, then restart), it doesn't work. And there is the error:
"Application attempted to perform an operation not allowed by the security policy. To grant this application the required permission, contact your system administrator, or use the Microsoft .NET Framework Configuration tool. Requested registry access is not allowed."
When I disable completely UAC of win 8 by editing registry, then restart computer, my application works well.
If I run regedit on Windows 7 then it runs with elevated priviledges which causes a UAC dialog to pop.
I find it unlikely that your application is doing nothing and yet is allowed total access to the registry on Windows 7. Do you have UAC enabled on your Windows 7 test box? Are you only editing some user data and as such the app might have access? Or perhaps are you installing it on Windows 7 (installing does seem to provide certain priviledges)? Also are you sure that the user for windows 7 and that for 8 both have the same priviledges?
You might be trying to modify TrustedInstaller keys. TrustedInstaller is a special user that has power beyond that of Administrator(s). You will need to take ownership of the key in order to work around that (completely ruining the security on your user's machine). If you need to change keys owned by TrustedInstaller you are doing something very very wrong.
If you are not trying to modify TrustedInstaller-owned keys you probably need to indicate which permissions you want when you open the key:
using (var key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Foo\\Bar", RegistryKeyPermissionCheck.ReadWriteSubTree))
// .. or ..
using (var key = Registry.LocalMachine.CreateSubKey("SOFTWARE\\Foo\\Bar", RegistryKeyPermissionCheck.ReadWriteSubTree))
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Chinese Proverb]
I am currently a student in TYBSC(IT) so I had a query that in C# windows form If for example a clientname combobox is there and on selecting the client Name in the combobox the 2 text boxes clientAddress and ClientNumber should be retrieved from the database and get filled in the textboxes.
Sir please help me in my project my mailing me a demo program so that I can Find A Solution to It.
Please Sir and as sson as possible as jan end is ma submission date
publicpartialclass Form1 : Form
string Id = "";
string Address = "";
privatevoid Form1_Load(object sender, EventArgs e)
// TODO: This line of code loads data into the 'database1DataSet1.Test' table. You can move, or remove it, as needed.
privatevoid comboBox1_SelectedIndexChanged(object sender, EventArgs e)
string SelectedId = Convert.ToString(comboBox1.SelectedValue);
if (Convert.ToString(comboBox1.SelectedValue) != "")
database1DataSet1.DataSource = Database1DataSet1TableAdapters.GetData(int.Parse(SelectedId));
var Id = from r in testTableAdapter.GetData()
where r["Id"].ToString() == SelectedId
var Address = from r in testTableAdapter.GetData()
where r["ProductId"].ToString() == SelectedId
foreach (var unit in Id)
Id = id.ToString();
foreach (var measure in Name)
ProductMeasure = measure.ToString();
textBox1.Text = Id;
Hello everyone! I would like to know how I can read metadata of exported types using the Managed Extensibility Framework. I am using Visual Studio 2008 with .Net Framework 3.5.
In .Net Framework 4.0, this can be achieved through type 'Lazy' but this is not available in .Net Framework 3.5.
Since 'ExportMetadata' was provided in the version of MEF provided for .Net Framework 3.5, I do believe there is a way of reading the metadata in the framework 3.5 but I don't know how this is done. Any guidance, please?
When you add a reference over the network, the IDE will make a local copy of this dll anyway.
So, nothing should be stopping you from copying the dll to your own machine / project folder and referencing it from this local location.
i use c# with asp.net ,i didn't understand how to add zoom bar to my google map.
in the aspx file the map configure like this:
<cc1:GMap ID="GMap3" runat="server" Width="850px" Height="500px" Language="he"
and the key is configure in the cs file.i saw lots of exsample but evrything in aspx file ,and if i try to change there something i have error in the visual studio.
so i hust want to know how to add this zoom bar in the left
Have a self-hosted WCF REST service w/ custom authentication (UsernamePasswordValidator). I need to return business specific errors from the validator. All methods I have tried to do this with have failed because all the errors get hidden by the HttpWebRequest object in a generic "Forbidden." error. My latest attempt was to write an error code back. Normally, I would do this by using the OperationContext.Current to get the response stream, but OperationContext.Current = null. How does one initialize this in a self-hosted service?
Last Visit: 31-Dec-99 18:00 Last Update: 25-Aug-16 9:12