|
hi there,
i wanna compare buttons background image something like this :
if (abcBtn.BackgroundImage != Properties.Resources.abc_un)
or like this
if (xyz.BackgroundImage == global::mypro.Properties.Resources.xyz_cur)
both code arent working properly but their working are different
in first Code C# is entering in if statemen where abcBtn background image is different (eg. def image)
in second code C# isnt entering in if statement where xyz background is same as written "xyz_cur"
Becoming Programmer...
|
|
|
|
|
Usually when I have compared images, I put them into bitmaps and compare the pixels. I am sure there are better ways of doing it. It can be slow, sometime I only compare every other pixel to speed it up.
Hope that helps.
Ben
|
|
|
|
|
Hi All,
I am trying to develop POP3 application in C# and have successfully managed to create a connection with POP3 server on port 110. here is the sample code ihv written for this:
Server = new TcpClient(POPServ.Text, 110);
NetStrm = Server.GetStream();
RdStrm = new StreamReader(NetStrm);
Inorder to retrieve messages from a service such as Gmail, i need to enable the SSL. I don't want to use any pre-built component. Is it possible to use SSL functionality without using any 3rd party components?? if so, could anyone please assist me on this...
Meanwhile, I have tried to connect to gmail server using the port 995. Its connected successfully, but my application getting hanged at particular line of code: (bolded below)
Server = new TcpClient(POPServ.Text, 995);
NetStrm = Server.GetStream();
RdStrm = new StreamReader(NetStrm);
plz help me on this issue...
Thanks in Advance.
|
|
|
|
|
Hi
It depends on the .net version you use. if you're using .net 1.1 you will have to use a 3rd party library (the mentalis.org security lib is pretty good and free)
in .net 2.0 there are security classes in the System.Net.Security - Namespace
greets m@u
|
|
|
|
|
Hi, thanks for replying..
I am using .net 2.0 & yes i got SSLProtocols. but didn't find any "usessl" or "enablessl" method...
if you are aware of anything, plz help me out...
Thanks.
|
|
|
|
|
Hello,
As you now i wont be able to have a messagebox running as a server side script.
Hence icant use messagebox.show method in my code in C sharp.
hence i would like to incorporate a client side script or a java script.
Can any one assist me with the code?
Thanks for your time
|
|
|
|
|
kibromg wrote: hence i would like to incorporate a client side script or a java script.
Can any one assist me with the code?
window.alert ?
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
kibromg wrote: as a server side script.
Hence icant use messagebox.show method in my code in C sharp
You can create a class with Show() method, and write the script what Colin suggested to response.
|
|
|
|
|
i didnt see colins message? Could you please give me a tip of the script please as i havenot used java script??
Thanks
|
|
|
|
|
kibromg wrote: i didnt see colins message?
Click Here[^]
kibromg wrote: Could you please give me a tip of the script please as i havenot used java script??
The function used to show messages in javascript is alert(). What I mean, if you want to use this in several places as you do in MessageBox.Show, it's better to wrap it inside a class. That could be something like this
class CMessageBox
{
public static void Show(Page _page,string Message)
{
_page.Response.Write("<script language='javascript'>alert('" + Message + "')</script");
}
}
In you page where ever needed call it like CMessageBox.Show(this,"YourMessage");
|
|
|
|
|
function Show(strMessage)
{
alert(strMessage);
}
Regards,
Valan
|
|
|
|
|
Thank you all for your cooperation.
I will try it now.
Thanks
|
|
|
|
|
Hi all, I have an usercontrol with a TableLyoutPanel. Inheriting controls should put a panel in each row of the tablelayout, but I've just discovered that TableLayoutPanels cannot be edited in inherited classes from the visual editor.
I cannot ask the implementators of the base class to design the many panels by code, how can I add them to the TableLayouPanel still making them able to design theyr controls with the editor?
Thank you!
|
|
|
|
|
I have suffered the same problem. And after reading this I decided to search and alternative...
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
For some reason I'm unable to open the link... Anyway, if your're pointing me toward a third party control, I wont most probably be allowed to use it (I could always ask though...).
One possible solution, not really elegant, would be adding a method GetTablePanel() that returns the tablepanel, which would be added by the inheriting classes instead than by the parent.
I don't really like that solution, because it would make harder for the parent class to take care of some details withouth having the children to worry about them. I should be able to find a way to accomplish this anyway.
|
|
|
|
|
|
hi all
i add column in grid in type combobox but if i fillter any cell in this column the all cell in the same column is take the data in the cell changed
The Quesion
Who i can set the cell in column in specify row in type combobox
To
chang in any cell if it data the other cell in other row in the same column dont change gis data
thanks to all
Thaer
|
|
|
|
|
Hi,
How can I sort the DataGridView by one column and then by another column?
I saw a solution for unbound data only, and I have bound data GridView..
Thanks
dana Tov
|
|
|
|
|
Hi,
I am creating an application in which the user can select the stored procedures in the sql server and then they can assign the values to the parameters of the procedure and they can execute it.
So i want to get the parameter list of the selected procedure.
Can you please tell me the way to get the parameter name and the datatype of the same for a stored procedure?
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Assuming the stored procedure is declared as follows:
SqlCommand _myProcedure = new System.Data.SqlClient.SqlCommand();
The parameters are listed in the collection _myProcedure.Parameters which is of type SqlParameterCollection . Loop through this collection to get every parameter and get all the info you want from it.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
It is not giving the parameter list.
I tried as follows:
System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection(@"Data Source=MyMachine\SQLEXPRESS;Initial Catalog=VersatileData;User ID=sa");<br />
System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand("vsp_RetrieveEventDetails", con);<br />
cmd.CommandType = CommandType.StoredProcedure;<br />
con.Open();<br />
cmd.Prepare();<br />
MessageBox.Show(cmd.Parameters.Count.ToString());<br />
foreach (System.Data.SqlClient.SqlParameter sqlParam in cmd.Parameters)<br />
{<br />
MessageBox.Show(sqlParam.ParameterName.ToString());<br />
}<br />
cmd.ExecuteNonQuery();<br />
con.Close();
It is giving the parameter count as Zero(0).
I am not interested in executing the query but i want to get the parameter alone if the user selects the procedure
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
M. J. Jaya Chitra wrote: It is giving the parameter count as Zero(0).
That is because it doesn't actually retrieve the parameter list. I suspect the other person either didn't understand your question or just made an answer up that sounded like it might work.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
M. J. Jaya Chitra wrote: Can you please tell me the way to get the parameter name and the datatype of the same for a stored procedure?
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS ROUTINE_COLUMNS
-- modified at 7:09 Thursday 9th August, 2007
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
Colin Angus Mackay wrote: SELECT * FROM INFORMATION_SCHEMA.ROUTINE_COLUMNS
It returned blank rows for me, and I doubt how this can get parameters from stored procedures ?
|
|
|
|
|
N a v a n e e t h wrote: It returned blank rows
I think you mean it returned no rows. If it returned rows there would have been information in them.
N a v a n e e t h wrote: I doubt how this can get parameters from stored procedures ?
Oops. You are right - it is for functions, not stored procedures.
The correct view is INFORMATION_SCHEMA.PARAMTERS
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|