Jason Howson's Q&A profile
Visual C# source code for .NET classes
Is it possible to obtain the source code for built in classes in .NET More specifically, I would like to see the source code for the PictureBox class, preferably written in C#. Is it possible to get this piece of source code Download reflector from here: http://www.aisto.com/roeder/dotnet/ Next, download the dissasembler add-in from here: http://www.denisbauer.com/NETTools/FileDisassembler.aspx Sven ...Show All
Visual Basic rock paper scissors game help
Hello, I have a game I am designing and I am having problems getting my code. I have declared Wins and Losses in my global variables and am attempting to call those in a select case as show in my code. However it is not working properly, If you run the game you will see that the different message boxes do not show the correct information in them. I have a ttached the game for anyone who would like to help. How do I, at the end of my splash screen on my quit button, do I reset the game if they don't want to quit I can email the game to you if you would like to help... any help would be greatly appreciated... ...Show All
Windows Forms my custom component and the TOOLBOX
hi, I have a customer component that inherits from the Treeview. When I want to use it it's not in the toolbox by default. I have to use the add/remove dialog and browse to the output .dll and then pick the components i want to be available in the toolbox. this works but there are drawbacks. is there another way to make my custom components available in the toolbox by default If so, how Thanks, Andy Hi Andy What add/remove dialogue are you referring to in your initial question It looks as if your situation is better than mine because I cannot seem to use my custom control unless I re-create it in each project! I am using VB 2005 ...Show All
Smart Device Development Focus problem!
Hello. Im making a smartphone program for Windows Mobile 5.0 using C#. In this program there is a form. I open other forms on it as a dialog: using(MyForm form = new MyForm()) { form.ShowDialog(); } Here is my problem: when i have opened a dialog on the main form, and press end button(red phone), program losts its focus as it should. But when i give the focus back to my program by pressing its icon, program acts veird: When i close the dialog with this.Close(), mainform losts its focus again! So i have to press the icon again to get the program visible. Here's the situation once again: mainForm opened -> ...Show All
Visual J# Editable Label in J#
Is editable label available in J#, or is there any source code available Thanks. Hi, If you are taliking about text box (something which user can edit in the runnnig app) then yes it is supported in J#. To use it... 1. Create a J# Windows application (File > New > Project). 2. Drag and Drop a Text Box control from ToolBox to designer. 3. Manupulate the Text property of this check box as per your need. If you want to have a static label (user can't edit the contents but programatically it can be changed) then drag and Drop a Label from ToolBox. Hope it helps. Post back if you have any issues. ...Show All
Windows Forms UserControl messed up in the Designer - prevent error messages?
Hello, I have a usercontrol, put it on the form, and always when I open the form in the Forms Designer, there's a long errormessage inside the control, using the font & color which are set as properties of the form, and there pops up a window, telling me that something isn't initialized. the control works fine at runtime. so, it seems that not  ...Show All
SQL Server 0xC0010001 with Parameterized OLEDB Source
I am trying to call a stored procedure as part of my OLEDBSource. It takes two parameters. @StartDate datetime and @EndDate datetime. I define the SQLCommand in the OLE DB Source as: sps_MyFoo , I then click the parameters button and fill in: @StartDate User::ChangesSince @EndDate System::StartTime I have confirmed both of these variables have values before I hit my OLEDB Source. I get this error message however: Error: 0xC004701A at Foo, DTS.Pipeline: component "OLE DB Source" (222) failed the pre-execute phase and returned error code 0xC ...Show All
Visual Studio How to support Temporary Projects
Please teach us how to support temporary projects. Please teach us the topics about temporary projects in Visual Studio 2005 SDK. Best Regards. Shinya Watanabe Hi Douglas, I have created a new thread here - " MPF bug: Solution is not saved when "Save new projects when created" is unchecked ". Could you please have a look at Your input will be much appreciated! Thanks, ...Show All
Visual Basic Verify my functions
I made three functions that deal with bits. I want to know if they are good or if they can be improved. Thank You. Private Function extractBit(ByVal value As Byte, ByVal bit As Byte) As Boolean If bit = 7 Then bit = 128 If bit = 6 Then bit = 64 If bit = 5 Then bit = 32 If bit = 4 Then bit = 16 If bit = 3 Then bit = 8 If bit = 2 Then bit = 4 If bit = 1 Then bit = 2 If bit = 0 Then bit = 1 If (value And bit) <> 0 Then Return True Else Return False End If End Function Private Function setBit(ByVal value As Byte, ByVal bit As Byte) As Byte If bit = 7 Then bi ...Show All
Visual Studio Tools for Office YES ITS A BUG! -- Bug Caching Non-DataSet objects in ServerDocument???
Is there a bug with caching objects that are not DataSets in Office 2k3 docs Although the examples state that anything xml-serializable can be cached using the "Cached()" attribute, I have had no luck trying to cache a simple string in a Word doc. My code in ThisDocument.cs is something like: public partial class ThisDocument { string id = string .Empty; [Microsoft.VisualStudio.Tools.Applications.Runtime.Cached()] public string ID { get { return id; } set { id = value; } ...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 Thank you for sharing the solution to this msvcr80.dll problem. I had the exact same problem as everyone else and when I followed your instructions, my Norton Win Doctor found no more probems, and my machine is back to normal. You have really ...Show All
.NET Development How to send a string from one program to another?
Is there a way to send a (small) string from one program to another assuming that both programs are on the same PC I have tried using a tcp client and server connection between the two programs. This works, but I was wondering if there was a more efficient way to do this. Thanks for any ideas, MisterT Use System.Messaging namespace. One app creates a queue or both and use can send object to each queue. Just think in real world terms. The Message object under System.Messaging is a letter and the queue is the letter box. The Windows OS comes with Message Queuing which will deliver ...Show All
SQL Server "Could not find schema information ..." error in XSD annotation
When I open any annotated schema in VC# 2005 Express, I get the error: "Could not find schema information for the attribute 'urn:schemas-microsoft-com:mapping-schema:relation'." Am I missing a reference MSXML4.0 and the SQL Client are installed on my workstation. An example of one of the annotated schemas I've tried is this one, from Andrew Conrad's MSDN article "A Survey of Microsoft SQL Server 2000 XML Features": < xsd:schema xmlns:xsd = " http://www.w3.org/2001/XMLSchema " xmlns:sql = " urn:schemas-microsoft-com:mapping-schema " > < xsd:element name = " CustomerRecord ...Show All
Visual Basic postmessage or sendmessage api
Hi guys, I have been struggling for some time to get either sendmessage or postmessage working in vb.net. I am trying to send a mouse click (WM_LBUTTONUP/WM_LBUTTONDOWN) with relative coordinates to a internet explorer. I have successfully closed down the window using postmessage(hwnd, WM_CLOSE,0,0) but the mouse click does not work. There are many examples on the web but they are mostly vb 6. Does anyone have some sample code to help. Many thanks... For controlling the mouse, you would have to P/Invoke. you need to use the mouse_event API. http://www.pinvoke.net/default.aspx/user32/mouse_event.html ...Show All
Visual Studio Team System Team Build Test Config Deployment Issue
When we add a deployment folder to a test config the items will deploy without any issue locally. However, when we use the same test run config in a team build the build fails to deploy the items correctly and the build fails to run the tests. To reproduce this create a solution with a test project and a DB project. Add some files to the Create Scripts folder in the DB project. Add a unit test to the test project that passes. Under Solution Items right click on the test run config and choose properties. Add the Create Scripts folder from the DB project to the deployment items (Note: add the folder not the individual items). Run the unit test ...Show All
