|
Hi Luc,
Thank you for the reply. Yes this is exactly what I did. I've moved the data receiving controls into a new groupbox. I'm trying to learn how this works. I don't know how or where to move the classmatesBindingNavigator.
Thank you,
Glenn
|
|
|
|
|
I checked BindingNavigator, I now don't think it matters where it sits.
I'm still not convinced about your Load event not firing. Is the event still wired? (does it show a handler in the properties pane? or do you still see the "Load += new EventHandler(...)" bit in the designer file?
Try putting a breakpoint high up in the event handler; alternatively insert a MessageBox.Show() .
|
|
|
|
|
Hi Luc,
Yes, the event is showing in the properties window under "Load", and I do see it wired in. When I set a break point at the entry to the event, I can see that it never hits, the form loads and we never hit the break point.
If I comment out the two GroupBoxes above and change nothing else, rerun the application with the debugger, I stop at the Load Event.
I thought I lost my mind at first, wondering how the load event is not hitting when the form is getting loaded.
I tried creating a simple Hello World form, placed a GroupBox on the form, added a label within the GroupBox, added a MessageBox.Show to the Load Event and it works.
So I then added a MessageBox.Show to my Class Reunion application and it doesn't give me a message box.
Here is the code that setups the form. I eliminated the code for the controls.
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(683, 344);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.classmatesBindingNavigator);
this.Name = "ClassReunionPlay";
this.Text = "ClassReunion";
this.Load += new System.EventHandler(this.ClassReunionPlay_Load);
((System.ComponentModel.ISupportInitialize)(this.classmatesBindingNavigator)).EndInit();
this.classmatesBindingNavigator.ResumeLayout(false);
this.classmatesBindingNavigator.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.classmatesBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kTReunionDataSet)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picturePictureBox)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
I think you are also right on moving the bindingNavigator because if I call the Load Event, the bindingNavigator shows I have 433 records, when I click the next record button, I do not see any data in the controls.
Thank you,
Glenn
|
|
|
|
|
|
It should be in the .NET Framework SDK
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yeah, that'd be nice. Where is it?
I see mentions that it might be in the next version of the Windows SDK.
|
|
|
|
|
|
Hello,
I have developped an Add-In for Office Word using Visual Studio 2008 and VSTO.
At some point, as I save an XmlDocument, IsolatedStorage is invloved.
For this particular kind of save, my Application Domain must be correctly set up.
Problem is VSTO is responsible for loading my assembly in its application domain (source: http://www.vikasgoyal.net/office/VSTO%20Application%20AddIn%20Architecture.aspx[^]), and that application domain is not correctly set up (ActivationContext Property is Nothing).
My question is: is it possible to load my assembly in another application domain ? Or is it possible the application domain managed by VSTO ?
Thanks in advance,
Aurélien
|
|
|
|
|
|
Hi,
I am having real trouble finding an article which explains what the relationship is between the various versions of C# and the .NET (and ASP.NET) libraries. I want to be able to answer questions such as: if you want to use, say, C# 4.0, does that tie you to a minimum version of .NET (and the CLR)?
Any pointers would be very much appreciated.
Best wishes, Patrick
|
|
|
|
|
Tricky to answer that one. In principle, C# is just a compiler, which compiles code to the CIL (or MSIL). Now MSIL has not changed greatly since standardisation (I don't even think it has changed), so things look bright there. The problems are that:
C# is not a pure compiler. For some language features (for example it's basic object implementation), it relies on the CLR to supply the implementation. So constructs which are added to the language may well rely on specific features of the libraries.
Also when compiling code (which happens in asp.net pages), the compilation will rely on System.CodeDom.Compiler to emit the MSIL. Since System.CodeDom.compiler is part of the CLR, you could say that there is a dependency on the libraries ( I'm pretty sure that when you compile through the C# compiler, the compiler relies on the CLR to emit it's bytecode, and will choose the adequate version of the CLR for it's task.
SO: I'm not sure, this is educated guesswork. Haven't found anything on this subject really.
Anybody can offer some more insight?
Pity that Brad Abrams has just left Microsoft, he would have been the person to ask... He's the father of .Net. http://blogs.msdn.com/brada/default.aspx[^]
|
|
|
|
|
Technically, there are no different versions of C#; there are only different versions of the framework, which instruct the IDE, compiler, linker and other tools as to what is correct and what is not. If you use the 4.0 framework, then you are automatically using C# 4.0; if you use the 1.1 framework, then you are using C# 1.1.
Because of this, there is no minimum version of the framework, there is only the version needed by your application. If you compile your app to the 4.0 framework, your user will need to have the 4.0 framework. This is because the code does not reference System.Core , it references System.Core version 4.0.0.0 public key token whatever. If that assembly is not found, your user will not be able to run the app. Likewise, you cannot compile your app to the 2.0 framework and expect it to work if the user has only 3.5 or 4.0.
|
|
|
|
|
Gregory.Gadow wrote: Likewise, you cannot compile your app to the 2.0 framework and expect it to work if the user has only 3.5 or 4.0.
Not entirely true. .Net framework 3.5 and 4.0 are technically extensions of the 2.0 Framework, though dependant on enhancements made in service pack 1 of 2.0. Therefore anyone with 3.5 or 4.0 installed DOES have 2.0 installed, so 2.0 apps will continue to work fine. However you you will have to build against service pack 1 which only comes as part of the 3.5 and 4.0 bundles. It is not available separately, so you may as well build against the later frameworks even if you do not use their functionality.
3.5 to 4.0 is I believe a breaking change, and likewise 1.0 to 1.1 to 2.0. As far as I am aware only the 2.0 Framework has persisted upstream.
|
|
|
|
|
3.0 and 3.5 were additive releases to the 2.0 framework that also included some service packs to 2.0.
However, The 4.0 framework is a completely different version than the 2.0 framework. Just having the 4.0 framework does not imply that the 2.0 framework is present.
|
|
|
|
|
Thanks for the clarification
|
|
|
|
|
My god - could this BE any more complicated. I thought .NET was supposed to cure the old 'DLL hell'; seems to have replaced one set of problems with another.
Does anyone know if you can get an installer (or something) that will simplify the process of getting the right version of .NET for an application?
Over the years, I have always found myself having a negative reaction to many Java applications because they just never seemed to work (though this does seem to have improved somewhat recently). The reason could have been bad coding, but I got the feeling a lot of it may have been due to having the wrong framework installed. If I were trying out a .NET application and I got a runtime exception saying the right version of the framework was missing, I'd be that much more likely to ditch the app - especially if it were just something small that I was evaluating.
I guess the point I am really making here is that all this version stuff needs to be something the end-user just doesn't have to worry about or .NET and I as the developer are failing them in a big way and they will simply go back to that old C++ .exe they know and trust.
-Patrick
|
|
|
|
|
Actually, scratch the question in my last post. Following the link posted by Jinal, it looks like I need to investigate 'Click Once' deployment maybe.
-Patrick
PS - My first ever program was a plot of X-squared on a ZX81 in BASIC (which crashed because of lack of screen memory after plotting the fourth block); stuff is just too big and complicated for me these days. Maybe I need a new job - pushing trolleys at ASDA maybe.
|
|
|
|
|
This information is more difficult to find than it should be. Here is a breakdown which shows how Visual Studio, CLR, and .NET Framework versions relate to each other:
Visual Studio CLR .NET Framework
----------------------------------------------------------------------------------------
Visual Studio .NET (Ranier) 1.0.3705 1.0
Visual Studio 2003 (Everett) 1.1.4322 1.1
Visual Studio 2005 (Whidbey) 2.0.50727 2.0
Visual Studio 2005 with .NET 3.0 Extensions 2.0.50727 2.0, 3.0
Visual Studio 2008 (Orcas) 2.0.50727 2.0 SP1, 3.0 SP1, 3.5
Visual Studio 2008 SP1 2.0.50727 2.0 SP2, 3.0 SP2, 3.5 SP1
Visual Studio 2010 (Hawaii) 4.0.30319 4.0
As for how C# relates to all of this, the breakdown is:
C# CLR .NET Framework
--------------------------------------------------------------------------------------
1.0 1.0.3705 1.0
1.1 1.1.4322 1.1
2.0 2.050727 2.0, 2.0 SP1, 3.0, 3.0 SP1
3.0 2.050727 2.0 SP2, 3.0 SP2, 3.5, S.5 SP1
4.0 4.0.30319 4.0
<update>Corrected the information for C# 3.0.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
modified on Sunday, April 25, 2010 9:02 AM
|
|
|
|
|
Thanks for all these replies. I expected a nice one-line answer, but clearly it is all a lot more complicated than that. I am going to print out this table. I know Visual Studio largely worries about everything for you, but as a veteran C++ programmer, I do like to know what versions of code are running (or failing to run) with each other.
Thanks for all the help.
Best wishes, Patrick
|
|
|
|
|
|
In addition to what other people said..
You can use C# 3 with .NET 2.0 with some restrictions. For example, to make extension methods work you need to add the following code:
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)]
public sealed class ExtensionAttribute : Attribute
{
public ExtensionAttribute() { }
}
}
The attribute does nothing, it's used internally by the compiler to mark extension methods.
|
|
|
|
|
I have just moved to doing real dev in VS2010, when I first started using it the interface was very slow.
I unchecked the option to automatically adjust for best visual experience which ironically helped it to perform better.
The problem that I have now is that I have also started using Expressions Studio and it is dog slow on my machine my boss who is running a similar machine is not seeing it.
He however is using a desktop which has a better video card than mine while that is logical my card is not really that bad so I wonder is there a way I can optimize the settings of my card for WPF performance or does someone know if there is a similar option to disable to enhanced user experience in Expressions.
Here a my machine specs and advice is appreciated.
Dell Vostro 1700 laptop
Core 2 duo 2.2ghz
4 Gig Ram
slow hard drive 5400rpm
One thing that might be important my res is 1920x1200 on my machine and 1280x1024 on my secondary monitor.
NVidia Geforce 8400M GS gpu I have the most current drive only update after seeing the problem.
Windows XP Pro SP3 32bit
I do not see this slowness in other applications that are not WPF.
Humble Programmer
|
|
|
|
|
Just a thought, check if you have the latest and greatest DirectX.
Updating your videocard driver might also help, although I doubt that NVidia still produce a lot of updates for XP. (update, you've done that, sorry).
Oh I and about your check box: best visual experience means slower in most cases, because then you get all the gizmo's like shadows, transparency, textures, etc, which can really slow things down. Turning them off makes it look ugly, but fast.
WPF uses GDI+ to it's painting, and that kicks down to DirectX, which hopefully is able to offload most of it's processing to the card. That's where the drivers come in. Unfortunately the 8400M GS is quite an underpowered card for today's standards (I see it rated at around 39 Gigaflops). These cards offer a good video watching performance (but I doubt that what's your boss expects of you), but are poor at gaming. Unfortunately, WPF draws upon the gaming features.
So, pretty please to your boss (or just steal his videocard while he's out of the office, chances are he won't notice the difference - I used to swap whole motherboards as a young(er) programmer I started coding in 1976, and swapping the mainframe's motherboard was not an option )
|
|
|
|
|
LOL entertaining post...
I know that the card is under powered although he is a game so he would notice real quick.
I am going to check on the DX thing though I was just hoping I could turn off some features in expressions because like I said when I toned it down in VS it made a big difference.
Humble Programmer
|
|
|
|
|
Hello,
First, a quick summary of our situation:
We are using Visual Studio 2008, with VSTO installed, and OpenXML 2.0 ;
We developped an Add-In for Office 2007 that needs to use Isolated Storage:
normal saving process does not use isolated storage, but when trying to save large xml content, it actually occurs and we get an IsolatedStorageException "unable to determine caller domain".
Now the detailed facts:
* We have developped an Add-In for Office 2007, using VSTO and OPENXML 2.0.
* During a long XMLDocument.Save operation, we get an Exception.
* Looking at the exception stack, we found out that for big operations like the one we wanted to do, IsolatedStorage was invloved: just before IsolatedStorage operations start there is a MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary() call.
I copied the Exception stack at the end of my post.
* The Exception says "unable to determine callers domain".
On this article: http://blogs.msdn.com/shawnfa/archive/2006/01/18/514407.aspx
it is said that this is because our application is not ClickOnce, and has its appdomain.CurrentDomain.ActivationContext property set to null.
* VSTO is responsible for creating an application domain for each Add-In that is loaded. I guess we cannot change that. Source:
http://www.vikasgoyal.net/office/VSTO%20Application%20AddIn%20Architecture.aspx
* Before executing the Save statement that crashes the program, I tried to load my assembly in another application domain using AppDomainSetup creating an AppDomain app and then caliing app.CreateInstanceAndUnwrap(...).
When I tried, I got the following exception : "Could not load type 'IsolatedStorage.IsolatedStorageHelper' from assembly 'SUMO 2007, Version=2.1.3758.26177, Culture=neutral, PublicKeyToken=4408dabe99529f64'."
I guess VSTO does not allow our assembly to be launched on another application domain, but I'm not sure of this.
At this point, I'm pretty stuck, so any kind of help or suggestion is welcome. I 'd be glad to give you more details on our project if that could help fixing this issue.
Thanks in advance,
Aurélien
Exception Stack:
at System.IO.IsolatedStorage.IsolatedStorage._InitStore(IsolatedStorageScope scope, Evidence domainEv, Type domainEvidenceType, Evidence assemEv, Type assemblyEvidenceType, Evidence appEv, Type appEvidenceType)
at System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
at MS.Internal.IO.Packaging.PackagingUtilities.GetDefaultIsolatedStorageFile()
at MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName)
at MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()
at MS.Internal.IO.Packaging.SparseMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Packaging.CompressEmulationStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Packaging.CompressStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Xml.XmlUtf8RawTextWriter.FlushBuffer()
at System.Xml.XmlUtf8RawTextWriter.RawText(Char* pSrcBegin, Char* pSrcEnd)
at System.Xml.XmlUtf8RawTextWriter.RawText(String s)
at System.Xml.XmlUtf8RawTextWriter.WriteStartElement(String prefix, String localName, String ns)
at System.Xml.XmlWellFormedWriter.WriteStartElement(String prefix, String localName, String ns)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlDocument.Save(XmlWriter w)
at SUMO_2007.PackageManager.EAttributePackageDataManager.TablePackageDisplayAttributes(String Docpath) in F:\SSE v2.1\SUMO 2007\erms.rule\erms.Package.rule.DataManager\EAttributePackageDataManager.vb:line 857
|
|
|
|
|