Xzarian's Q&A profile
Visual Basic Printing - skip a page
I'm using the PrintDocument's PrintPage event to do my printing. All works fine, but I can't figure out how NOT to print a page of a multi-page document. Even if I never call DrawString inside the PrintPage event for a particular page, a blank page is sent to the printer for that page. No. It's not the way PrintDocument works. It just calls PrintPage if you ask for another page with e.MorePages = true, it doesn't count pages at all... ...Show All
Visual C# How to automatically close the parent form when the child closes.
Hi, I have an application that uses 3 forms. Form1 contains 2 buttons - A and B. If you click Button A, then Form2 loads and Form1 is hidden. If you click Button B, then Form3 loads and Form1 is hidden. What I need to be able to do, is once Form2 has been completed by the user and then closes (by the user clicking the Finish button), for Form1 to close automatically, rather than unhiding the form and then the user having to click the button... I've searched quite a lot on how to do this, but can't find an answer. Either I'm searching for the wrong thing, or .... Could anyone provide any hints on how to do this Thanks. Andrej, yes, I'm using 1.1. I tried changing what you said but it now gives and error &q ...Show All
Visual Studio Team System Is running Load Test without setting any Counter Useless?
I am working with Load Test and am slightly confused. If I run a Load Test without setting any 'Counter Sets' would that be a useless test because I won’t have any set requirements to compare against If its not useless than how do I find out that the results which are generated have any value Or can I say that results are acceptable Additionally, many people use load tests to "condition" environments so that other types of testing can be done. For example, you could use a load test to create 100,000 users on a test site that has recently been built out so that when you come in the next day you've got a realistic test bed to work against. ...Show All
.NET Development Error while running an Asynchronous Server/Client
Im running a simple Server/Client application using TcpListener and TcpClient for (asynchronous) connecting and NetworkStream for asynchrous sending and recieving. When i try to terminate a client, the server and all other clients crash and give this exception: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. " at System.Net.UnsafeNclNativeMethods.OSSOCK.WSAGetOverlappedResult(SafeCloseSocket socketHandle, IntPtr overlapped, UInt32& bytesTransferred, Boolean wait, IntPtr ignored)\r\n at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)\r\n at System.Threading._IOCompletionCa ...Show All
SQL Server Quick question to check NULL values in input parameters in a stored procedure
Hi: I have a stored procedure that calls 3 stored procedures. If some of my input parameters are NULL, I would like to skip the call to another stored procedure. Can you someone please help me with this I would like to find out what is NULL, before I execute the other stored procedures. Thanks so much. MA you could use coalesce since coalesce returns the first non null value examples declare @v varchar(40) declare @v2 int declare @v3 int select @v ='1',@v2 =3 if coalesce(@v,@v2,@v2,null) is null begin select 'is null' end else begin select 'is NOT null' end go declare @v varchar(40) declare @v2 int declare @v3 int --will be null if coalesce(@v,@v2,@v2,null) is null begin select 'is null' end else begin se ...Show All
Visual Studio Express Editions Different Font Sizes in a lable
Is it possible to change the font size, colour, boldness of text with in the same lable ie. the lable will have two lines of text one smaller than the other and in a different colour. By default, no, you can't do this using the normal label control, however, you can create your own control (based on the normal label control), or you can use RichTextBox control. HTH ...Show All
Windows Forms Reading from XML and bound to DatagridView : Adding rows dynamically
Hi All, .NET 2.0, Win Forms, C#.NET, DataGridView control, XML datasource. I am using XML as a Data Source and try to bind the source into the DataGridView control in WIN forms. I have the XML source which has something like this... < EventsGroups > < Event > < EventName > Event </ EventName > < EventDescription > Event description </ EventDescription > </ Event > </ EventsGroups > The description should bound to the Description column which i defined in the datagridview control...how to do that ... moreover i want to CREATE ROWS with description reading from the XML dynamically .... It would be great ...if anyone help me in this regard.... you please share t ...Show All
SQL Server Installation Problems - need help..
Hi Everyone, I need help in installing my SQL Server Express 2005, any help would be appreciated. I already installed the SQL Server Express 2005 in my pc but i had a hard time configuring it so i decided to reinstall it just certain reasons. So i started reinstalling it, removing all SQL Server 2005 - related program in the add/remove software in the control panel. Then here is the problem now, i tried reinstalling it again but it doesnt work, everything is ok until i reach the screen after they let you choose the Instance Name. I having problem with the Existing Component Screen, it tells me that: "The following components that you chose to install are already installed on the machine. To view a report of available options and ...Show All
Visual Basic Setup Wizard in VB 2005 Standard SP1
This one is aimed at Matthew Gertz in VB Development Team. Yes, I am aware that the Christmas Holidays are near but I hope your response will be quicker than last time. First two points and then my query 1. Despite ticking the Alert Me box, I am not getting Alerts when you post responses. 2. The first time, I opened VB2005 after installing SP1, I got the error message "Run Time Error/Program C:\Pro\R6025 - pure function call" and VB closed. The second time I got an Report Error toMicrosoft - which I did. Third time the programme loaded and ran OK. Curious QUERY I have read extensively in the help file about using the Setup Wizard but the reality does not match the reporting. Page bf5cf02e-b0b7-4a99-ba9c-bcf9d383b7d ...Show All
Visual Studio Express Editions Open Fine, Cancel Crash?
Here is the code for opening a file. It works ok but if I click cancel it crashes.What have I done or not done Private Sub OpenFile() Dim stText, stNextLine As String OFD1.Title = "QuickWord - Open File" OFD1.Filter = "All Files|*.*|Word Documents|*.doc|Rich Text Format|*.rtf|Text Files|*.txt|Web Pages|*.html|(*.eml)|*.eml|(*.pdf)|*.pdf" OFD1.Title = "Open File" OFD1.FileName = "" OFD1.ShowDialog() OFD1.CheckFileExists = True OFD1.FilterIndex = 1 OFD1.RestoreDirectory = True currentFile = OFD1.FileName ' makes currentFile = the filename that the user selects sR = StrReverse(currentFile) ' reverses where the len is at so its at the end s1 = ...Show All
Visual C# Two FileWatchers watching the same folder...
I have a windows app and a windows service ...both of them uses a file system watcher and watches the same folder. When I try to move files or delete files I get Access is denied how can I slove that without stopping the file watchers Thanks in advance Ala If I am not mistaken, the fileSystemWatcher does not lock a particular drive or file by itself. Just for the record: are you sure the denial is caused by the fileSystemWatcher and not another operation or program If you are not 100% sure, you can try a tool such as WhoLockMe to figure it out: http://www.dr-hoiby.com/WhoLockMe/ Or did you perhaps enabled a 'lock' somewhere else in the code ...Show All
Visual C++ msvcr80.dll Problem
Hi there, can someone possibly tell me why Noton WinDoctor is telling me that 10 executables in the .NET Framework 2.0 cannot access the necessary dll file msvcr80.dll I see that the dll exists in the WinSxS directory and I'm running XP pro. I didn't have this problem until I downloaded the 2.0 framework at windows update. Any advice appreciated. Thanks. Naolin hello delta579! You are a genius!I have been trying for months to locate the solution to this problem.well weeks.Anyways the techs at verizon and msn were absolutely no help. finally an answer to a question!Thanks.it is nice to run windoctor and only get 1 error for a change that related to hpqgreg32.dll. my c:program files \hp\digital imag ...Show All
Visual Studio Presentation Style VS2005 --> Missing Member part in class (December CTP - GUI 1.3.3.1)
I have just installed the new Sandcastle release together with the Help file builder. However, I have the following problem: The Member section is not anymore shown if I use the VS2005. Switching to Prototype style will show the section. Does anyone know how to get back the member section with VS2005 Style Thanks, Jose Hi Jose, If you see the blog http://blogs.msdn.com/sandcastle/archive/2006/12/10/announcing-december-sandcastle-ctp.aspx in the December release we have added new transform ApplyVsDocModel.xsl to support induvidual member pages for VS2005 transforms. Also there is a known issue in VS2005 transform, there are only classes, interfaces in TOC, not their members a ...Show All
Visual C# Memory problem with String
Hi All, Currently I am working on file operations. I have to read a file of any size and then replace the '\n', '\t' and other special characters with 0 and then assign them in a textbox. In this procedure memory uses is very good. But after all the calculation my last line is textbox.text = processedstring; but after executing this line memory use is almost triple the previous. So please anyone can help Thanks in advance. Sanjay How you are measuring memory usage With Task Manager probably. If so then never belive it because it never gives you right result. Use some other generic tool for memory measurement or use Memory Profiler for .Net Applications to find the exact values of memory allocation or deallocation. ...Show All
Smart Device Development Real-time Update Chart
Hi, Is there any example for real-time update chart 2-D is OK. The XAxis should be the real time with minorunit as 12 seconds and majorunit as 1 minute. The beginnig point should be the current time when the application is started...As time goes on, the XAxis will also changes (Growing). Well, I do not know how to make the start point of the XAxis to be current time and the following points are time in the future, say five minutes at first. Then, the range will grow and the past time should be reserved....Well, I can not solve this problem~~~ Can anyone help me For starters simply try connecting these points with strait lines. At 5 samples per second average human probably won't be able to notice if graph is smooth ...Show All
