|
hi all,
first i put a button on a form and click on the button to add some code in it (on click property).
then i decide to remove that button. but the source of that click property remains in form.cs file.
what should i do in order to clear everything related with a button or a label from that .cs file if i remove them ?
(do i have to remove them manually ???)
help please.
bye.
|
|
|
|
|
if you create a click event that means you create a new method, the method will stay there, but everything else (such as click event, the button himself) will be deleted, so all you got to do, is to erase the method.
|
|
|
|
|
If you add code to the designer-generated event handling method, then it will not be erased when you remove the control from the design surface. If you do not add code to the method, it will be removed. This behavior makes sense because suppose the event handling method contained 500 lines of code (not that it ever should!). If you were to accidentally delete the control associated with the event handling method in the design view and it deleted that method, you'd probably not be a happy camper...
Josh
|
|
|
|
|
Like the others mentioned, you need to remove these manually.
Another reason to not automatically remove the method is because you may be using the method for other controls. It is often better coding if similar buttons use the same event methods. For example, I use the same method for all radio buttons within the same group. The code is much cleaner and better organized.
|
|
|
|
|
All these days, I was under the assumption that calling the Close method on a modal form results in an immediate call to the Dispose method on the form. The MSDN[^] documentation also says it does (except for some special conditions, which I've ruled out). It also seemed to work when I first tried it, but now, it refuses to call Dispose until the parent form itself is shutdown.
Is this normal behavior? Any idea why it worked once but refuses to work now?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi,
I have read from the article that serialization means the process of maintaining state of the object.
can any one explain me clearly?
Keep Learning,
juju
|
|
|
|
|
A serailized object is a string basicly which you can store in a file for example and then later retrive it from there and construct that object back...
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
There is a slight difference.- Serialization strictly means pushing your object's data into a stream of some sort, while deserialization refers to the opposite process (recreating your object from the contents of a stream).
- Persistence has to do with persisting (permanently saving) a stream to a permanent store (file, database, content management system, source code repository, etc).
The two are often used together. You usually serialize an object (or a collection of objects) to a persistent store so that you can recreate the objects at a later date. But you could just as well serialize your object into a stream that's transmitted to a service.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
I'm sorry I'm writing this twice, but it's realy importent to me, especially now, and I didn't get any answers before, so I'll ask the two questions in one message:
1. I have this next code, which works, but when I open the .xml file it doesn't show me the type I want, it shows me "System.Type" or "AnyType"...
DColSFirst.DataType = TypeCode.String.GetType();
also:
DColSID.DataType = Type.GetType("System.UInt32"); //works either...
How can I define the DataColumn to a type I want?
2. I'm trying to build my own ICryptoTransform-able (System.Security.Cryptography.ICryptoTransfom) class, so I could use it in CryptoStream.
I already built the algoritm, and I inherited from ICryptoTransform as they wanted to, and I'm using MSDN to know what methods and properties I need to do, but there are two properties, and two methods that I don't know what to do with them, and what I should return from them... the properties are InputBlockSize AND OuputBlockSize, and the methods are TransformBlock and TransformFinalBlock, I don't know what they need to get (what does every parameter stand for), and what to return, the MSDN doesn't help me very much in here.
If anyone can tell me what to do in them, and even give me an exemple I would appriciate it...
3. And one more thing, where can I save information on my application (i.e is registered, setupdate etc...), and how that it won't be able to be changed without my pass or something like that...?
Thanks in advance...
NaNg
(REALY ORGENT)
-- modified at 8:59 Wednesday 10th May, 2006
|
|
|
|
|
why can't I get answers? this is something like the 4th message that has no answer to it...
please, some-one... please help.
|
|
|
|
|
Hello everybody,
By using below codes I produced a pdf file.
static void Main(string[] args)
{
FileStream fstrm=new FileStream("b.pdf", FileMode.OpenOrCreate, FileAccess.ReadWrite);
StreamWriter wrtr = new StreamWriter(fstrm);
string str = "Hello Acrobat";
wrtr.WriteLine(str);
wrtr.Close();
fstrm.Close();
}
However as I open the b.pdf file with Adobe Acrobat 5.0 I see below message.
"Acrobat could not open b.pdf because it is either not a supported file type or because the file has been corrupted."
What should I do to open the file with Acrobat Reader after program?
Thanks a lot.
|
|
|
|
|
Write something in PDF format - it's a very complex file format, so you would be best using a third party PDF library like iText[^].
Ryan
"Michael Moore and Mel Gibson are the same person, except for a few sit-ups. Moore thought his cheesy political blooper reel was going to tell people how to vote. Mel thought that his little gay SM movie about his imaginary friend was going to help him get to heaven."
- Penn Jillette
|
|
|
|
|
Hiii,
I have done this but i m using a tried party API for the same...
except using thried party API i think it's possible coz u can not
read PDF format file...using streams...It's very deficult...
i m using this API
http://www.colorpilot.com
Thanx
Anuj Kamthan
Software Developer
Solversa Technologies,
Pune - 411007, India.
http://www.solversa.com
|
|
|
|
|
Hello
I want to write an image viewer application in C# 2.0 The app can view multiple images, each image is opened in a TabPage. How to control Tab Pages ? Ex: when user switch to other tab, the app must move to that tab. Do I have to use ArrayList to control these TabPage ?
Help me. Thank you very much
|
|
|
|
|
Im writing a windows service in C# and I want to trigger an event within that service using a MS SQl server(2005) Trigger. i.e. The Windows service sits there doing whatever, when a new row is created in a specific table it will somehow message/trigger an event within the service.
Hope this makes sense,. Am I asking in the right place?
Kind Regards,
Rhys
|
|
|
|
|
Hi, I am trying to access a webservice from .NET client that I created. I am connected to the internet thru' the WinSock Proxy Client config. But, I am not able to access the webservice I get the foll. error: The underlying connection was closed: Unable to connect to the remote server.
Thanks & Regards,
Ramadas
|
|
|
|
|
Hi all,
Not a C# or even .net programmer so please bare with me.
Can C# use the Rijendeal/AES block cipher without it beiing imported
from an ASCI file into a keyring?
One of our trading partners is asking to send us files encrypted with
the above cipher. The code they use themselves is show below but I'm
wondering on how & where I'm to store the key values if not on a keyring.
Thanks in advance
Dave
public string DecodeString(byte[] encodedsource)
{
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
byte[] bytes = encodedsource;
MemoryStream memstream = new MemoryStream();
memstream.Write(bytes, 0, bytes.Length);
memstream.Position = 0;
SymmetricAlgorithm algorithm = SymmetricAlgorithm.Create("RijnDael");
algorithm.Key = key;
algorithm.IV = iv;
ICryptoTransform transform = algorithm.CreateDecryptor();
CryptoStream cryptstream = new CryptoStream(memstream, transform, CryptoStreamMode.Read);
StreamReader reader = new StreamReader(cryptstream);
string returnstring = reader.ReadToEnd();
memstream.Dispose();
reader.Dispose();
cryptstream.Dispose();
return returnstring;
}
|
|
|
|
|
Forgot describe what the keys look like. I've changed the actual vals for this post.
key = ABCDE%^$ABCDE-99
iv = ABCDE$*@ABCDE-99
|
|
|
|
|
Thats the issue symmetrical ciphers have.Where does one hide the private key.
|
|
|
|
|
Hiiii,
i need to change the color of the scroll bars of the text box and forms...
If any one done this pls guide me accordingly...
Thanx & Regards
Anuj Kamthan
Software Developer
Solversa Technologies,
Pune - 411007, India.
http://www.solversa.com
|
|
|
|
|
You can't do this. You only can change appearence settings in Windows.
Also you can draw scrollbar yourself.
Best regards, Alexey.
|
|
|
|
|
There is no as such setting to change the color of scorll bar...
and abt drow the scroll bar did u mean i should creat custom scroll bars..
Like u can see in Windows xp it shows the scroll bars in blue color
Thanx...
Anuj Kamthan
Software Developer
Solversa Technologies,
Pune - 411007, India.
http://www.solversa.com
-- modified at 5:57 Wednesday 10th May, 2006
|
|
|
|
|
Jax_qqq wrote: did u mean i should creat custom scroll bars.
Yes. But, maybe you can find some third party components with color property.
Best regards, Alexey.
|
|
|
|
|
Ok Thanx a lot for your help...
i will try to search some third component...
thanx ones again
Anuj Kamthan
Software Developer
Solversa Technologies,
Pune - 411007, India.
http://www.solversa.com
|
|
|
|
|
Hi folks,
i have to go to develop the browser application if any one have an idea plz share with me.
Best Regards.,
ranandbe
|
|
|
|