|
Hi!
Moved my project from school to my home PC using a USB. Done that many times and it have worked.
Now I get this message:
Parameter is not valid. C:\Documents and Settings\Peter\Mina dokument\Visual Studio 2005\Projects\Bamse\Bamse\Form2.Designer.cs 111 0
And it points to this line:
this.picBoxPase.BackgroundImage = global::Bamse.Properties.Resources.påse;
The resource "påse" is in my project folder.
Any ideas?
Newbie untill I die!
|
|
|
|
|
It won't compile ? This line is in your auto generated code, so delete it and set the property again in the IDE and see how you go.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi hristo1977,
Well it happened with me once too.
When you specify a resource in your project, VS does not copy that resource to your project. It just takes a reference of that resource which is actually present on your hard drive.
If you have chose the option to embed that resource in your build, then that resource is embedded during compile time. Meaning, at no time, it is actually included into your project.
So, you need to check if the resource it points to is actually present on your drive. Click the resource and check out its path in the properties window and make sure it points to the right thing.
Hopefully it was helpful.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Hi!
The resource is there! But I still get that damn message.
Newbie untill I die!
|
|
|
|
|
Try deleting that reference from the project and include it afresh.
That might work.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
|
It's the webbrowsercontrol. It's built in to the IDE. If you can't see it, right click on the contols list and you can list all the ones that can be added. It should be there by default tho.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi Christian,
Thanks for the reply. I managed to find the control. It is called the Microsoft Web Browser.
Thanks for the same.
I went through some articles here to help me with disabling context menu in this browser, but could not get it to work.
can you please tell me how exactly am i supposed to do it.
Or can you point me to any good article where this has been given.
Thanks in advance.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
ok, good people..i have a following line of code..
using( MemoryStream mStr = new MemoryStream( ) )
{
try
{
mStr.Capacity = totalByteCount ;
}
}
Of course the dude i got inherited this code from is trying to put 141372000 in the memory buffer i.e the capacity. At this point i get the following error
Exception of type System.OutOfMemoryException was thrown." }
I am at a total loss. Have tried different things...So i throw a hail mary over to the code porject dudes.
Thanks for your help
Sameer
|
|
|
|
|
Isn't it possible just use the following code:
using(MemoryStream stream = new MemoryStream()) {<br />
for(int i= 0; i < totalByteCount; i++) {<br />
stream.Write(new byte[] { 0 },0,1);
}<br />
<br />
stream.Seek(0,...);<br />
}
This simply fills the stream with zeroes and resets the stream to the beginning. This way the capacity is set to the right value automatically, plus the stream is really that size.
-- EDIT:
Hmm, I'm sleeping again I tried the code and it seems to me that you are indeed short of memory for this action.
WM.
What about weapons of mass-construction?
|
|
|
|
|
If you really need to write 141MB worth into a stream, perhaps the hard drive is a better location (i.e. FileStream) rather tha RAM memory (i.e. MemoryStream).
|
|
|
|
|
Hi, does anyone know where I can find a free graphing package or windows form control, similar to the scrolling graphs in Windows Task Manager?
I have found several by searching the net, however none seem to have scrolling graphs natively, which doesn't require modifications.
Thanks
|
|
|
|
|
I began working on my first project for a new company back in early September. When I started my project, I told my boss I would be coding in the 2.0 framework, to which he said "Great, sounds good."
So naturally, after completing my project yesterday, what did I discover? The company's servers are only compatible with the 1.1 framework because they're using IIS 5.0 on that server(IIS 5.0 can only allow 1 version of the framework for all projects as opposed to IIS 6.0 which can accomodate different framework versions for different projects). So now, I have to go back and downgrade all of my code to be 1.1 compatible.
One question I have is what's the equivalent of the "List" class(i.e. "List<string>") in version 1.1? I need to declare an array of an unknown size that can increase its elements dynamically as necessary.
Thanks.
-Goalie35
|
|
|
|
|
use arraylist
Sameer Sood
Microsoft Student partner
NIT Durgapur,india
|
|
|
|
|
ArrayList would be the quickest replacement.
If you want your code to remain type-safe, implement custom collections for each type derived from CollectionBase[^] as shown in the example.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
I want to use a font that does not come standard with windows. Is there any way that i can store the font in the app?
(I know of one way, but its not so great - copy the font file into the Fonts folder on the pc when the app loads - but by this point the font's already been replaced by the default and the user doesn't see the new font until the next time they run the app)
|
|
|
|
|
You could store it as a resource in you applications resources.
Darka [ Xanya]
"I am not a slave to a god that doesn't exist."
|
|
|
|
|
The best way to get this done, is to create a setup application which installs the font. That way you don't need to restart the application before you are able to see the font in it. Also this is prevents all kinds of weird hacks that might be needed when trying other ways of using the font
WM.
What about weapons of mass-construction?
|
|
|
|
|
Hi all,
I'd like to handle shutdown event of the operating system, from a windows service.
Anyone knows how ?
Thanks in advance...
|
|
|
|
|
|
Hi
At click event of button i call a thread.
in thread i am searching file(i.e.recursive function).
How can i know that search has ended.
|
|
|
|
|
|
May u explain this ,how to handle
|
|
|
|
|
at the end of the thread give a callback (or/and event) that will alert the main thread that the serach thread has finished
|
|
|
|
|
How to get programatically list of application currently opened in operatin system?
|
|
|
|