|
As long as the reference is a project reference and not a file reference, then I don't know. Are you current with services packs for the IDE? Perhaps reinstalling is necessary.
Oh, do you ever get errors or warnings about B's assembly being in use (or the PDB file in debug builds)? We get this error sometimes here and you just have to kill the open handle. Often, this means restarting the IDE (updating the project reference isn't necessary). This typically happens if you run your app and either leave it running or stop it while debugging. Pieces stay in use.
Just a thought. Good luck!
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
I am up to date on all my service packs. But yes I was getting that error. Originally, I had all my projects outputted in the same bin directory. Then I started getting that error and so I changed the output for project B to be its local bin directory and it seemed to solve it. Thanks for your help though.
|
|
|
|
|
For one program I am converting to C# from C++, there are many large struct arrays. The struct itself is made up of six or seven numerical values, but there are approx. 20,000 of them. A program will automatically generate the file, but I do not know how to store it. Originally, the program generated a large .cpp file, so, ideally, it would generate a .cs file. Unfortunately, C# does not appear to have a similar feature.
Some formats I have considered are:
1) Serialized array of the structs, either as an external file or as an embedded resource. This is far from ideal, because serialization stores the assembly, version, and type name from which it was created. For reasons that are hard to explain, storing this data will render the file unusable.
2) XML Serialization: this is out. For such a large file, it is a very verbose file format.
3) Reading/writing structs in C# (as in fread/fwrite), with the file as an embedded resource or as an external file. The code that I wrote to do this is probably not very efficient, and for 20,000 structs, efficiency is a big concern.
4) This may seem a little weird: data segments in IL. It might be possible to generate a .il file that contains a ".data" section which contains the raw data of an array of structs. Is this even possible?
Anyway, if anyone has any suggestions, questions, or comments on what to do, please let me know. There may be something that I am missing.
Thanks.
PS. It is very early in the morning for me. If I do not make any sense, that is why
|
|
|
|
|
Why convert the program to C# if it is large? Use MC++ instead and take advantage of both worlds (managed and unmanaged) without being seen.
|
|
|
|
|
I thought of that. However, it is not ideal. The program might have to be run from a network share (untrusted source) and MC++ will fail this if it has any native code (AFAIK).
The real reason: the managers want it in C#
|
|
|
|
|
>> and MC++ will fail this if it has any native code
C# code will also fail if you use [DllImport] and the client machine has not checked "allow untrusted source code execution" from the .NET config panel.
|
|
|
|
|
I figured out something with serialization. I was missing something very obvious, so now serialization will work for me. Thanks for helping.
|
|
|
|
|
Hello,
When playing with the webbrowser control I realized two
things:
- If I call Navigate("about:blank"...) and the line after
Navigate("http://www.test.com/"...), the first
call 'about:blank' never fire a
beforeNavigate2,NavigateComplete and DocumentComplete
events and the webbrowser is not loaded with the blank
page. Of course the second call properly load the page
and all events are fired. How is it possible to make sure
that both Navigate calls are going to work ?
- When I use Webbrowser.Stop() it seems that it doesn't
prevent the browser to continue loading parts of the page
and fire Before,Complete & so on events. Maybe the
problem is related to the other because I try to call
first Webbrowser.Stop() and I call Navigate
("about:blank"...) the line after to empty the
Webbrowser. I'm not sure the WebBrowser.Stop() is
executed but the second call "about:blank" fire
before,complete & so on events and works. How is it
possible to make that the Webbrowser.Stop() call works ?
And if Stop() doesn't do it, how is it possible to
prevent the load of parts of the page ?
Any help will be greatly welcome,
R. LOPES
Just programmer.
|
|
|
|
|
Because of the multi-threaded nature of IE, the WebBrowser.Stop() method doesn't work well. Multiple framed pages only worsen the situation. In fact, the navigation toolbar does not work as soon as you have more than one frame in the web page.
I believe that you can't stop the loading of a page once it's started. It's really up to you to filter out the html code by having it loaded separately and ask IE to process it.
|
|
|
|
|
I have one quick question. How can I redistribute any application(Windows Media Encoder in this case) with my C# setup application. I have the WMEncoder.exe which is the redistributable and have included it with the setup app, but all that happens is that the exe file is installed, it is not run. And if I create a custom action that runs the executable, in one of the four nodes(Install, Commit, Rollback, UnInstall), it keeps giving me an error that the installer is already running and to quit the installer and then restart. How can I have my setup application automatically install Windows Media Encoder??????????????????????????????????????????????? Ideally I would like to have a Launch condition setup for the Encoder, but then none of the custom action nodes will be accessed and no custom actions will be launched. I am stumped and can't seem to find much documentation on this. Help?????????????
Please Help,
Thanks,
Kendal
|
|
|
|
|
hello ,
i want to have some delay in the execution foreach loop.
i actually want to display different web pages in internet explorer(embeded in my application).
but foreach loop just went through very quickly and just show me the last page.
have used sleep(); but this just do the same.
have also used Timer, but not working.
can someone guide me on this, in case of foreach() loop.
ASIM
Asim
|
|
|
|
|
can we see the code...
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
|
From your description, it sounds like the reason your code doesn't work as expected is because the loop is running on the server and is thus starting over each time. I have two that you could try, both are client-side javascript:
Window.setTimeout(code, delay) - A string of script to execute after millisecods delay has expired. You could call a function that keeps track of which page to display next. setTimeout fires only once, so your function will have to reregister call setTimeout() as well.
Window.setInterval(code, interval)
Window.setInterval(func, interval, args...) - Similiar to setTimeout, but repeats perpetually. The second overload may be the most appropriate for your problem.
HTH
|
|
|
|
|
i am using c# and its a desktop application, no server side things in it.
ASIM
Asim
|
|
|
|
|
Remember that Thread.Sleep() takes time in milliseconds. This executes on the current thread, so there's no reason that Thread.Sleep(30000) shouldn't sleep for 30 seconds.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
|
As I said, the loop is flying through in mere milliseconds. You must put Thread.Sleep(30000) (30 seconds here, for example) after you navigate. For one, navigate is a non-blocking call so each iteration doesn't wait for the next to finish. Second, even if it was a blocking call, you still wouldn't have enough time to read the page. How is this hard to understand?
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
ok sir,
so would it work in your opinion?
ASIM
Asim
|
|
|
|
|
Yes, it'll work. It's supposed to work. If it didn't, there were be many things wrong with your entire system. Read the documentation for Thread.Sleep . The call will block for the specified time, giving the WebBrowser control enough time to load the page and you to read it, and then the method will return and the next iteration will continue. This is a simple problem.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
hello,
i wan to change date, after getting from database (string or date) to format shown below:
2003-07-11 16:52:00.000
whereas its showing like this. 24/10-2003 ... pm/am
have tried all the methods in system.datetime class.
but nothing like this.
CAN SOMEONE GUIDE ME ON THIS.
i have use datetime picker as well but nothing uptll now.
WAITING
ASIM
Asim
|
|
|
|
|
|
How is it possible to use a combo box, that has two values, Yes and No, and depending on which one a user selects, must equal 0 or 1.
To add to this, the combo box is bound to a dataTable where the values it receives are either 0 or 1.
I cannot seem to work this out. I saw the Addrange method, and thought that might be what I want, but MSDN has very little in the way of usefull information on this. Please help me.
|
|
|
|
|
Well if you getting the information from a database then you could simply add the strings "No" and "Yes" to the comobobox and then use the selected index property to select the correct string. For example if you're reading in the data from the database and the value you get is 0 then that would set the comobobox to index 0 (or the string "No")
- monrobot13
|
|
|
|
|
Sorry, I dont want to sound stupid, but I am, as I dont really understand how thats done. I can understand setting the selected index, but how would you tell the control to use Yes and No, and to bind those respective values to 1 and 0.
|
|
|
|