Tryin2Bgood's Q&A profile
Visual Basic "By Design" IDE Bug
I'm sure this has been asked (compained) about before, but I can't locate a post about it, so here goes... The IDE deletes my code without asking. I do not want it to do that. Precisely, if I want to delete any code, I will highlight it and hit the delete button. Go figure. The problem occurs when controls are cut and pasted (for example, to move from the form surface to a panel or tab). The IDE quite rudely deletes the event handlers. I understand this is 'by design', but it is infuriating to say the least... Is there a hotfix for this A hack Anything The VS2005 designer for VB.NET forms doesn't appear to do that. It leaves the event handler code but just removes the Handles keyword. Which create ...Show All
Software Development for Windows Vista Custom Persistence and CompletedScope table
I have just successfully completed a custom persistence service for MySQL. I have been digging into some of the other tables associated with the SQL persistence schema and stored procs. I came across the table CompletedScope. I did find a thread on it saying it is used to hold completed activites derived from ICompensatableActivity. My question is how do I add custom support for this table into my custom persistence I see no examples or discussion on this. Thanks Bill Bill, Have you ever seen when is the LoadCompletedContextActivity or the SaveCompletedContextActivity are called I'm testing the Oracle persistence service but I can't design a workflow to test those methods. I already used ...Show All
Visual Studio 2008 (Pre-release) Access to a Bitmap's Pixels
I need a fast/efficient way to change the contents of a bitmap by having direct access to a bitmap's pixel buffer. How can I do this in WPF It seems I have to recreate a new Bitmap each time and updating an Image's source this way takes up 20% cpu at 30FPS 320x240x24bbp. Is there a better option available to me dec = new BmpBitmapDecoder (strm, BitmapCreateOptions .IgnoreImageCache, BitmapCacheOption .None); this .image1.Source = dec.Frames[0]; Thanks, -Jer ...Show All
.NET Development Error "ExecuteScalar requires an open and available connection..."
H all, I have an application that retrieves data from a local SQL2005 (Standard edition) database frequently (e.g. more than 10 times/second normally). It usually works fine. However, if the program was paused for a while (e.g. for a few hours) by a pop-up error message box or an Sleep() statement, it generates the following error message when its data processing resumes: " ExecuteScalar requires an open and available connection. The connection's current state is closed ." The application is coded with C# using ADO.Net. The connection is OleDbConnection. It seems there is some timeout process that I do not know. Could anyone offer any hint Thanks, hz Thanks a lot for the detailed explanation, Sarah! T ...Show All
.NET Development Get the Disk drive information in vb.net
I want to know the free space, used space in the particular drive of my hard disk by vb.net program. so can anyone help me in this issue sure. in .NET 2.0 there is a DriveInfo class in the System.IO namespace For Each curDrive as DriveInfo in My.Computer.FileSystem.Drives If curDrive.DriveType = DriveType.Fixed Then dim theFreeSpace as long = curDrive.AvailableFreeSpace MessageBox.Show(theFreeSpace.ToString()) End if Next You can of course get the name of the drive using the name property to check to see if it is the drive you are after does this help ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How to use DirectX 10 to get graphices memory ?
Dear All , I had read the Microsoft white paper for "Graphices Memory Reporting through WDDM" It talk how to retrieveal of graphics memory values . I had use VC++ 2005 wit DirectX 10 SDK to build program , but I wan't to use function "CreateDXGIFactory( )" to get the struct data "DXGI_ADAPTER_DESC" , but compiler alway error , error message "DX10Dlg.obj : error LNK2001: unresolved external symbol _CreateDXGIFactory@8" , can any one help thank you ! Hi, I've downloaded the dxsdk_feb2007.exe and installed it on an XP system , but the d3d9.h does not have the definition for LPDIRECT3DCREATE9EX. Is it a must that, we need to install this sdk on vista ...Show All
Visual C# Return a pair of List
Is it possible to return a pair of list objects from a method Thanks Regards Alu Say you want to return a list of strings and a list of ints, you can do this List<string> Method(out List<int> theInts) { } Now you need to assign a value to theInts in your code, and you need to return a list of strings as well. So, both are returned, although one comes in as well. ...Show All
Windows Forms Major problem - Help
I am not 100% sure this is where to post my problem but I suddenly got aprox. 1,000 errors to pop up. I am using Visual Studio 2005 (Visual Basic code) and SQL Server Express. I made a change in my program (a simple loop to populate a combo box with data from the server - have done it many times) and then left it alone. For about the next 5 minutes I was working on paper creating new queries for the program when suddenly Visual Studio poped up with an error message talking about the compiler and that VS 2005 needed to close. "No information will be lost". Once I said "Don't Send" to 27 popup messages I was finally able to save and close as it instructed me to do. When I reopened the program is when I noticed all of my errors. The errors ar ...Show All
Windows Forms Locked up .
Ok , why is it when i try to publish small sample learning programs that I make when doing them from the book , VBexpress hangs and locks up. the programs themselves work fine during testing , But VBXp - wont let me publish them . gives me an error of some sort . anyone else having this problem . As Soon as I Click on this thats when it Locks up.. anyone know how to Fix it . ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Beginning Game Development: Part III - DirectX II - Problem with the "Using..."
Just started the Direct X Part II (Part III) tutorial, and I seem to have an odd problem. I get one error whenever I try to build the solution, Error 1 The type or namespace name 'Device' could not be found (are you missing a using directive or an assembly reference ) C:\Documents and Settings\Doug Ross\My Documents\Visual Studio 2005\Projects\BattleTank2005\BattleTank2005\GameEngine.cs 68 17 BattleTank2005 Now, I put at the very top of the GameEngine.cs class, right below all the other "using" directives... using Microsoft.Samples.DirectX.UtilityToolkit; So now the "Using" section at the top of the GameEngine.cs looks like... using System; using System.Collections.Generic; us ...Show All
.NET Development Problem with setting ico in property box
When using standard PropertyGrid with an object with a Image type property, I try to browse for a file, and when choosing this one .ico file, I get exception: "Parameter is not valid" .Ico file properties: 16x16, 16777216 colors Output: A first chance exception of type 'System.ArgumentException' occurred in System.Drawing.dll Additional information: Parameter is not valid. Stack Trace: System.Drawing.dll!System.Drawing.Image.FromStream(System.IO.Stream stream, bool useEmbeddedColorManagement, bool validateImageData) + 0x1a6 bytes System.Drawing.dll!System.Drawing.Image.FromStream(System.IO.Stream stream) + 0x9 bytes System.Drawing.Design.dll!System.Drawing.Design.ImageEditor.LoadFromStream(System.IO.Stream stream) + 0x7 ...Show All
.NET Development Problems with deserialization of SOAP Response (Complex Type from Apache / PHP Webservice)
Hi, I want to consume an Apache Webservice with a C# .NET Client. Everything works fine, but I’m having problem with the deserialization of the complex type “Item” that is included in the response of the web service, what seems so be the type “hashtable” in .NET. Every “Item” consists of two fields “key” and “value”. I read a lot about SOAP/Apache/.NET/Complex Types/etc. and somewhere I read that there is no automatic deserialization possible of such a type. Does anyone know a HowTo-Example or Codesnippet Or can somebody explain how to consume Complex Types from Apache I didn’t find any helpful postings or Code Examples… I’m looking forward to your replies! Best regards, Gregor Looks l ...Show All
Visual Studio 2008 (Pre-release) LoadComponent - Beta2 --> June CTP
In WinFx Beta 2 I was able to do the following. In a seperate assembly called MyPluginAssembly (that was not referenced by my application) I had a xaml file called MyResources.xaml that looked like this: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:im="clr-namespace:MyNameSpace" > <ControlTemplate x:Key="MyKey"> <im:MyCustomControl Width="100"/> </ControlTemplate> </ResourceDictionary> MyNameSpace exists within MyPluginAssembly and has a custom control called MyCustomControl. In my application I did this: Application.LoadComponent(new Uri(string.Form ...Show All
SQL Server issues about foreach loop
I defined Foreach File Enumerator,there are more than 2 files needed to deal with,it donesn't work if i don't specify filename in flat file connection manager editor,however if i specify filename then doesn't foreach files what should i do thanks andrew knight wrote: I defined Foreach File Enumerator,there are more than 2 files needed to deal with,it donesn't work if i don't specify filename in flat file connection manager editor,however if i specify filename then doesn't foreach files what should i do thanks Did you set an expression on the ConnectionString property of the connection manager -Jamie ...Show All
Visual Basic Use the TableMappings property
I have the following code: Try Me .Dimension1_Goal1TableAdapter.FillByTreatPlanID( Me .CCADPDataSet._Dimension1_Goal1, Common.sTreatPlanID.Text) Catch ex As System.Exception System.Windows.Forms.MessageBox.Show(ex.Message) End Try I want to be able to write this one with variable names where the Table Adapter and the Dataset is as follows: DimX As String GoalX As String DimX = "1" GoalX = "1" Dim TableAdapterName As String Dim DataSetTable As String TableAdapterName = "Dimension" & DimX & "_Goal" & GoalX & "TableAdapter.FillByTreatPlanID" DataSetTable = "CCADPDataSet._Dimension" & DimX & "_Goal&q ...Show All
