|
Well, if your app is .NET, then a good place to base your system requirements is on those of the framework itself. Try a search on microsoft or google for .NET Runtime System Requirements.
|
|
|
|
|
ON top of what J4amieC said, your own testing will tell you what your applciation needs. You'll need to use Performance Monitor or a good .NET Profiler to get some memory and processor performance statistics and evaluate the data yourself to see what the minimum acceptable processor and memory will be.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Here is a way to find out:
Check windows Task manager when you load the application and see how much memory and CPU usage it uses... and set the reuirments a bit higher...
like it uses 24MB RAM say it needs 32MB RAM
In the end we're all just the same
|
|
|
|
|
I ma creating a application that will monitor system performance and when it gets below something like 12% it will display a messagebox on screen saying "Warning: System resources low, we recommend restarting PC"
Could you code this into a console application?
Second: I want it to automatically when you start it up to minimise itself to the system tray and stay there until user shutsdown PC and I want it to work all the time monitoring system. How would you do that?
In the end we're all just the same
|
|
|
|
|
You should look into creating it as a Windows Service, and capuring when an interactive user logs on to begin monitoring.
|
|
|
|
|
I had a look at the digital and analog clock tutorials here and want to create one for my main screen. I want the analog clock to appear in a panel called (pnlDigtclock) how would you do this?
In the end we're all just the same
|
|
|
|
|
Hi,
I use the "Drag and Drop List View" project.
But I cannot insert Item with largeIcon (or SmallIcon) mode, each insertion is placed at the end of the listview.
Someone has an idea ? ListView.Items.Insert function only works in Detail or list mode.
Thank you,
Freg
|
|
|
|
|
I have a PictureBox1 (PctWallpaper) and I have two buttons (BtnText and btnDraw) Is there a way to let the user move them whereever they want on the PictureBox? and if the user tries to drag the button outside the PictureBox a message appears:
"You cannot plac this item outside the desktop"
how would you do this?
In the end we're all just the same
|
|
|
|
|
Sorry, but all these questions you just flooded the board with - did you want complete working solutions every time? I dont see your attempt at any of these problems anywhere....looks like you are just soliciting for free work.
|
|
|
|
|
I am creating a small Rich Text editor with some additions.
1) Could someone provide the code to make a print button (btnPrint) print whateve is in the RichTextBox (RichTBox). I have a PrintDialog1 on the form.
2) How would you create a way to show that a peice of text is highlighted?
3) How would you create a dropdown list to show a list of fonts on pc and when selected, the font changes to that? (Look at WordPad fontScript) Like that.
4) I want to make a save button with a difference. I have a SaveDialog on form and a button called (btnSave) What I want it to do is either save the document as *.txt or*.RTF BUT if the RichTextBox (RichTBox) has an image in it the *.txt save option will be disabled and if the user tries to save anyway as *.txt a messagebox will appear saying "You have a image in text box. Remove before saving to this format"
In the end we're all just the same
|
|
|
|
|
I have a question about Regex class and wether it is clerver to put that RegexOptions.Compiled option.
Msdn says:
To improve performance, the regular expression engine caches all regular expressions in memory. This avoids the need to reparse an expression into high-level byte code each time it is used.
Does it mean that the Regex object is cached as itself or that another Regex with same pattern and options will use the cached one and will not need to parse the pattern again?
If it is the first case, it means that compiling is useful only when the same object is used several times. If it is the latter, the compiled class will be used every time the same pattern is used.
Thx.
Callixte.
|
|
|
|
|
Callixte,
I don't think that .NET pools Regex objects. It seems that using the RegexOptions.Compiled will only give you significant benefits if you reuse the same object. I wrote the following code to test for reference and object equality, to see if .NET pools the Regex object like it pools the String object in some internal cache. However, the code seems to imply that each object stands alone.
using System;
using System.Text.RegularExpressions;
namespace ThrowAway
{
public class TMain
{
[STAThread]
public static void Main()
{
Regex compiled1 = new Regex( "(a(b)+)+", RegexOptions.Compiled );
Regex compiled2 = new Regex( "(a(b)+)+", RegexOptions.Compiled );
Regex noncompiled1 = new Regex( "(a(b)+)+" );
Regex noncompiled2 = new Regex( "(a(b)+)+" );
Console.WriteLine( compiled1 == compiled2 );
Console.WriteLine( compiled1.Equals( compiled2 ) );
Console.WriteLine( compiled1 == noncompiled1 );
Console.WriteLine( compiled1.Equals( noncompiled1 ) );
Console.WriteLine( noncompiled1 == noncompiled2 );
Console.WriteLine( noncompiled1.Equals( noncompiled2 ) );
}
}
} Now, this doesn't really prove anything; however, I feel that, if the .NET runtime cached compiled1 and compiled2 to the same internal pool, then at lease compiled1 == compiled2 should evaluate to true .
I hope that helps.
|
|
|
|
|
Thanks Curtis,
My guess was that compiled1 and compiled2 would be of the same "class" dynamicly inherited of Regex, so CLR doesn't have to parse twice the expression et re-use the same byte code.
Callixte.
|
|
|
|
|
I have downloaded source code from: http://www.divil.co.uk/net/articles/designers/hosting.asp and its very complex. It allows one to create, manipulate, move etc controls in run time.
The only problem is, I need to be able to programmatically place a PANEL on top of all the controls and other stuff and still use the control box to drag controls on top of this panel. At the moment I can achieve this but the controls dissapear behind the panel!
Please download the code and try it out for yourself!
|
|
|
|
|
How do I clear all of the event handlers on for example a toolbar button click.
Toolbar1.ButtonClick = null; doesn't work it generates Compiler Error CS0079. is there a way to clear all of the handlers without using an explicit reference to all of them.
M
-- modified at 6:10 Tuesday 7th February, 2006
On this post I typed <:code> Toolbar1.Button[nospace]Click = null;<:/code> but it comes out as out as Toolbar1.Buttonclick. There appears to be a bug in formatting.
-- modified at 6:13 Tuesday 7th February, 2006
|
|
|
|
|
Where are you assigning the null value?
Make sure it is after you wire the event handlers, otherwise its pretty pointless lol.
Why not just comment out the wiring code?
Hope this helps
James
|
|
|
|
|
James Gupta wrote: Why not just comment out the wiring code?
Er.. that doesn't really make much sense.
I'm assigning event handlers in my code and then later on I don't want those event handlers to handle the event anymore I want something else to handle it. .ButtonClick only allows += and -= it doesn't allow you to reset the handlers without explicitly referencing them with -=.
|
|
|
|
|
mintguy wrote: .Buttonclick only allows += and -= it doesn't allow you to reset the handlers without explicitly referencing them with -=.
Without the reference, how is it oging to know which one to drop?? No, you can't just drop them all without any regard to what they are.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ah right now I know what you mean - it was not really explained in your first post
|
|
|
|
|
Hi all
Im reading data from an excel file into a c# string, but when i come across a date it is being read in as it's serial date (the number of days thing)
i want the string to hold the exact string literal of the date (e.g. 7/2/2006) and not the serial date, so how do i check the cell value to see if it is a date?
i cant just convert every number that comes out to a date as i still want numbers to be numbers, i just want dates to be converted.
i cant find anything in the excel model that will give me the cell data type
does anyone know how to do this?
|
|
|
|
|
Excel doesn't actually know that the cell contains date information. Instead, with AutoFormat, it sets the NumberFormat property of the cell to the default date format which, for my installation, equals "m/d/yyyy".
I had this same problem with a C# Automation Add-In that I wrote for Excel. I essentially had to write some code to distinguish a number from a date using a combination of the cell value and the NumberFormat property.
I hope that helps.
|
|
|
|
|
thanks for the info, ive managed to do it in one of the longest winded ways ive ever had to do something in my life of programming!
<br />
private string excelSerialDateToDMY(int serialDate)<br />
{<br />
int nDay;<br />
int nMonth;<br />
int nYear;<br />
if (serialDate == 60)<br />
{<br />
nDay = 29;<br />
nMonth = 2;<br />
nYear = 1900;<br />
<br />
return "29/02/1900";<br />
}<br />
else if (serialDate < 60)<br />
{<br />
serialDate++;<br />
}<br />
<br />
int l = serialDate + 68569 + 2415019;<br />
int n = ( 4 * l ) / 146097;<br />
l = l - ( 146097 * n + 3 ) / 4;<br />
int i = ( 4000 * ( l + 1 ) ) / 1461001;<br />
l = l - ( 1461 * i ) / 4 + 31;<br />
int j = ( 80 * l ) / 2447;<br />
nDay = l - ( 2447 * j ) / 80;<br />
l = j / 11;<br />
nMonth = j + 2 - ( 12 * l );<br />
nYear = 100 * ( n - 49 ) + i + l; <br />
return nDay+"/"+nMonth+"/"+nYear;<br />
}<br />
<br />
public bool inArray(object key, object[] array)<br />
{<br />
for (int c=0; c<array.Length; c++)<br />
{<br />
if (array[c].Equals(key))<br />
return true;<br />
}<br />
return false;<br />
}<br />
<br />
string[] dateArray={"dd/mm/yyyy","[$-F800]dddd, mmmm dd, yyyy","dd/mm/yyyy;@","dd/mm/yy;@","d/m/yy;@","d.m.yy;@","yyyy-mm-dd;@","[$-809]dd mmmm yyyy;@","[$-809]d mmmm yyyy;@"};<br />
<br />
<br />
if (inArray(myType.ToString(),dateArray))<br />
{<br />
string retDate=excelSerialDateToDMY(Int32.Parse(myVal.ToString()));<br />
System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("en-GB");<br />
DateTime myDate = DateTime.Parse(retDate,culture,System.Globalization.DateTimeStyles.NoCurrentDateDefault); <br />
return myDate.ToShortDateString();<br />
}<br />
else <br />
return myVal.ToString();<br />
i hope this helps someone else in the future
|
|
|
|
|
hi all,
To strip off circular dependency between a C# proj and a C++ proj, I need to define an interface in C++ proj. and implement it with C#. The code is like this:
//in C++ proj.
using namespace A
__gc __interface IA
{
void display();
}
//in C# proj.
public class B : A.IA
{
void display(){}
}
the error message is like this: COM Interop registration failed. Could not find a type library for assembly "A.IA" ...
3q for help!
Dilly
|
|
|
|
|
Please Check that mangaed c++ u referenced r nt
|
|
|
|
|
Hi,
I've searched a lot on internet and in msdn library, but I don't exactly know what really works.
I can use call C++ method in my C# project, but I can not implement the C++ interface, I know little about COM/COM+, can you tell me more? 3q!!!
Dilly
|
|
|
|