|
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
|
|
|
|
|
Try the below sample code
query = "select username from tablename where username = '" + usr.text + "'";
sqlcommand cmd = new sqlcommand(query,con);
sqldatareader dr;
dr=cmd.executereader();
while(dr.read())
{
if(dr["username"].tostring() == usr.text)
{
true user
}
else
{
false user
}
}
dr.close();
Regards,
Karthik K...
|
|
|
|
|
Be careful about how you test for equality, in all but the rarest case you shoud use the Equals method.
a == b
This compares two objects and returns true if they are they same object, that is the same instance. This does not compare the content.
a.Equals(b)
Compares the two instances and is defined by each classes implimentation. In the trivial case of the string, it returns true if they have the same content. Any class you write should override this method if you need to compare instances' values.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
My WCF properly working when SecurityMode.None. If I switch to SecurityMode.Message so it is not work in client side. My main problem is how can I encrypt to message in WCF?
Following code OK, its work;
Host Side Code
---------------------------------------------------------------------
NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.None);
Uri tcpUri = new Uri("net.tcp://10.0.105.240:7070/HesaplamaServisi");
ServiceHost host = new ServiceHost(typeof(Hesaplayici), tcpUri);
host.Description.Behaviors.Add(new ServiceMetadataBehavior());
host.AddServiceEndpoint(typeof(IHesaplamalar), tcpBinding, "net.tcp://10.0.105.240:7070/HesaplamaServisi");
host.AddServiceEndpoint(typeof(IMetadataExchange), System.ServiceModel.Description.MetadataExchangeBindings.CreateMexTcpBinding(), "mex");
host.Open();
Client Side Code
---------------------------------------------------------------------
NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.None);
IHesaplamalar proxy = ChannelFactory<IHesaplamalar>.CreateChannel(tcpBinding, new EndpointAddress("net.tcp://10.0.105.240:7070/HesaplamaServisi/"));
FOLLOWING NOT WORK
---------------------------------------------------------------------
I want encrypt to message, so I add following code both side;
NetTcpBinding tcpBinding = new NetTcpBinding(SecurityMode.Message);
tcpBinding.Security.Message.AlgorithmSuite = System.ServiceModel.Security.SecurityAlgorithmSuite.TripleDesSha256Rsa15;
This code properly work when Host and Client same PC, If client.exe run another PC in same network this code not work. What can I do? Thanks...
|
|
|
|
|
Hi,
it is just a guess but which operating systems are you using for client and server? As far as I know is SHA256 only supported on Vista or higher. Maybe thats a problem.
Regards
Sebastian
|
|
|
|
|
By the way, did you try to debug your code? Maybe you get an exception for this.
|
|
|
|