Learning VB's Q&A profile
Visual Basic FolderBrowserDialog causing debugger hang (Stop Debugger - required)?
Hello; The following code is causing my application to hang (requires me to click Stop Debugger) to get the application to quit. Dim dialog1 As New System.Windows.Forms.FolderBrowserDialog() Dim result As DialogResult = dialog1.ShowDialog() Once the above code runs the system will not exit when I close the form, it requires me to click stop debugger. I am using Visual Studio Professional 2005 with SP-1. I have noticed this does not occur when I run this same code using another workstation (one from work). What could be the cause of this OK, your app is essentially identical to mine. There definitely should be no hang on the exit -- definitely a head-scratcher. Can you file a ...Show All
Visual C++ Memory leaks created by the compiler/ run-time system
I have spent nearly two weeks trying to find some memory leaks in a program I am developing. Initially I thought it had something to do with PlaySound (see previous post, 30 Jan 2007) but that was not so. I have now discovered some hidden memory leaks in C++ which I am happy to share with others. (Please note I am using Version 6.0. It’s possible these problems have been fixed in later versions.) The following code: CSize test = pDC->GetTextExtent(“ABCDEFG”); creates a memory leak. I thought that all memory allocated within a function (when not using ‘new’) would be deallocated at the exit, but this is not so. My best guess is this. GetTextExtent has two forms and the form used above needs a CString par ...Show All
Game Technologies: DirectX, XNA, XACT, etc. C++ or C#
Hello, I am currently taking a class in C++ and I've always wanted to make games. I downloaded the c# XNA software. My question is: Can I use visual C++ instead of learning a new language (C#) to make games for the XBOX 360 and PC Or would it be better to go ahead and dive in to the new XNA software, and why is one better for gamming applications and / or learning to write games OK, thank you....so it seems I wouldnt be 'making a mistake' by learning C# and getting to it. Although I have created simple bussiness applications in C++, I've never made a game and deaalt with graphics and animation and such..is there any books or starter material youm would recomend that would step you through simpl ...Show All
Visual Studio Team System RequestFailed: Context parameter '$HIDDEN1.__LASTFOCUS' not found in test context
Hi, I am having web application developed in VS 2005 which contains more tabs contains more than one user controls, repeaters(The tab itself a repeater control).When you complete one tab information,the next tab will be visible. I am getting the following error while clicking the continue button(I have disable all the relevent javascript and manually the functionality works fine).<<I have used Webtest for recording purpose>> RequestFailed: Context parameter '$HIDDEN1.__LASTFOCUS' not found in test context The recording was successful but play back results the above error. Please help me in thios regard. Thanks, Madhusudanan You might find your answer in the followin ...Show All
Visual C# [C++ to C#] -> Convert a char* to string
Hi, I've an external library with a function that returns a struct struct in C++: typedef struct{ float pintura; float sustrato; float adherencia; char* codiErrorAdMalla; unsigned char * ImagenM; int alto; int ancho; }DatosAdMalla; I've the equivalent struct in C#: public struct DatosAdMalla{ public float pintura; public float sustrato; public float adherencia; public unsafe char* codiErrorAdMalla; public unsafe byte* ImagenM; public int alto; public int ancho; } First I tried to declare 'string codiErrorAdMalla' but then the function returns me a Pinvoke error!!! Now I want to convert 'unsafe char* codiErrorAdMalla' to 'String' but I don't know how to make it (Sorry for my english!!) ...Show All
Software Development for Windows Vista Media Center timebomb... again?
I've just tried to start live tv in my mediacenter but i get the following error: this trial version has expired and can no longer be used... changeing the date before today (31.12.06 everything works fine again). this was also a problem in the beginning 2006. Is there any solution It's still 1 month until Vista will be released and i don't want to reinstall my old Windows MCE 2005. cheers and happy new year j.lipensky http://news.com.com/2100-1016_3-6147259.html decoder expired December 31st. How rude. No fix except to upgrade. ...Show All
SQL Server Insert image using clr stored procedure
I tried to insert a row using a clr stored procedure where a field was a varbinary(max) and the data was a jpg file. The data was truncated to 8000 bytes. A similar T-SQL sp did not truncate the data even though the parameters were identical. With the clr sp I tried varbinary, variant and image for the parameter type. The variant gave an exception. The others worked but the data was truncated. I used sqlpipe.executeandsend. Someone asked elsewhere if the pipe had an 8000 byte limit but was told it had not. Any ideas Thanks, John By default Visual Studio limits sql strings to 4000 characters. You must add SqlFacet attributes to the strings you want to be different than that. For example to pass ...Show All
Visual Studio Tools for Office VSTO Outlook 2007 Questions
i have been tasked with developing a VSTO Outlook 2007 add-in application. The company wants me to start developing this right away, despite both Outlook and the VSTO still being at a Beta stage. They are doing this because they want to launch this product as soon as possible after the launch of Office 2007, in order to maximise sales. Where can I find out about further improvements planned for forthcoming releases of the VSTO and Outlook 2007 suites, in order that I may better plan this project Does anybody have any release dates - ish Also, would anybody from Microsoft be interested in liaising with me from time to time as I embark on this project, so that we can mutually benefit I could perhaps tap you for knowledge from time t ...Show All
SQL Server Dynamically change the sender email address on a SQL2005 Windows 2003 server 64-bit box using database mail
We currently use xp_smtp_sendmail to send the emails on a sql2000 32-bit box. We are trying to move our databases to a new sql2005 64-bit box. One solution is to replace xp_smtp_sendmail with database mail since xp_smtp_sendmail does not work on 64-bit box. The only problem is that we need to change the sender email dynamically based on the query results and I don't know how to accomplish this by using database mail. Does anyone have an idea We are not restricted to database-mail solution though. Thanks for help. EXECUTE msdb.dbo.sysmail_update_account_sp @account_name = 'AdventureWorks Administrator', @email_address = 'dba@Adventure-Works.com' See SQL Server 2005 Books Online topic: sysmai ...Show All
.NET Development Simple Reflection Question - Getting the class name?
This is probably easy, I just stink at reflection and can't seem to locate the resource I'm looking for... I like to use Debug.WriteLine() in order to help trace events. What is particularly helpful is to know which Class and Function posted the Debug, so I include that in the text, something like this: Debug.WriteLine("MyClass:MyFunction:Fired."); Of course, I have to keep retyping the Class and Function name each time I add this to a new location, what a pain. So I figured it would be easier to use reflection to figure out what class and function I'm in. Something like this: Debug .WriteLine( MethodInfo .GetCurrentMethod().Name + "():Fired" ); That does a nice job of giving me the Function name I'm in. Now I just need t ...Show All
Windows Forms Object Data Source and Control DataBindings Order
When I add an Object Data Source and expand the (DataBindings) in the property page, I can select a property to bind to the control. The properties from the class appear in random order. If I use a DataSet instead the properties are in alphabetic order. It would be great if both could show up on alphabetic order! The object's properties display in alphabetic order in the Data Sources pane, so someone at Microsoft clearly wrote code to do it. Please consider this a feature request. Meanwhile, how could I get the properties to display in alphabetic order I'm guessing that a TypeDescriptionProvider might do the trick. What are the options, and what would you recommend I know properties can be bound using Drag-and-Drop from the Data Sources ...Show All
SQL Server WROX Code Problem
Hi, I'm pretty new to SSRS and VB.NET and was hoping someone might be able to help me understand why the following code fails when the click event outlined below is fired. The line highlighted in Red is the problem area and when this is commented out the event executes successfully. I've also downloaded the C# version of the code from the WROX site and this also fails. The code snipet relates to the windows application "RenderingVB" in Chapter 12 of their Professional SQL Server 2005 Reporting Services book. I've tried the WROX forum but there isn't a great deal of activity. Any help would be much appreciated. Thanks Mike Private Sub btnGetParameters_Click( ByVal sender As System.Object, ByVal e As Sys ...Show All
.NET Development "Root Element is missing" error on DataTable.ReadXML(stream)
I create a simple datatable (dt), 2 columns and 1 row of data. I call dt.WriteXML(dt, XmlWriteMode .WriteSchema), I then read the xml file into a memory stream (for app reasons), with the contents of that memory stream listed below. I then create a new DataTable dt2 and try to read the contents of the memory stream into the new table, but it throws a 'Root Element is missing' error. dt2.ReadXML(memorystream); -->Root Element is missing erro r Any suggestions on why I'm getting the error would be appreciated Thanks, Rick Contents of memory stream to be read: <NewDataSet> <xs:schema id="NewDataSet" xmlns="" xmlns:xs=" http://www.w3.org/2001/XMLSchema " xmlns:msdata=" ...Show All
Windows Live Developer Forums my bot, can anybody here help me with my not {simple problem}
Hi everybody ..! well, I am trying to build my own bot (spleak, smarterchild .. etc) but I had faced a problem which is: when I was trying to start the SWHICHBOARD .. it just did not work plz .. I waiting ,..! The starting question here would be which of the licensed SDK's are you using to build your bot Based on that I'd 1st connect with that companies support forum. When you get it up and going, you should be sure to provision it out on gallery and then be sure to submit it to Robot Invaders contest. Cheers, Todd Biggs, Windows Live ...Show All
Software Development for Windows Vista Vista RC2: RasSetEntryProperties() return failed if non-admin
Hello, System setup: Vista RC2. We have some Managed C++ code that calls RasSetEntryProperties() to create a phonebook entry in order to perform a direct connection through a modem device. If I am logged in to the machine as a Windows administrator, the RasSetEntryProperties() call returns 0. However, when I log in as a non-admin (i.e., a standard User), my RasSetEntryProperties() call still returns failed, return value is '5'. Does anyone have any ideas as to what might be going on Because I want all user can use the connection, so I set the path is "CSIDL_COMMON_APPDATA\\Microsoft\\Network\\Connections\\Pbk\\All.pbk". This operation works well on XP system by all user. On Vista syst ...Show All
