Sreekk's Q&A profile
Visual C# Cannot access a disposed object?
Hi, all In my program, there are 2 forms -- Form1 and Form2 On Form1, there is a button "Start", when I click on it, Form2 will appear and start plotting, and the text on the button will be changed to "Stop"... When I click on "Stop", Form2 will stop plotting, and the text on button will be "Start" again. However, when I close "Form2" and click on "Start" again, the following error will be shown: Cannot access a disposed object(object name: "Form2") So I can not open a form again if I closed it... Is there any way to solve this I hope I can start "Form2" again by clicking "Start"... Now, I just know to disable the "Cont ...Show All
Visual C++ In the memory how work ??
There are two '\n' characters in buffer(stdin) when we have successful input or not. Following codes show that two of '\n' are exsisting. #include<stdio.h> void main() { int a; scnaf("%d",&a); printf("%d %d %d",stdin->_ptr[0],stdin->_ptr[1],stdin->_ptr[2]); } When we input the data to program, we press the enter button once. But two of '\n' are in the stdin buffer. Someone who konws the reason demonstrates me.. please.. I just stepped through the code for scanf to see what actually happened. What's being read when you enter a number and press enter is a combination of carriage return and line feed. The method _read_n ...Show All
Visual Studio 2008 (Pre-release) MasterPages in WPF
The question I have has already been asked ( http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=140559&SiteID=1 ) but the answer wasn't explanatory enough to me. So, does the WPF have a concept of MasterPages similar to one in .NET 2.0 Here is what I am trying to do: - XAML browser application - left column with a navigation menu - top banner/header with a logo and another menu - and of course the content ----------------------------------- | HEADER | ----------------------------------- | | | | M | | | E | CONTENT | | N | | | U | | | | | ----------------------------------- I can see two ways how to achieve that (not sure whether they are the right wa ...Show All
Visual Studio Export to PDF in Report with expand collapse buttons
I have Report with expand collapse buttons within Group in table. When i am collapsing the group in reportviewer and exporting the document to PDF my exported report is coming up in collpased format. Is it possible to export the report to PDF in Expanded form irrespective of expand/collapse in Reportviewer control. Thanks Vaneet Kumar The built in export menu will use the current report session, which always has the current expand/collapse state. But you could get the functionality you are looking for by exporting to PDF on your own. You could create a second, non-visible instance of the report viewer and initialize it with the same report. Then call Render on the hidden one to perform the export, using ReportViewer.ServerRepor ...Show All
.NET Development HELP: Need to write on a network share - but get UnauthorizedAccessException
Since I now was googleing for hours without any success I hope I will find an answer in here... This is the (simpilfied) scenario: I wrote an application (C#, .NET 2.0) which needs to create and write write some file (more precisely it needs to save an XML document). The application is hostet on a network share and will be excecuted from there. It writes to local drives as well as to network shares. The problem to get the application running from the network share I solved: I signed all assemblys and gave them FullTrust via CAS and an accordingly codegroup. So this works fine. But the problem I now got is that the application is allowed to create files and write on my local file system without any problems - but when it tries to c ...Show All
Visual Studio 2008 (Pre-release) Exception thrown when launching app deployed using ClickOnce
My application runs fine in debug and when I use the EXE in the bin directory. When I publish the app using ClickOnce the application throws an exception. Any Ideas System.Windows.Markup.XamlParseException was unhandled Message="Cannot create instance of 'DynamicWindow1' defined in assembly 'X5Client, Version=1.0.2565.18595, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'X5Client;component/DynamicWindow1.xaml'." Source="PresentationFramework" LineNumber=0 LinePosition=0 StackTrace: at System.Windows.Markup.XamlParseException.ThrowException(String message, Exception innerException, Int32 lineNumber, Int32 linePosition, Uri baseUri, XamlObj ...Show All
SQL Server More Reads then expected
So I’m at a dead-end looking for the reason behind the following behavior. Just to make sure no one misses it, the 'behavior' is the difference in the number of reads between using sp_executesql and not. The following statements are executed against a SQL 2000 database that contains >1,000,000 records in the act_item table. They are run using Query Analyzer and the Duration and Reads come from SQL Profiler SQL 1: exec sp_executesql N'update act_item set Priority = @Priority where activity_code = @activity_code', N'@activity_code nvarchar(40),@Priority int', @activity_code = N'46DF335F-68F7-493F-B55E-5F9BC6CEBC69', @Priority = 0 Reads: ~22000 Duraction: 250-350 ms SQL 2: DECLARE @Priority int ...Show All
Internet Explorer Development IE7 Crashes when running a jsp/java application
I am working on a java/jsp webapplication which was running on IE6 with out any problem.When I am using IE7, IE is crashing. The Error Details are: AppName: iexplore.exe AppVer: 7.0.5730.11 ModeName: unknown ModeVersion: 0.0.0.0 Offset: b87ee800 Exception Information Code: 0xc0000005 Flags: 0x00000000 Record: 0x0000000000000000 Address: 0xffffffffb87ee800..................................... Can any one help me .Thanks in advance Hi, I would like to help you but I will need some more information. Will it be possible to give me a link to the application that is crashing IE If not, could you possibly attach a debugger to the process before it crashes A stack dump would be helpful. Rega ...Show All
Commerce Server Can't search catalog in CS2000 bizdesk
Hi, On one particular computer we have, upon clicking the "Find Now" button on the catalog editor page nothing happens! Everything else seems to be working except for this. Is there any reason why this is happening and any ideas on how to fix it I reformatted this particular machine and it worked at first but now the Find Now button has stopped working again :( Thanks. The latest security patches might be the root cause. Please see: http://support.microsoft.com/kb/926509 Thanks, Nihit ...Show All
.NET Development How to use folder path to find pathnames of certain files
Hello, For a windows application I have created I have used the FolderBrowserDialog to retreive the pathname of a desired folder. Now that I have that pathname I wish to look in this folder for all files with a certain extensions (.html and .htm to be specific), after I find each file I would like to store the file's path name in an array of strings. Also I wish not to look into subfolders, but just at the root of the folder. Is this possible I have looked all over the web and just cannot find anything that will help. I have looked at filestreams and have not gotten anywhere either. Can someone please help me with this matter Thanks, Tareq Ismail interesting, i cant understand why. ...Show All
Visual C# returning Enum from indexer
Hi, I'm not sure this is possible (I hope so though) but, keeping it short and sweet, my problem is that I have an Enum with corresponding int values: public enum FieldName { NotSet = 0, ClaimantFirstName = 1, ClaimantSurname = 2, etc.... In my code I want to be able assign to a property (defined as a FieldName property) the corresponding Enum from an integer I have got from elsewhere that will definatly match the integers of my Enum. I was hoping that something similar to below would be possible. The array is already built up from elsewhere and the 2nd dimension has a list of integers (stored as strings). But so far I can't get my app to compile nor can I find something similar on the web. Anyon ...Show All
Visual Studio 2008 (Pre-release) PNRP is not available
Hi I am trying to start a P2P application using WCF, and get the following exception when trying to open the service host: "System.InvalidOperationException : Resolver must be specified. The default resolver (PNRP) is not available." Any idea Elad. Hi, Not sure if you have tried this already, but does a ping from the Vista machines to any of hte XP machines work It might help troubleshoot better if you provide the ipconfig /all for all Vista/XP machines... -Shalini. ...Show All
Visual Studio 2008 (Pre-release) Managing Navigation Exceptions
Hello, In my wpf app I have a frame [MyFrame]. I dynamically change the content of the frame by navigating to different pages [MyFrame.Navigate(somePageURI);]. I want to make sure that I can handle situations where navigation fails. For example, the uri points into noWhere, or the user doesn't have permissions to read the content pointed to by somePageURI. If I'm not mistake the Navigate method is asynchronous. So I can't do the following: try {MyFrame.Navigate(somePageURI)} Catch(IOException ioe) {HandleNavigationException(ioe);} I tried to register a handler with my frame to handle navigation events, but I don't seem to find an event one for navigation error. Thanks in advance. Houman ...Show All
Software Development for Windows Vista Creating a sharepoint workflow
Hi, i'm trying to create a sharepoint workflow, i have the steps to create it, but, in the project types i dont have a sharepoint option, i only have the basics options of workflow, i installed Extensions of Visual Studio 2005, Share Point 2007, Share Point Services v3, Office 12 and I dont know if i need something more to create a share point workflow. Can you help me please! You need to download this toolkit - http://www.microsoft.com/downloads/details.aspx FamilyID=38CA6B32-44BE-4489-8526-F09C57CD13A5&displaylang=en ...Show All
Visual C# Windows Service .NET 2.0 MissingManifestResourceException
I have a simple windows service that was created in vs2005, it uses the FileSystemWatcher class to watch for directory changes, and if an error occurs it logs it to the event log. I have used the new Resources designer to define a few common errors I would like to write to the event log. Other than my machine, all clients that are testing are getting the MissingManifestResourceExcepti on that is being written to the eventlog, System.Resources.MissingManife stResourceException: Could not find...Make sure"SOXFileSysProperties.Resources .resources" was correctly embedded or linked into assembly "SOXFileSysWatcher" at compile time, or that all the satellite assemblies required are loadable and fully signed. etc..... I have ...Show All
