Joe H's Q&A profile
Visual Basic DateTimepicker runaway problem.
Hi, If you have this in the FORM code Private Sub DateTimePicker1_TextChanged( ByVal sender As Object , ByVal e As System.EventArgs) Handles DateTimePicker1.TextChanged MsgBox( "Date changed!!" ) End Sub Then RUN it, when you click an arrow to change the MONTH you get one MsgBox after another, after another..... Is this a bug Regards, S_DS Looks like a bug to me. Although, if you set a break point on the TextChange event you can see what is happening a little better. Looks to me like when the messagebox appears it causes focus to be off the date selection, but after it appears focus is returned to the DT picker causing it to increment another date. ...Show All
.NET Development Make mutiple threads, for loop?
With an inputbox on a form the user is able set the number of threads to use. for 1 thread I've got this: Dim et1 As System.Threading.Thread = New Thread(AddressOf ThreadFunc) Dim t1 As Thread = New Thread(New ThreadStart(AddressOf ThreadFunc)) t1.Start() t1.Join() But if a user wants 20 threads how should i do this for loop I hope this is for academic purposes because you would never want to do this in a real application. If you were to start 20 threads you would spend more time doing context switches then performing any real work. In this type of situation you would create several threads (based on the # of processors) and then queue work requests (20 in this case) to the threads. Nevertheless ...Show All
Windows Forms Deployment of Projects using Managed DirectX
I have been researching this question on the net a few days and have not had much luck. I have a project that uses DirectSound to play WAV files and I want to include the DirectX redistributable files in my install. Some of my users apparently do not have DirectX installed and are having issues running my application. (These users are using Windows 2000 without the latest service packs in an environment where they do not have an internet connection.) I found a Managed DirectX 9.0c bootstrapper package that was made in 2005, but it no longer works with the latest August 2006 DirectX redistributable files. The bootstrapper package interfaces with the Visual Studio 2005 bootstrapper, and enables the author to check a box for Managed Dir ...Show All
Visual Basic Advanced data bindings and DBNull
My project reads dates back from SQL Server and displayes then using a Details view. In some instances, two of the dates displayed are meaningless data, they only apply if another value is set. Under DataBindings - Advanced, I notice you can set a NullValue to display in the event of a DBNull being returned. Well, the fields are Null (at least according to the Show Data function in Database Explorer) but regardless of what I put in the box, today's date is always displayed when I run the application. Rich Didn't make myself too clear there, it is both a "calculated value" and also one which can be reset by the user. Anyway, I made the date/time picker invisible and dropped a form ...Show All
Visual Studio Team System SQLCMD :connect not allowed?
In a post-deploy script, I want to connect to another server using :connect $(TargetServer) which works in the sql management console SQL editor window. But during build, I get the following error: Error TSD164: Syntax checking failed : Incorrect syntax near :. Also: if I use a variable which is declared in the DBPROJ file, BUILD crashes: C:\Programme\MSBuild\Microsoft\VisualStudio\v8.0\TeamData\Microsoft.VisualStudio.TeamSystem.Data.Tasks.targets(49,5): Error MSB4018: The "SqlBuildTask" task failed unexpectedly. ManagedBatchParser.ParserException at ManagedBatchParser.Parser.Parse() at Microsoft.VisualStudio.TeamSystem.Data.Common.ExecutionEngine.BuildFileBatchParser.GetStatementsFromFile(String ...Show All
Visual C# learning to live w/o pointers (C++ programmer here)
Good evening- What I'm trying to do is take a variable, place a reference to it in a container, have some math operations act on the whole container (which might have any number of references to variables) and then be able to access the original data in the original variable. Hope that wasn't too confusing. In C++ this was performed by using references and pointers - I'd pass the variable to a function by reference, make a pointer, place the pointer into a container, do my operations, and at any time I could query the original variable and get the updated results since the pointer pointed back to it. How is this accomplished in C# I banged my head up against the wall for a few hours this evening trying a few things but I don't quite see ho ...Show All
Game Technologies: DirectX, XNA, XACT, etc. can i use visual studio .net professional?
Can i use visual studio .net 2005 professional with xna or do i have to use xna game studio express. and if its possible to use vs professional would it still be better to use the game studio sorry if this question has been asked, i did a search and nothing came up. thanks for any help Just to clarify, in order to build anything for the 360, we'll need to either: 1. downgrade to C# Express or 2. try and get Express and Visual Studio Professional to install side by side Is that what it boils down to ...Show All
SQL Server Error: Subreport could not be shown.
I work for a Microsoft Gold Partner and I am having a problem with subreports in SSRS 2005 SP1. Essentially, I have a report that contains subreports. The main report has a table that passes a parameter to a subreport in each row. The report renders properly when I preview it in Visual Studio, but once deployed to the server it only renders the first subreport for the first row, and every subreport thereafter displays the error, "Error: Subreport could not be shown." I tested each subreport individually on the SSRS sever and each executes and displays fine. I turned on traces in the web.config file and found some additional information: I do not see any "sql server" or "reporting services" connecti ...Show All
Visual Studio Express Editions Deserialization
This is very aggrevating!!! I have serialized three simple questions (textboxes) that is entered by the user. I cannot figure out how deserialize and have the three textboxes show what I have serialized My code (Visual Basic Express) on my main form is as follows: Imports System.Xml Imports System.Xml.Serialization Imports System.IO Public Class Form1 Private theCollectionOfPatients As New ArrayList() Private Sub DoSerializePatient( ByVal patientcollection As ArrayList) Dim theTypes(1) As Type theTypes(0) = GetType (ArrayList) theTypes(1) = GetType (Patient) Dim theSerializer As New XmlSerializer( GetType (ArrayList), theTypes) Dim theWriter As New FileStream ...Show All
Windows Forms NotifyIcon in System Tray die all of sudden
Hi all, I am developing a windows application for monitoring purposes. I created a new windows app project in VS C#, added new windows form, datagrid, timer object and notify icon with its context menu. The timer ticks at every 30 seconds. For every tick, the application opens a connection to database, and grabs some records. Well the application is up and running now. But after 30 minutes or so, the Notify Icon in system tray becomes non-responsive, i can't click on it. I checked the windows task manager and found that the process is still there. Can someone please help me to identify the problem Performance would be totally based on the library you are using. If you use, say SQL Server (Microsoft SQL ...Show All
SQL Server What should the maintenance plans be on your mirror server?
If your principal fails and your mirror assumes the main role and it is in Full recovery mode (which it has to be in Standard edition), then the log files will grow and grow until a transaction backup and shrink is executed. I have maintenance plans running daily (and hourly for transaction log backup/shrink) on my principal, but nothing on my mirror. Do I need to set up the same maintenance plans on my mirror server Thanks Ed Mark Wistrom wrote: "Principal" and "Mirror" are rolls. Wholegrain, I hope. Thanks Chad and Mark for clearing this up for me. Ed ...Show All
Visual C++ Strange Error - Please Help
Hi all, I wrote a dll (using a definition file). When I call one of the function within the dll from another application (to test the function), I receive a strange error (Messagebox format): Application.exe - Ordinal Not Found - The ordinal 34 could not be located in the dynamic link library. Note I have linked with the .lib file, have included the header file and copied the .dll file to the application directory. (Note that I'm exporting 34 functions) Can anyone help Thanx Sarath, thanx for the reply. Yes, according to me I have exported the functions correctly. The thing is all the functions work, except the last three. The names of the last three functions for example is: function_1 function_2 function_3 In def fil ...Show All
SQL Server Deployed Application isn't connecting to SQL Server
When deploying my application that uses sql server it doesn't connect to the server. I checked the connection string & it's ok the server instance is the same. The computer name isn't the same & i use the .\SQLExpress as the data source. I get an error saying 'sqlserver does not allow remote connections error 26 locating server / instance specified'. This link can help you. http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx ...Show All
Software Development for Windows Vista WMI: Querying event logs in Vista from XP
I'm having trouble querying the event logs on a Vista PC (build 5728, Ultimate) in a workgroup from an XP machine. Specifically, I'm trying to enumerate instances of Win32_NTEventlogFile. To bypass any coding issues, I'm using WBEMTEST on the XP machine. I've tweaked firewall, dcom and wmi permissions on the Vista PC to the point where I can successfully connect to the PC using the name and password of an admin account on the PC. BUT... when I hit Enum Instances and ask for Win32_NTEventlogFile, I get only one item, for Internet Explorer. I don't even see the Application event log. Of course if try WBEMTEST locally on the Vista PC, I see all 8 event logs. So the question is, what other security settings ...Show All
Visual Studio 2008 (Pre-release) using LIKE in DLinq
Hi there, How to use DLinq to achieve functionality like "SELECT * FROM Users WHERE uname LIKE '%john%' ", meaning how do I use wildcards in DLinq Thanks! Gives me: 'System.Expressions.Expression' does not contain a definition for 'CallVirtual' ...Show All
