ThePatrickP's Q&A profile
Visual Studio Express Editions Real Time Math Calculations
How's it going everyone I am working on a piece of software that will allow a user to do some complex math very easily. To make a long story short, I need the software to make the calculations in real time instead of displaying the results after a button is clicked. Does anyone know where I can find a tutorial on how to do this Thanks, Brian This will let them use negative numbers: Public Class Form1 Private Sub TextBox1and2_KeyPress( ByVal sender As Object , _ ByVal e As System.Windows.Forms.KeyPressEventArgs) _ Handles TextBox1.KeyPress, TextBox2.KeyPress Dim tb As TextBox = CType (sender, TextBox) If Char .ToString(e.KeyChar) = "-" AndAl ...Show All
Architecture Code Generation - MyGeneration, CodeSmith, GAT/GAX or DSL?
I am looking to generate code based on a database structure. I want to start with a base template and add things I need to it. My goal is to auto generate the boring repetative code so I can focus on the most important areas. I have been looking at CodeSmith and MyGeneration which both have starting point templates that use Enterprise Library but I wanted to see what Microsofts approach was. Is it Guidance Automation or DSL If so does anybody have an example of how to generate DAL classes and entity classes from a database using these tools did not read your complete respons [will do] but I want to mention that there is a start for a web client factory: look at codeplex: http://www.codeplex.com/Wiki/Vie ...Show All
Visual C++ Is there any good tool which can easily get the call graph of one project of vc? Please give the steps to do that.
Is there any good tool which can easily get the call graph of one project of vc Please give the steps to do that. I appreciate your help. There are no ones that I am aware of. You suggested some that might help. Also, try posting on http://msdn.microsoft.com/newsgroups in case others know of such tools. Thanks, Ayman Shoukry VC++ Team ...Show All
Visual Studio Visual Studio IDE Navigator on Vista
Hi all, According to MS plan, VS will provide a new IDE Navigator with thumbnail feature, which is that we will have a thunmbnail and some custom definitions on the bottom panel when we press Ctrl+TAB to call out IDE navigator. We have our embedded designer, which associates with a certain file type. I have been told that if we responded to WM_PRINT message properly we can get this feature for free. Could anyone please give me more detailed information Thanks. That is correct, if you handle WM_PRINT you will get this for free in an upcomming version however that version is not associated with any Vista release. When it is made available it will also work on WinXP. Most managed controls already ha ...Show All
Software Development for Windows Vista What does cfetched=0 mean?
Hi, while (pEnum->Next(1, &pPin, 0 ) == S_OK) what does the 0 for the cfetched argument mean What is the difference if write it like the below ULONG cfetched; while (pEnum->Next(1, &pPin, &cfetched ) == S_OK) pcFetched is useful only when you are getting more than one object at the same time (cPins>1). In this case it returns the actual number of Pins obtained : pcFetched [out] Pointer to a variable that receives the number of pins retrieved. Can be NULL if cPins is 1 . ...Show All
.NET Development First chancen excetion of type System.Runtime.InterOpServices.COMException and HRESULT 0x8100031E
Hi, I am getting this exception from my application which says "A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in idetity.dll." Additional information : The RPC server is unavailable. The error code 0x8100031E. May i know how serious is this error and how to go about it Thanks. samantha Hi, I figured out that if i connected to the internet(which i was not doing before) and signed with my MSN id, then i do not get such an exception thrown. I am unable to find any documentation on identity.dll may be because i am not looking at the right place. As far as i can understand, it was looking for an internet connection and needed me to be logged in with an ID. ...Show All
Software Development for Windows Vista How to hit test non-client buttons in Vista?
The following code was added to a Win32 application's WndProc to hit test the minimize, maximize, and close buttons. The buttons are detected if Desktop Composition is disabled, but not when it is enabled. Other non-client regions are detected when Desktop Composition is enabled. Does anyone know of a work-around for this issue case WM_NCHITTEST: LRESULT lResult; lResult = DefWindowProc(hWnd, message, wParam, lParam); if (lResult==HTCLOSE) OutputDebugString(L"HTCLOSE\n"); //detected if Desktop composition is disabled else if (lResult==HTMINBUTTON) OutputDebugString(L"HTMINBUTTON\n"); //detected if Desktop composition is disabled else if (lResult==HTMAXBUTTON) OutputDebugStr ...Show All
Visual C# Make end of statement ";" optional?
I think microsoft should make the end of line statement, (i.e. the ";") optional. If you program VB.net like I do and is inevitably forced to write/read C# code, having to write the ; after each statement is annoying. I know C/C++/java etc all have it but in an enviroment like Visual studio where the IDE makes life so much easier the end of line statement is unnecessary. Who agrees with me The reason that VB was popular was because it was an easy to learn programming language. Because it was so easy to learn a lot of hobbyists that didn't have proper training could "develop" software often using bad practices like Cowboy Programming and using bad practices without realising that. A lot of this userbase has shifted ...Show All
Visual Studio Express Editions .NET is driving me nuts, what's going on?!
Hello there... Here is my situation. I wrote a prgramm for communication with a measuring instrument via rs 232. I wrote the programm in MS VB 2005. On the PC, running Windows XP SP2 was .Net 1.1 and .Net 2.0 installed. By using VB 2005 the code of my app. was obivously written in .Net 2.0, wasn't it After a new installation of Win XP SP2 on the same(!) PC i installed VB2005 with .Net 2.0. What happend My app is not working any more In VB 2005 I got the error message: System.InvalidCastException in MS.VisualBasic.Dll. Typconversation seems to be the problem. My released EXE file, which was released under the "old", well running system, does not work on the new one eather! Where is the problem ! I am lucky having a backup with No ...Show All
Visual C++ Copying file trees in a custom build
I have a large number of files which I want to include as part of my build process but which only need to be copied to the output directory in the same relative folder that they're in for the project (ie, if the file is in Documentation/Images/Header.jpg relative to the project then I want to copy it to $(OutputDir)/Documentation/Images/Header.jpg). I can create the custom build steps for these files and manually set their output directories but it's tedious. Instead what I want to do is create a custom build tool which will copy the files from their current project-relative location to the output directory in the same relative location. The problem is I can't seem to come up with a project-relative directory using any of the built-in macr ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Quaternion Tutorial
Could someone school me in using Quaternions in XNA I'd love to have a tutorial specfically for XNA. I read a tutorial that helped me to understand them a bit better, but still not sure how to plug it into the game. If you can believe it, the documentation doesn't explain it to well. Well, I don't know about a tutorial... and I'm certainly no expert on quaternions... but, the following is something I did to make the example from the XNA Game Studio's Express's help file more interesting. First, you'll need to complete "Tutorial 1: Displaying a 3D Model on the Screen" (this is part of "Going Beyond: XNA Game Studio Express in 3D" of the Getting Started section). Once you've completed that tutori ...Show All
Visual Studio Express Editions TableLayoutPanel Flicker
I am using a Tablelayoutpanel, that contains around 200 lables. That are feed with data every 3 seconds. When this is done the tablelayoutpanel flickers. How can I stop this Hi, I'm just wondering... in this case, wouldn't it be better to use the DataGridView (or similar control), bound to the data source and just keep updating the data source What kind of data are you displaying Andrej ...Show All
.NET Development Return XML Document using a DataSet?
I have a question about returning an XmlDocument using a Dataset. I seem to be having problems converting it. For eg: public XmlDocument displayXml() { // coding for the DB connection DataSet ds = new DataSet(); ds = generateDataSet(); // another function that returns a dataset; //returns ds after my required process XmlDocument xd = new XmlDocument(); return xd.LoadXml(ds.GetXml()); } This code returns an error: Cannot implicitly convert type 'void' to System.Xml.XmlDocument Please let me know as to where I am going wrong and also if there is a better way to do it You might like to modify last line of your code and return xd instead. XmlDocum ...Show All
SQL Server data are not allocated in the properly NDF. Why?
Hi everyone, The followings actions works fine. But only the first NDF (PRIMERO) is growing up. I don't get the point at all, I though that SEGUNDO would store February, TERCERO March and CUARTO April to December (according RANGE LEFT) I feel that there is something very important that I did not in all of this... I'm stuck. --Definition table CREATE TABLE [dbo] . [DatosMensuales] ( [Id] [int] NOT NULL, [Concepto] [varchar] ( 50 ) COLLATE Modern_Spanish_CI_AS NULL, [FechaAlta] [datetime] NULL ) ON rangoMesFE ( FechaAlta ) CREATE PARTITION FUNCTION rangoMesFP ( datetime ) AS RANGE LEFT FOR VALUES ( '200601' , '200602' , '200603' ); CRE ...Show All
Windows Forms How to get \n into a listview
I am trying to get a listview to display strings that look like this: This\nis a string that\nchanges lines. I need to have the \n show up as a string in the listview and not a funky char. Thanks Hi Ted The problem is that the list view's paint / item draw routines don't know how to lay out multiple lines of text. The way around these kinds of deficiencies is to override the control's drawing to make it do what you want. The ListView is not a GDI+ based control, so there's no Paint or ItemDraw to over-ride; you have to catch the WM_PAINT message in a WndProc override (If you inherit from ListView you'll get a Paint event but it will never get called). I Googled for "owner drawn li ...Show All
