|
Dragonfly_Lee wrote: to create a new log if the size is out of limitation
Instead of deleting the old log, start overwriting; you'll loose information if you just wipe the logfile. Alternatively, you could delete the oldest entry every time you add a new one.
Whether this is feasible depends on the maximum size of the logfile.
I are troll
|
|
|
|
|
Eddy Vluggen wrote: Instead of deleting the old log, start overwriting
I did not mean to delete the log file. We can create a new log file, such as:
1.log
2.log
...
So we will not lose any information. However, if the log file size is too huge, we also need to consider the disk space.
I Love KongFu~
|
|
|
|
|
Hi ALL,
retrieving a string from database like this
1. MAKARAMPURAM, MAKARAMPURAM, 2. SALINA PUTTUGA, SALINA PUTTUGA, 3. MAKARAMPURAM, MAKARAMPURAM, 4. MAKARAMPURAM, JANNI PUTTUGA, 5. MAKARAMPURAM, MAKARAMPURAM, 6. KORIKANA PUTTUGA, KORIKANA PUTTUGA, 7. MAKARAMPURAM, MAKARAMPURAM
Now i have to display this entire string to label,in the form of 3 or 4 lines is it possible? could anyone help me how to split this string
Thanks
Nath
|
|
|
|
|
Nath wrote: Now i have to display this entire string to label,in the form of 3 or 4 lines is it possible? could anyone help me how to split this string
If you really mean splitting, have a look at String.Split method. if you just want to show that on several lines and control the line breaks you could add new lines before the ordinal numbers.
|
|
|
|
|
Will the length and pattern of the string remain same? If not, then you cannot assure that the string can be shown in 3-4 lines.
If it remains same, you can get three equal length substrings from the string. (There is a lot of chance that the substring will be illogically formed.)
Or, split the string over numbers(provided pattern remains same) and join the consecutive parts till the total length becomes about 1/4th of the original string.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
|
|
|
|
|
I'm writing application with CsGL library.
So I use this class to render all graphic:
CsGL.OpenGL.OpenGLControl
The problem is that sometimes rendering area is out of this control. What can I do to solve this problem?
|
|
|
|
|
hi all
i have a windows application using c# code....
i wanted to create a messagebox in a button click...
i have added
[DllImport("User32.dll")]
public static extern int MessageBox(int h, string m, string c, int type);
but am getting an error like " The method or operation is not implemented." here in
private void MessageBox(string p)
{
throw new NotImplementedException();
}
thanks in advance
|
|
|
|
|
Why aren't you using the messagebox that comes with the framework.
There is one in the system.windows.forms namespace.
System.Windows.Forms.MessageBox.Show("test");
|
|
|
|
|
thanks 4 your reply....
its working fine...
|
|
|
|
|
You can mark the good answer.
I Love KongFu~
|
|
|
|
|
Salut,
Je viens de reprendre un projet dans lequel je fais appel à une DLL fournie par un client.
Le référencement a été fait. Je programme en C# et j'ai deux PC's avec visual studio 2005. Le premier est en XP pro. Pas de problème avec le référencement et tout fonctionne à merveille. L'autre, un laptop sous Vista Business. Sur ce dernier : le même projet me met des "warnings" pour l'interop. Comment solutionner cela ?
Merci de votre aide
Benoit
|
|
|
|
|
Parlez Anglais, if you desire an answer
I are troll
|
|
|
|
|
First like Eddy said: english only here.
Second from what I can understand (my French isn't perfect), you are getting errors on a vista pc where you don't get them on XP.
What errors.?
What does the program do (at the time of the errors)?
My first thought would be that this is a UAC problem but without more explanation (in English) I can't be sure.
|
|
|
|
|
Il serait intéressant de voir les "warnings" en question, ça pourrait aider. Aussi, une fois compilé, est-ce que le projet fonctionne quand même?
|
|
|
|
|
Thanks for all to reply so fast.
I'll rewrite it in english...
So, I'm C# Programmer and in my project I received from our client a DLL. When I develop on Visual Studio on XP all is working without any problem. If I check the reference, the Name and the Path are filled in and no exclamation point on this.
I copied all the project on my laptop to work home
a) I have an error message on my 'using myDll' in the begin of my class.
b) secondly, on the dll (when I check my references) I see an yellow exlamation mark.
When I use the program in the bin/debug myProgram.exe, I receive a message :" value type cannot be null" only when I use it on vista. On XP, no problem at all.
Thanks for your help
Benoit
|
|
|
|
|
Hi Benoit,
the yellow exclamation mark means that the assembly you are referencing is missing. What kind of assembly is it (sth. in the GAC or a third-party component, you added by browsing)?
Just a suggestion from my side:
For 3rd party components i normally add a folder called "Library" to my project where I put all needed assemblies (add by choosing "add existing element"). Then I add the reference to the assembly by browsing to this library folder. This works well with source control etc.
Regards
Sebastian
|
|
|
|
|
halleuxb wrote: on the dll (when I check my references) I see an yellow exlamation mark.
That means that the reference points to a file that doesn't exist.
Remove the reference and add it again.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I removed it and place a new one ... on vista, no good effect.
On XP, when I use the
private System.Type oType = System.Type.GetTypeFromProgID("SECUREXVIL.SECVIL");
I see in oType : Name = "__ComObject", FullName = "System.__ComObject"
On Vista, the same code : oType : NULL
Is it in my code or a problem with Vista configuration ?
Best regards,
|
|
|
|
|
This isn't due to using Vista or XP (or 2000, for that matter). Visual Studio tries to locate your third-party dll when you compile. This dll is probably in a different location on your Vista-machine. Ergo, Visual Studio looks for the dll as you specified on your XP-machine - and it's not there on your Vista-machine.
Go to the solution-explorer in Visual Studio, open the "references" branch and remove the reference to the dll. Next, add the reference anew (browse to your dll) and recompile on your Vista-machine.
Things should be fine now
--edit--
This is the same answer you received from Guffa, I just used more words to explain the same thing.
I are troll
|
|
|
|
|
ENGLISH SITE.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hello All,
I am about to create a custom windowing system for both native C++ and fully managed .NET applications (plus perhaps non-Windows platforms as well). Although some aspects of the code, such as rendering routines, are environment-dependent and must be rewritten, there are certain immutable elements, such as behavior of common controls (e.g. reaction of a button or an edit control to user's input, or logical events that these controls can fire, such as "Clicked" in a button, or "TextChanged" in an edit control).
Therefore, I would like to code these reusable parts only once.
I know one solution would be to implement them in C++ and then wrap them up in a C++/CLI managed assembly. However, the managed interface must be written in order to reflect all events, methods and properties from the C++ implementation to .NET. That forces me to add each new event or property in two places: one in the C++ part, and another one in the C++/CLI interface, which is something I don't want.
Considering I have my own RTTI implementation in my native C++ library, would it be feasible to automatically generate required .NET wrappers?
Note that I would like to use the library with comparable ease in both C++ and C#. If I got a std::string EditBox::Text in C++, there must be a string EditBox.Text
in C# (and not a System.Runtime.InteropServices.Marshal.GetMyDamnedString(IntPtr(EditBox.Tag).ToPointer()) , nor any similarly beautiful construct).
That's quite an architectural question, but I didn't want to crosspost - that's why it ended up here.
|
|
|
|
|
Hello,
the common codebase of C++ and C# is C language.
So, code the oldie-goldie and forget the fancy-sissies-object-oriented-paradigms.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi, thanks for your voice.
My question was rather on how to automatically generate .NET wrappers for an existing native C++ code (or code the C++ core logic in a way that it can be easily reused with .NET, without manual reflection of each change).
Perhaps I might use C++/CLI-based tool to convert my own existing RTTI to the .NET Reflection, and compile the generated .NET classes into a new managed assembly?
What do you people think?
|
|
|
|
|
My question is: Why should you do that?
Cannot you live happy with a fully managed solution?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Not in this case. Although most of my projects are fully managed, I would also like to use this particular library for certain time-critical applications written in native C++, whose performance might suffer from .NET boxing.
|
|
|
|