SweptSquash's Q&A profile
Visual Studio 2008 (Pre-release) FlowDocument Replace Paragraph
Hi, I am trying to replace Paragraph in one FlowDocument with the paragraph in another one. We have 2 FlowDocuments. What I want to do is replace the Paragraph "X" from fd1 with Paragraph "Y" from fd2. I tried finding the paragraph "X" in fd1, which is attached to RichTextBox and then assign ref of "Y" to it, but it doesnt like it, as I can see no changes. Do let me know hw it could be achieved. Code is as belwo Paragraph paraX = ( this .rtbTask.Document as FlowDocument ).FindName( "X" ) as Paragraph ; string fn = "c:\\FlowDocument1.xaml" ; XmlReader xr = XmlReader .Create(fn); FlowDocument fd2 = XamlReader .Load(xr) as FlowDocument ; Paragraph paraY = fd.FindNa ...Show All
Visual Studio 2008 (Pre-release) Don't Forget MARS
If you are triyng to do lazy loading direclty with the objects, you'll get an error when you try to load children cust.Orders.Load You'll need to edit the connection string to turn MARS on MultipleActiveResultSets=true Note - I have only tested scenarios with direct object context access, not queries, so I am not saying you have to do this with queries (yet) But I have to bolt, so thought I'd put this here. The key thing to remember is that while you are enumerating the objects that result from a query there is a DataReader open streaming those results from the DB. If you call .Load on a collection while you still have that DataReader open, then we will need to execute another query which mean ...Show All
Visual C++ CreateProcess starting 16-bit Windows program problem
I am calling CreateProcess on a 16-bit Windows program, followed by WaitForSingleObject on the process ID with a timeout value. The 16-bit Windows program shows up in the Task Manager but never shows its initial screen until after the timeout occurs and I put up a MessageBox in my parent process asking the user if I should continue waiting for the child process to finish executing. If I double-click the 16-bit Windows program from Explorer the program puts out its initial screen immediately. Does anybody have any idea what I have to do, without putting up a MessagBox in the parent process, to get the 16-bit Windows program to execute and put out its initial screen immediately. This appears to be a common ...Show All
Visual Studio Express Editions HELP I make changes and debug but the changes aren't there.
I have made changes, some in code and some like adding a button using the design screen. I save and Debug but the button isn't there and my other changes don't reflect. If I run this code as displayed my backcolor is still red from previous setiings, my textboxes that are supposed to not be visible are still there, my new button doesn't show. I AM SO FRUSTRATED PLEASE HELP Public Class Form1 Private Sub ScreenImagesBindingNavigatorSaveItem_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ScreenImagesBindingNavigatorSaveItem.Click Me .Validate() Me .ScreenImagesBindingSource.EndEdit() Me .ScreenImagesTableAdapter.Update( Me .ScreenImagesDataSet.ScreenIm ...Show All
Windows Forms Custom Control Error
I have created a custom control, and added it to my toolbox. I have then used it on a form in the same project, and it refuses to compile. I have made no modifications to the cutom control, using only trhe default code from the add item wizard. The error i recieve is The type name <my custom type name here> does not exist in <form name.form name> When I say form name it may be the namespace as they are the same.If i click it to take me to the problem, I get directed to the aut genearted InitializeComponent method. Whats going on Any help much appreciated, Mike It's a bit difficult to diagnose without seeing more code. I tried the same thing: added a new custom control to my project. CustomCon ...Show All
Visual Studio Visual Studio SP1 - Which Build Numbers ?
How can I see if a installation does have SP1 installed already In the help it doesn't show any "SP1" remark and on the SP1 download website I don't find a reference to the build numbers. Why can't MSFT be more consistent Either write it in the "About" dialog clearly or the provide the build numbers with the download :( Hi, My VS has SP1 installed. My About info is below. Hope this helps. Good Luck, Mark Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) Microsoft .NET Framework Version 2.0.50727 Installed Edition: Enterprise Architect Microsoft Visual Basic 2005 77637-163-9000005-41315 Microsoft Visual Basic 2005 Microsoft Visual ...Show All
Visual Basic How to stop vs 2005 publishing vssver2.scc!
How does one stop vs 2005 publishing the hidden system file vssver2.scc! Is this just broken, or is there a work around to stop vs 2005 spublishing this unwanted file.. Thanks. For those that have this problem, the following may help.. a) disregard the waffle in this tthread which si oof the point.. b) The probem is caused by vs 2005 WAP. c) This is not fixed in SP1. d) The problem is not likely to be fixed because 1. The VSS team dont see it as their problem, the vs stidio team dont see it as their problem, and 3. Knowbody owns WAP problems anyway.. Hence I suggest that you run a post script after publish to manually delete all the vssver2 stuff which only the VSS team knows ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Alpha Blending (deferred)?
Is there a way using the sprite batch object that you can render several rectangles, but when alpha blended, it looks like the entire object was rendered first as a single opaque image, and then that image was alpha blended, such that you would never have known it was several smaller pieces assembling the final object Instead of normally seeing each rectangle blended as it overlays another rectangle. Do you think this is fast enough to be usable for GUIs where each frame would be its own render target This is a situation where you're talking about a new texture every new frame rendered. (at least if something on the GUI changed). Do you think they would be fast enough Or are they are fairly costly thing ...Show All
SQL Server Can't run the scheduled SQL Agent Job?
Hi, I'm tried to run the job that created from maintenance plan. It fail and give me the following message: [298] SQLServer Error: 15404, Could not obtain information about Windows NT group/user 'DOMAIN\MYNAME', error code 0x5. [SQLSTATE 42000] (ConnIsLoginSysAdmin) We are using the Windows Autheniciaton mode only and my id is set as sysadmin, setadmin, processadmin in the server roles. I don't why I can't run the job, I check the SQL agent services is login using LOCALSYSTEM. I try to the NT admin account to login the box, but still getting the same error message. Any idea Thanks! Hi, What is local login we only setup use the windows authenication mode for the sql se ...Show All
SQL Server Convert Date
Hi ! I think I need your help... to convert the date (2006-09-09) to weekday, weeknumber, month number, month, year in OLE DB source editor ... created following sql, which is not working. How about using derived Column transformation editor SELECT DATENAME (WEEKDAY, YYYYMMDD) AS weekday, DATEPART(WEEK,YYYYMMDD) AS weeknumber, MONTH(YYYYMMDD) AS month_number, DATENAME(MM,YYYYMMDD)AS Month, YEAR(YYYYMMDD) AS year, DAY(YYYYMMDD) AS date FROM Purchase thank you so much... curiousss wrote: Hi ! I think I need your help... to convert the date (2006-09-09) to weekday, weeknumber, month number, month, year in OLE DB source editor ... created following sql, which is not working. How about using derived Column transformation editor ...Show All
Visual Studio Express Editions Best way to store variable data
I am currently trying to write my first application not detailed in a tutorial or book, and I am having a problem determining the best way to store variable information. My application tracks flower arrangement and pricing. There are about 16 main arrangements, and within these arrangements there are anywhere from 6 to 25 different flowers that can be chosen in different quantities. I need to track what arrangement the customer chooses in the left split screen, and then update a number of labels and combo boxes in the right split screen. (I.E. a sunflower arrangement is chosen; the details sheet in the right pane of the application will set the display value of most combo boxes to false, and then update the first label to “Sun ...Show All
Windows Forms Form designer error - please HELP ME
Sorry for my english, I am using Visual C# 2005 Express Editon and everytime if I open the form designer, I receive this error: One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes. adna dal i data nejsou k dispozici. (in english: No more data aren’t available) Hide at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str) at Microsoft.Win32.RegistryKey.GetValueNames() at Microsoft.VisualStudio.Shell.Design.WindowPaneProviderService.AppendWindowPanes(RegistryKey parentKey, ArrayList windowPanes) at Microsoft.VisualStudio.Shell.Design.WindowPanePr ...Show All
Visual C# Safe handle closed (?)
Hello, We use Visual Studio 2005 and C# to develop an application that interfaces with biomedical device firmware. The firmware sends serial communication messages to the C# application, which then parses the message streams. We routinely get the following error message: Unhandled Exception: System.ObjectDisposedException: Safe handle has been closed at Microsoft.Win32.UnsafeNativeMethods.GetOverlappedResult(SafeFileHandle hFi le, NativeOverlapped* lpOverlapped, Int32& lpNumberOfBytesTransferred, Boolean b Wait) at System.IO.Ports.SerialStream.EventLoopRunner.WaitForCommEvent() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, C onte ...Show All
Visual Basic optimise the project -> Exe finally
What a are the steps to optimize the project so that it should be lightweighted [PE file] Thanks in advance.... well remove any duplicate code, make sure you are doing things efficiently and not creating your own way of doing things if the .NET Framework has a class that does it for you, or a combination of classes. Make sure that you are not P/Invoking as much as this can degrade performance and generally the functions are "managed" in the .NET Framework classes. Take advantage of using SQL Server stored procedures if your application is dealing with SQL Server and only open the connection when you need to as connections to databases, and executing queries etc... is expensive so be sure that you are not constantly open ...Show All
Visual Studio Tools for Office Document View Used to Be There When I Click FileName.dot
I am using VS.Net 2005 and a VSTO Word Template solution. I used to be able to click on the .dot file name in the solution pane and see the document as if word was open. This is important to me as I must add the autotext entries this way. Would anyone be able to tell me why the document view might disappear I can no longer access it. I know I'm doing the clicking correctly since I have done it a thousand times before. For some reason, no matter what I click on or do the document no longer shows up in the designer. ...Show All
