|
Just tried, SendKeys.Send("^{ESC}"); appears to work.
|
|
|
|
|
it din work.pls help me
This code was posted by me...
|
|
|
|
|
Well, it works on my machine. So, unless you provide more details on how it doesn't work for you, I'm afraid no one here will be able to help you.
|
|
|
|
|
this is my code
private void page_Load
{
if(condition)
//invoke the start key. i want the menu to pop up just as we click the start menu
SendKeys.Send("^{ESC}");
}
This code was posted by me...
|
|
|
|
|
Wait a moment: page_Load? Just to be sure: are we talking about Window Application or about a Web Application?
If you are trying to send keys through a web application that will newer work, maybe the keys will be sent to the server machine running the site, but I'm not really sure about that.
|
|
|
|
|
I am using C# and have created a regular Windows form. I have used COM and registered AxAcroPDFLib.AxAcroPDF. Here is my code;
axAcroPDF1.LoadFile("myfile.pdf")
axAcroPDF1.Show();
MessageBox.Show("Showing...");
This works fine. But, just like the browser, but PDF file links can't work. I have the full version of Adobe Acrobat installed, Standard 8.0. I also have the Pro. version 7.1.0 on another PC. When I click on link ,Its can't open link URL.
Thank you for any help. please.
|
|
|
|
|
Ignore repost
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
|
I am using C# and have created a regular Windows form. I have used COM and registered AxAcroPDFLib.AxAcroPDF. Here is my code;
axAcroPDF1.LoadFile("myfile.pdf")
axAcroPDF1.Show();
MessageBox.Show("Showing...");
This works fine. But, just like the browser, but PDF file links can't work. I have the full version of Adobe Acrobat installed, Standard 8.0. I also have the Pro. version 7.1.0 on another PC. When I click on link ,Its can't open link URL.
Thank you for any help. please.
|
|
|
|
|
prakash_adysoft wrote: But, just like the browser, but PDF file links can't work
Your question is not clear buddy
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hello...
In VS2003, I can set the version to 1.0.*.*.
The version will be automatically increased, everytime I compile the source code.
But it doesn't work anymore since VS2005. Are there any possibilities to
increase Version automatically ?
Thanks.
|
|
|
|
|
Look at this[^]
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
So far I've managed to do so by EnumDesktopWindows (user32.dll).
But I get all windows regardless whether they can displayed on the taskbar. So I'm using isWindow and isWindowVisible but still I don't get the same results as shows on the taskbar.
My goal is to create a list of running application that currently showing in the taskbar only. No systray apps!!!
My next goal is to get the application Icon and show it (as taskbar does); No idea how to do so. I tried ExtractIcon but did nothing...
Any Idea?
tnx u all...
|
|
|
|
|
Hi,
this is my coding
--------------------------------------------------------------------
while (odr.Read())
{
if (usr.Text == odr["userid"].ToString())
{
MessageBox.Show("User Login", "Information", MessageBoxButtons.OK);
}
else
{
DialogResult drsave = MessageBox.Show("Login Fail", "Erorr", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
if (drsave == DialogResult.OK)
{
usr.Text = "";
pass.Text = "";
usr.Focus();
}
else
this.Close();
}
}
------------------------------------------------------------------------
My program Build Successfully but when i type in textbox any string value my program read every value in my database in give every time message.
for example in my database have 5 records my program read this records in give message 5 time
i want my program check all records in give one message record found or not
please give me solution
thanks in advanc
jawad khatri
i want to
|
|
|
|
|
Hi,
it seems that you want to check if a user exists or not.
I would seperate the presentation (your dialog) from the dataaccess (the select). Try to implement it like this:
private bool DoesUserExists(string sUserID) {
... perform a select statement here with a prepared statement
... then check if you have exactly one record
bool bResult = odr.Read(); --> true if you have one record
... close everything
return b;
}
public void CheckUser() {
... get the value from your textbox
if(this.DoesUserExists(sUserID)) {
} else {
}
}
That would be a better approach than yours. By the way, it doesn't make any sense to check the userid in your database within the code, use the WHERE-clause of SELECT-statements for this.
Hope this helps a bit.
Regards
Sebastian
|
|
|
|
|
Thank U For Reply Me bt
How I perform Ur Coding In My Coding????
This is my All Coding In Button_click()
---------------------------------------------------------------------------
using system;
using Microsoft.data.odbc;
private void login_Click(object sender, EventArgs e)
{
OdbcConnection cn;
OdbcCommand cmd;
OdbcDataReader odr;
string MyString;
MyString = "Select * from users";
cn = new OdbcConnection("Driver={Microsoft ODBC for Oracle};Server=orcl8i;UID=itehad;PWD=creative;");
cmd = new OdbcCommand(MyString, cn);
cn.Open();
MessageBox.Show("Connected");
cmd.CommandText = "Select * from users";
odr = cmd.ExecuteReader();
while (odr.Read())
{
if (usr.Text == odr["userid"].ToString())
{
MessageBox.Show("User Login", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
DialogResult drsave = MessageBox.Show("Login Fail", "Erorr", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
if (drsave == DialogResult.OK)
{
usr.Text = "";
pass.Text = "";
usr.Focus();
}
else
this.Close();
}
}
}
---------------------------------------------------------------------------
Thanks In Advace
Jawad Khatri
|
|
|
|
|
Okay, normally you should write it by yourself, but today is friday, so here it comes:
private bool DoesUserExists(string sUserID) {
OdbcConnection cn;
OdbcCommand cmd;
OdbcParameter dbParameter;
OdbcDataReader odr;
string MyString = "Select * from users WHERE userid = @userid";
cn = new OdbcConnection("Driver={Microsoft ODBC for Oracle};Server=orcl8i;UID=itehad;PWD=creative;");
cn.Open();
cmd = new OdbcCommand(MyString, cn);
dbParameter = new OdbcParameter("userid", sUserID");
cmd.Parameters.Add(dbParameter);
odr = cmd.ExecuteReader();
bool bResult = (odr.HasRows && odr.Read());
odr.Close();
cn.Close();
return bResult;
}
private void login_Click(object sender, EventArgs e)
{
if(this.DoesUserExists(usr.Text)) {
MessageBox.Show("User Login", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
} else {
DialogResult drsave = MessageBox.Show("Login Fail", "Erorr", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
if (drsave == DialogResult.OK)
{
usr.Text = "";
pass.Text = "";
usr.Focus();
} else {
this.Close();
}
}
}
You should add fail-safe to your app by using try-catch blocks, especially while interacting with the database. Next step would be to seperate the dataccess into an own assembly.
Regards
Sebastian
|
|
|
|
|
Thanks Alot Sir for Help me
Sir When I Run this program give error
Error Is
Error 1
'Microsoft.Data.Odbc.OdbcDataReader' does not contain a definition for 'HasRows'
|
|
|
|
|
Why don't you use the System.Data.Odbc.OdbcDataReader?
|
|
|
|
|
ok.
i use this and trying to solve my problem
sorry for distrb u Sir
|
|
|
|
|
No problem. And please don't call me sir...
Just give a feedback if your problem is solved.
Regards
Sebastian
|
|
|
|
|
|
SeMartens wrote: odr.Read(); --> true if you have one record
ExecuteScalar will be more appropriate in this case than reader.
|
|
|
|
|
Yep, you are right... but we want to confuse beginners, or?
|
|
|
|
|
sir Actually i am use dotnet after 1 year thats why i am facing lot of problem
sir i kindly request to u please give me solution
|
|
|
|