|
I agree with you.
Back to real work : D-22.
|
|
|
|
|
.S.Rod. wrote:
Back to real work : D-22.
Could you explain this, I think I have read it in your posts since it said D-28. What does it mean, are you counting down days or something?
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
In 21 days, I am employed again.
Back to real work : D-21.
|
|
|
|
|
.S.Rod. wrote:
In 21 days, I am employed again.
Hey, congratulations and good luck.
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Is there support for using .ini files in C#? I can't seem to find it anywhere. Is there a substitute for this (I don't want to use the registry)?
Thanks for your help!
dpb
Darryl Borden
Principal IT Analyst
darryl.borden@elpaso.com
|
|
|
|
|
Darryl Borden wrote:
Is there a substitute for this (I don't want to use the registry)?
How about just using an XML file, I believe this is the "way" some apps are going now because it is so easy to work with them inside the Framework.
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Can you show me an example how to read\write data to a xml file?
|
|
|
|
|
Here is an article that may help:
Convert INI file to XML[^]
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Try to use this code in your app.
////////////////////////////////////////////////////
public class IniFile
{
public string path;
[DllImport("kernel32")]
private static extern long WritePrivateProfileString(string section,string key,string val,string filePath);
[DllImport("kernel32")]
private static extern int GetPrivateProfileString(string section,string key,string def,StringBuilder retVal,int size,string filePath);
public IniFile(string INIPath)
{
path = INIPath;
}
public void IniWriteValue(string Section,string Key,string Value)
{
WritePrivateProfileString(Section,Key,Value,this.path);
}
public string IniReadValue(string Section,string Key)
{
StringBuilder temp = new StringBuilder(255);
int i = GetPrivateProfileString(Section,Key,"",temp,255,this.path);
return temp.ToString();
}
}
=====================
http://wasp.elcat.kg
|
|
|
|
|
Are there any good Class or Collection tutorials out and about? I cannot find any on this site, does anyone have some links?
thanks =)
|
|
|
|
|
Hi *.*!
I'm a beginner on C# and don't seem to be capable to figure out on how to do a splash screen. What I have is a Main Window which takes some time to load because it does quite some stuff in the OnLoad. Because of this I'd like to display a so-called splash screen which is loaded and shown when the application starts and as soon as all the initializations are done, is unloaded again. Can anybody pls. advise? Don't need the source code (would be fine though ) but just a hint on how to do this.
Thanx in advance!
In theory, there is no difference between theory and practice. In practice, however, there is.
(unknown author)
|
|
|
|
|
Create a form, remove the border, put a timer on it, in the Elapsed event, Close the form.
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
Thanks for your answer, but:
1. you don't have control over the loading progress. What I wanted to do is to display the splash screen only as long as my form needs to load. No longer no shorter.
2. Another issue with those splash screens ist that they should stay on top of all windows in your application. If you do it a modal dialog, processing (loading the main form) will not continue as long as the form is shown, if you do it with .TopMost=true and .Show, you have it hanging over each and every application. As well not quite what I would need.
After giving the whole thing a good thought, I came to the point that the only solution is to spawn a new thread when the main window starts loading, show a form in this thread and stop the thread when I'm through with my stuff and the main wnd is ready to be shown.
Agree?
Thanks a lot,
Matthias
In theory, there is no difference between theory and practice. In practice, however, there is.
(unknown author)
|
|
|
|
|
Instead of setting your main form as the start up object, try creating a moudle (what ever they are called now) and put the sub main there. In there , display your spalsh screen, the display your main dialog. When the main dialog is done loading, kill the splash screen.
|
|
|
|
|
Is it possible to serialize an Exception derived class? When I try to add an exception to a System.Messaging.Message object (which internally serializes the object to XML) I receive the following error:
System.InvalidOperationException: There was an error reflecting 'Send.DALException'. ---> System.InvalidOperationException: The property 'Source' on type 'System.Exception' cannot be serialized because it is decorated with declarative security permission attributes. Consider using imperative asserts or demands in the property accessors.
What does this mean? Can I get around it?
|
|
|
|
|
hi,
i use this exception class in my remoted components. this execption class is serializable and should help you with your problem.
[Serializable]
public class ComponentException: ApplicationException, ISerializable
{
public ComponentException()
{
}
public ComponentException(string message)
: base(message)
{
}
public ComponentException(string message, Exception inner)
: base(message, inner)
{
}
//Deserialization constructor.
public ComponentException (SerializationInfo info, StreamingContext context)
: base( info, context)
{
}
}
hope it helps
franz
|
|
|
|
|
Thanks for the reply. Message queuing must try to serialize the object differently to your project because I still get an error. Its complaining it cant reflect the class because of security? I just have a wizard created Windows Forms project and have done nothing with security. Am I missing something? Heres a quick sample of code:
<br />
System.Messaging.Message msgRequest = new System.Messaging.Message();<br />
DALException apex = new DALException("Database Error", inner);<br />
msgRequest.Body = apex;<br />
msgRequest.Label = "Test";<br />
requestQ.Send(msgRequest);
System.InvalidOperationException: There was an error reflecting 'Send.DALException'. ---> System.InvalidOperationException: The property 'Source' on type 'System.Exception' cannot be serialized because it is decorated with declarative security permission attributes. Consider using imperative asserts or demands in the property accessors.
|
|
|
|
|
hm, apperently your problem is not with the serializer but with code access security.
there is a tutorial available in the online help focusing on declarativ and imperativ code access security: "ms-help://MS.VSCC/MS.MSDNVS/csref/html/vcwlkSecurityTutorial.htm#vcwlksecuritytutorialsuppressingsecurity" or type "Security Tutorial" in the search screen of the online help.
i didn't have time to look into code access security up to now, so i wont be much help on this topic. if you find a solution to this problem it would be great if you drop me a mail.
the help also states that a default XMLMessageFormater is used if you do not provide your own. perhaps you could write your own XmlMessageFormatter class and let the message queue use this one instead of the default.
cheers
franz
|
|
|
|
|
Okay, I searched the message board and it looks like this is a new topic.
From the point of view of having code that does not require changes and compiles, I have had a few designs that really would work best if I can dynamically load a DLL. So this has led to a few questions:
1. Just what are the steps I have to take to dynamically load a DLL
2. In all cases, each DLL is an implementation of a template DLL (or an inheretance of a base class...just with a different name in each case. So we were thinking of creating reference to the base class, establishing an object of that type, but dynamically setting it to whichever DLL I want to load.
3. Has anyone done any testing to determine if a dynamic load via Reflection has as bad of a throughput effect as late binding in VB6?? (early binding having a performance edge of 1000 fold over late binding) I was thinking that since we are doing what I explained in point 2, that I would have the flexibility of 'late binding' in that I am loading one of n-fold objects, but with the speed of early binding since I have the base object defined.
I would appreciate any input on this topic!
Thanks, Michael
_____________________________________________
I have a tendancy to where my mind on my sleeve I have a habit of losing my shirt...
|
|
|
|
|
How can this be a new topic when you see the "how to make a plugin" thread just below ?
Back to real work : D-23.
|
|
|
|
|
I searched for dynamic load, created the thread, then read the stuff on plug-in. ooops.
_____________________________________________
I have a tendancy to where my mind on my sleeve I have a habit of losing my shirt...
|
|
|
|
|
Hello!
I made following steps:
1) Created a Winform with DataForm-Wizard.
2) Now I created a Button next of one textbox. In this button i
open a findfile-form which returns a string. This string i want
to write into my textbox with:
textbox1.text = returnvalue
If I start my project now I clicked my button and choose a File.
After that I see that in my textbox1 the filename comes up.
Then I jump to the 2nd textbox which is bound to the same dataset.
After I changed the 2nd textbox the value of the first textbox change
automatically to null.
I searched some newsgroups for this problems and found some useful but
nothing which can help me!
A tip was to add the command "bindingcontext[].EndCurrentEdit()" after
the command "textbox1.text = returnvalue" but then i get the error-msg
that some fields of my dataset are null. So it looks like the i can only
make a "EndCurrentEdit" at the end before updating.
What can i do to update my textbox and also get the changes to the dataset!
Thanks
Christian
|
|
|
|
|
can any body tell Process.id propertey is an int32 in vc++.net managed code? am i right ?
in vc++ process id is in DWORD data taype
if i want to get Process id in DWORD How to type caste it in DWORD?
r00d0034@yahoo.com
|
|
|
|
|
DWORD strictly speaking is UInt32. But you can you any data type with the same width. IOW UInt32 or Int32 or IntPtr on 32-bit systems.
Hope this helps
"I dont have a life, I have a program."
|
|
|
|
|
hello
i want to know can i make a plugin using c sharp
can someone help me out.
ASIM
Asim
|
|
|
|