|
A C# app is allowed to access as much memory as any other application on the system.
You don't need to specify a stack size per thread; the CLR allocates 1MB stack size by default. You can, however, specify the maximum stack size when starting a thread. See the System.Threading.Thread constructor[^].
p.s. your questions sound a little bit like a homework assignment. Are they?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Dumbest. Movie. Title. Evaaar.
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Thanks for your reply Judah. Answer to the stack question is clear - thanks.
What determines the amount an application can access - based on your RAM/Disk size? Determined by the operating system? How do I determine what this amount is?
In response to your p.s.: No, not homework questions. I am not currently enrolled in any formal or informal class. The questions arose solely from my own wonderings.
|
|
|
|
|
theFrenchHornet wrote: What determines the amount an application can access - based on your RAM/Disk size? Determined by the operating system? How do I determine what this amount is?
That would be the OS, and the OS is limited in what it can hand out based on your hardware. For example, 32 bit operating systems support only up to 4 GB of RAM. However, if the combine memory usages of all processes running on the system are beyond 4 GB, the OS will use the hard disk as a backup store.
That's a simplified, high-level view of it; if you need a more precise technical answer about the OS and hardware, this forum may not be the best place to ask.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Dumbest. Movie. Title. Evaaar.
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
Hi,
I want to capture url chages in IE browser using a c# application. Can you tell me a method to capture it?
Thanks !
jayasshc
|
|
|
|
|
uow... it seems very complicated. what are you trying to do? why? doesn`t exist another aproach?
obs.: are you using ASP.NET (in yout page, if exists) or just writing a plain C# app?
|
|
|
|
|
Hello
Well, you can't do that directly using C# only. You'd have to make API calls. Two suggestions:
1- Track changes in the Windows Title of the IE window. Once It chanages the URL would have changed. This will give you the title of the page, but not its URL.
2- Capture the handle of the Address edit control, and get it's text periodically -eg. each second or so-. This will give you more percise tracking of thepage's url, but of course this is much harder.
Regards
|
|
|
|
|
Thanks
I prefer the first solution Could you pls give me a sample code line. I tried to find an exaple, but could not.
Thanks !
jayasshc
|
|
|
|
|
Hello
Well, here is an article about exactly what you want:
Click Here[^]
Regards
|
|
|
|
|
Thanks Nader,
Best Regards!
Charith
jayasshc
|
|
|
|
|
If I have a WinForms application, and I want to store an image in the project, but
- I don't want to bloat the executable (imbed the image there)
- I don't want the image to be an external file (for safety, so other programs can't easily change it)
What are my best other options?
|
|
|
|
|
Maybe, if you add the image as a resource (in a resource.resx file) in another project (other than your executable project) and then compile it as a dll. Thus, your executable project would call whatever you want from this dll.
I don`t know exactly if this works, but give a try.
good luck
|
|
|
|
|
Hello
Beside what has been said, another way is to aggregate several images in a file -call it for example .isf-. Make a project called "Image Packager" for exaple to store these images knowing exactly their sizes by bytes. Now in your main project you can access them by their Filename:Byte location. Read each image in a filestream, then use this stream to make a bitmap object.
PS.
One simple trick is to store them in different names only without aggregation. Like renaming "MyImage.bmp" to "Rfgh.dat". no one will know this is an image file. Stupid, but sometimes works!!;P
Regards
|
|
|
|
|
Hello,
I have the following method to help me in installing some COM
components onto the machine...below is a snippet that is causing the
problem...
Type objType = null; <br />
COMAdminCatalog objCatalog = null; <br />
COMAdminCatalogCollection objApplicationsColl = null; <br />
COMAdminCatalogObject objApp = null; <br />
try <br />
{ <br />
objType = <br />
Type.GetTypeFromProgID("COMAdmin.COMAdminCatalog"); <br />
objCatalog = <br />
(COMAdminCatalog)(System.Activator.CreateInstance(objType));
It is part of setup application...so when I run the setup on my
machine, it works fine....
However, when I try to test it on one of our servers.....I get a
Specified Cast is Invalid exception from this line objCatalog =
(COMAdminCatalog)(System.Activator.CreateInstance(objType));
I am guessing its a problem with either one of the last two
line....forgive me, im new to COM
Thanks in advance
|
|
|
|
|
Hi!
Did you verify that objType is correct on the server?
Is the COM class registered correctly on the server?
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
i make ContextMenuStrip
i add four ToolStripMenuItem in ContextMenuStrip
now on run time i want to make for loop to list all ToolStripMenuItem in the ContextMenuStrip
foreach (Control c in this.Controls)
{
if (c.GetType() == typeof(ContextMenuStrip))
{
foreach( Control m in c.Controls )
if ( (c).Name.Substring(3).Equals(cellid.ToString()) )
{
(c).Enabled = boolenvalue;
}
}
}
the problem now there is nooo thing name {{ c.Controls }}
Palestine
|
|
|
|
|
what i can do ??
Palestine
|
|
|
|
|
ContextMenuStrip has specific purpose and capability. What is your purpose of using it?
Best,
Jun
|
|
|
|
|
Hello
What I understood is that for some reason you want to iterate through MenuItems present in a ContextmenuStrip. Here is the code:
foreach(TooStripItem MyItem in MyContextMenuStrip.Items)
{
}
If I were wrong, post me some details of what you really wanted.
Regards
|
|
|
|
|
|
I have three projects...
1) An interface definition dll as Project1.
2) An object definition dll as Project2.
3) A test application as Project3.
Class1 in Project2 implements the interface defined in Project1.
The test application uses Class1.
For some reason, I have to add a reference to the interface dll in both Project2 and Project3! I thought it would only be necessary to reference the interface in Project2, and that it would not be necessary to reference the interface in the application that uses Class1 in Project3.
Is this the expected behaviour?
|
|
|
|
|
Have you declared an interface pointer in Project3 code?
Best,
Jun
|
|
|
|
|
No... Project3 creates an instance of Class1.
|
|
|
|
|
Search the boards. I remember that the exact same question was asked not long ago.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
I have a generic class: myclass<T> where I put T as either a float or a double. However whenever I compile I get the error:
Cannot convert type 'T' to 'float'
I know that any of the types I use can be converted to a float. How can I tell the compiler this?
thank you
|
|
|
|
|
You didn't give the code so I'm guessing here...
Did you do an exlicit cast?
myclass<float> x = new myclass<float>(5.6);
double y = (double)x.value;
If that fails, you could always do something uglier:
float z = x.value;
double y = (double)z;
|
|
|
|