|
Does the error dialog look like a one from the framework, the COM objects or a custom one or none at all?
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
It looks like a runtime error dialog.
|
|
|
|
|
Can you provide a bit more background as to what the application does, e.g. what are the COM objects but more importantly what is being done when your application shuts down.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
I think I free all(!) the COM object using Marshal.ReleaseComObject. COM object do different things - one goes across winsock to a server the other loads msscript ctrl to execute some vbscripts.
What's strange is that I have try-catch-finally in my main function of program around all those three lines including application.run, bug now debugger (debugging release) reports an thet there's an exception InvalidComObjectException beeing raised after! that try-catch-ficnally block - so after everything is run.
|
|
|
|
|
So you've basically got:
static void Main(string[] args)
{
try
{
Application.Run(new MainForm());
Marshal.ReleaseComObject(msscript);
Marshal.ReleaseComObject(winsock);
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
}
Am I right?
(One thing I just thought of, do you dispose the msscript or winsock first because if the msscript control is disposed of second then it might be trying to access the winsock control (if you allow this interaction)).
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Hi,
I have such a problem: trying to animate gif with ImageAnimator, and it's displaying it much faster than gif is displayed in all other programs like browsers and ACDSee. Does anyone know why is it so and what can I do with all this?
Thanks,
Alex
|
|
|
|
|
Please list .NET Framework 1.1 and 2.0
|
|
|
|
|
google search results.
Please google first next time!
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I maintain a very mature product (over ten years old) that was written in VC++ 6 (MFC). My team is in the process of giving the app a new look and feel. We decided to try to convert the project to .net to leverage the GUI elements; but had too many issues during this process and forfeit the idea.
This leads to my questions:
1.Could an application that is compiled under VC++ 6 use Win Forms, or VC++ 2003(or higher)Dialogs?
2.This is more of a secondary question to number 1). Could controls be written in C# or VC++ 2003(or higher)then the assembly or .dll be used by an application compiled in VC++ (MFC) 6?
3.If you answer yes to either question; is there any documentation?
Thank you ,
-e
P.S. My goals is to slowly move the application to the new platform. I am trying to make the application co-exist between VC ++ 6 (old code) and VC++ (maybe .net) 2003 or greater (new code). Since I don't have the option to compile the application greater than VC++ 6.
|
|
|
|
|
Hi,
I've loaded gif image into Image object. Could you please give me an advice how to change frame delas? As someone is interested, I get them as follows:
Dim PropertyTagFrameDelay As Integer = &H5100
Dim propItem As System.Drawing.Imaging.PropertyItem = img.GetPropertyItem(PropertyTagFrameDelay)
Dim bytes() As Byte = propItem.Value
Dim delays(frame_cnt) As Integer
Dim i As Integer
For i = 0 To frame_cnt - 1
delays(i) = BitConverter.ToInt32(bytes, i * 4)
Next
Thanks,
Alex
|
|
|
|
|
Wouldn't this work also inverse?
You could use BitConverter.GetBytes to fill a byte array with the delays, stuff them into propItem and then call img.SetPropertyItem.
|
|
|
|
|
Hi,
Thanks for answer. The point is that this don't work inverse, when I've tried to call SetPropertyItem for this property item with this id, it crashes...
|
|
|
|
|
Well then sorry. This was just the first idea that came to my mind.
What exactly means 'crashes'? Have you tried catching the exception and looking into the error message?
|
|
|
|
|
It throws System.ArgumentException with the message "Property not supported." How is written in MSDN it throws this exception if the image format does not support property items. Honestly I think it's a little bit stupid when I can get this property item, and can not set it...;)
And the another question I have is don't you know why ImageAnimator displays gis much faster than it is shown by all other programs, and don't yo know what to do with all this?
Thanks,
Alex
|
|
|
|
|
You are right - this sounds weired. Sorry I don't think I can help you on this
|
|
|
|
|
Hi,
Robert, thank you very much for your trying to help!! I've asked this question in several forums and you were the first who tried to help!
TonightI've found the solution, so let me share it with you
I've wrote my own animator, which uses timer and updates frames for gif images according to frame delays. It was very interesting to find out (I've got this information from one paper) that ImageAnimator for animation uses timer also with interval equal to 50 ms. I've played with my own control and have found that if I put 100ms for timer interval, it plays exactly the same way as browsers do!! This inspiration has came to me at about 3AM tonight It seems that team which has developed browser has used 100ms for their animation and team which has developed .NET framework and ImageAnimator in particular has used 50ms for it...
That's it, now you also know what was the problem and how to manage it.
Best Regards,
Alex
|
|
|
|
|
Thanks for the infos. One never knows when it might be useful.
This still seems weird. I think someone doesn't apply to "the standard" and I think it's the .Net framework.
|
|
|
|
|
i want to know will the insatll shield 10.5 supports dotnet frame work 2.0?
Rajanikanth A.B
|
|
|
|
|
hey can anyone brief meabout the differences between COM and .Net.
also the advantages/disadvantages of the two over each other
Thanks
|
|
|
|
|
COM is Proprietrary standard and sticks to Windows OS only.Where as .net is Paltform independent
COM doesn't support inheritance
COM has disadvantages of DLL hell
.Net support XML completley
"Aim to go where U have never been B4 and Strive to achieve it"
http://groups.yahoo.com/subscribe/dotnetforfreshers
http://himabinduvejella.blogspot.com
|
|
|
|
|
This question unfortunately requires a long time to answer. However, a few other tidbits.
COM is all about interface inheritence, and it uses an artificial construct, IDL and the registry, to maintain all of those interfaces. In .NET, an interface is a native type, and implementation inheritence is also supported.
COM is highly C++-centric, whereas .NET moves closer to the goal of being truly language-neutral.
COM also relies on Win32 and the registry to make it work. .NET is more self-contained.
|
|
|
|
|
Can anybody tell me how to implement a normal (2-state) checkbox for a column on my DataGrid? I have tried using every kind of .NET admonition ("AllowNull = false" on the style, on the column, etc.), but I always get a 3-state check box that at best is a hassle (extra clicking required to get where you want) and at worst causes an error if they leave it in the null state. I don't relish the prospect of watching my users' eyes glaze over as I explain to them the difference between "false" and "DBNull".
Any help will be greatly appreciated!
Doug
|
|
|
|
|
Hmmm... setting AllowNull on the DataGridBoolColumn to false should work (I remember I used it once and it worked).
To avoid the nullstate you could also set the NullValue property to either true or false.
|
|
|
|
|
You can set the AllowNull property on the DataGridBoolColumn to false and it will prevent the tri-state checkbox. I used a little reflection to get a reference to the internal DataGridTableStyle used by the grid (if there's a way to access that field via the public interface, please let me know how).
private void Form1_Load(object sender, System.EventArgs e)
{
DataTable tbl = new DataTable();
tbl.Columns.Add( "TwoState", typeof(bool) );
tbl.Rows.Add( new object[] { true } );
tbl.Rows.Add( new object[] { false } );
this.dataGrid1.DataSource = tbl;
DataGridTableStyle tableStyle = typeof(DataGrid).GetField(
"myGridTable",
System.Reflection.BindingFlags.Instance |
System.Reflection.BindingFlags.NonPublic).GetValue( this.dataGrid1 )
as DataGridTableStyle;
(tableStyle.GridColumnStyles[ "TwoState" ] as DataGridBoolColumn).AllowNull = false;
}
Josh
|
|
|
|
|
Thanks for all the answers, but setting the AllowNull is definitely not working wither for Column or Style. I am becoming convinced that this is because I am working with .NET Framework 1.1.
|
|
|
|