N. Farr's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Draw a JPEG using alpha
I am trying to draw a JPG photo semi-transparently over a background with the following code: Batch.Draw(CurrentPhoto, photoPos, null , fadeColor, 0f, Vector2 .Zero, scale, SpriteEffects .None, 0f); where fadeColor will be (255,255,255,alpha). The RGB color values of fadeColor seem to modulate the color of the photo fine, but the alpha doesn't seem to do anything. Of note, the CurrentPhoto is a Texture2D object created from a JPG file using FromFile(). Does the Texture2D object have to have a format that includes alpha Any other ideas why the alpha doesn't seem to work Thanks, John Lund The input file format shouldn't matter because the content pipeline converts it to an XNA standard format anyway. I have a blog p ...Show All
Windows Forms Splitter Container
Is there way to create an interface where on a splitter bar triangles are placed and click on which expand/collapse left/right or top/bottom panel respectively, as we can do in Java Swing . Or perhaps it may be done somehow else TIA Michael There is not explicit control for that.But you can make your own implemntation.You can make us of a arrow image for showing the arrow icon.The expand and collapse can be implemented by changing the location (X location ofr left/right and Y location Top/Bottom) dynamically inside a loop.If we put some Sleep(),in the loop, a scrolling effect can be enabled ...Show All
Visual Studio 2008 (Pre-release) Changing ComboBoxItem Properties from a DataTemplate Hosted in the ComboBoxItem Container
I'm trying to change the ComboBoxItem's IsEnabled property from a DataTemplate and I can't figure out how to do it. How can I change the property of a ComboBoxItem container from the DataTemplate that's hosted in the ComboBoxItem container Is it even possible Kevin You might want to have a DataTemplate with a root element, and bind it's IsEnabled property to the parent ComoboBoxItem's IsEnabled property in reverse: IsEnabled={Binding RelativeSource={RelativeSource AncestorType=ComboBoxItem}, Path=IsEnabled, Mode=OneWayToSource} if you now change the IsEnalbed on your root element, it will propagate automatically to the ComboBoxItem. If that's not what you're looking for, I'd follow Lee's advi ...Show All
Windows Forms Vertical Alignment of Text in a TextBox
http://img208.imageshack.us/img208/4003/untitledzo6.jpg TextBox.TextAlign takes type System.Windows.Forms.HorizontalAlignment, while Label.TextAlign takes type System.Drawing.ContentAlignment. If you click on that picture link you can see, when using BorderStyle.FixedSingle, the TextBox text looks completely terrible when compared to the Label using ContentAlignment.MiddleCenter. Does anyone know of a way to make it so that the text in a TextBox is vertically aligned I can't find an owner draw and I can't find a vertical alignment property, but I can't believe we'd be left with such an awful looking control. That's too bad. I do hope all this is worked out in .NET 3.0. I haven't played around with ...Show All
Visual Studio Express Editions How to send an E Mail from an Application in C#
Hi every body, I want to send an E-Mail through my C# application. How can I do that. Please help me out. If possible please give me the coding exapmples. Thank you, Ravinder Reddy. K also take a look at this: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=760457&SiteID=1 you need to have a valid SMTP server to send emails through, for example some ISP's give you email accounts and allow you to programmatically use their SMTP server to send emails, or via your hosting provider or say from bluebottle.com remember - you need to pass credentials of your email account to the SMTP Serve ...Show All
Visual Studio Team System Code Coverage loses it's mind
Please refer to http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx feedbackid=FDBK40689 . I'm now seeing this on other code - non-generic code, so I doubt the original problem has anything to do with generics. Has anyone else seen this kind of behavior Is there any solution available Having the coloring completely scrambled makes code coverage quite a lot less useful! Update: Here's the new link on Connect: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx FeedbackID=122653 Hey Carl, I just went and took a look at the MSDN Feedback issue that you filed. Looking at the notes section at the bottom it appears (from Lexin Shan's comment) that this was a problem in the RTM ...Show All
Visual Studio Team System Problem opening a work item in a template editor
I have a problem, i dont know what i did wrong but when i try to open my bug file in the process template editor it gives me this error 'There was a problem loading the work item type definition. Work Item Type: Bug A duplicate key " exists ' is what i get, if anyone knows a solution to my problem please help me out Thanks for your time and help Kardi, You have to open a command line first and then run the witimport tool along with the appropriate parameters. Double-clicking on it will not help. If you recreate the process template, you will have to create a new project based on it to see the new work items and their values. Good luck ...Show All
Visual C# how "on the fly" concept work in c#
I heared if we do some modifications in the dll already deployed and redeploy it again with a different sn key, then we dont have to recompile or restart the server , client code on the fly access the modified . How does it work, would greatly appriciate how does this awesome feature works in C#.net again your answer in configuration file after you change your assembly code you can deploy it if you want to bind to specific version use configuration file to specify it look at this for more info Side By Side Execution How Do I...Create a Publisher Policy Assembly Creating a Publisher Policy File Hot to use assembly version ...Show All
Visual C++ View invalidate problem ...
Hello, I am developing an MFC SDI app using VC++ 2005. The view area of the app is divided into four areas (rectangles), each of them contains some icons, texts ect. I am drawing all the things from within "OnDraw" method of the view class. I need to invalidate the areas depending on the change of data from the other dialogs of my app. I can invalidate the view area from within the main frame. But how do I invalidate the view area from other dialogs To inform views about changes of data you can use UpdateAllViews that is located in the CDocument class. UpdateAllViews takes also some hints that might be useful to update just parts of your information. See the Scribble sample. So after a dialog changed some data ...Show All
Visual Studio Custom Tool in VS2005
Hi, have some troubles creating a "Custom Tool" like "MSDataGenerator": I read the article found at: http://msdn.microsoft.com/msdnmag/issues/06/02/CuttingEdge/ and some of the linked articles too. So here are the steps i made in hardly 15 mins: 1. Create new VS2005 C# ClassLibraryProject called "MyGenerator" 2. Add reference to Microsoft.VisualStudio.BaseCodeGeneratorWithSite.dll 3. Implemented: "MyGenerator.cs": using System; using System.Runtime.InteropServices; using Microsoft.CustomTool; namespace MyGenerator { [ComVisible(true)] [Guid("d1815bb9-ecce-4dbc-9b73-ce4ff234af7d")] public class MyGenerator : BaseCodeGeneratorWithSite { &n ...Show All
SQL Server Jump to URL with a new target page
In Opening a display of invoices in Report Server I have a ULR link in the Jump to URL section under the navigation tab. I have the URL with the invoice number in the expression. Is there something I can add to this expression that will force the interface to Open a new windows page instead of the existing window Hi, Try this expression in "Jump to URL Section" -> the targeted report should be in the same folder (Globals!ReportFolder) = window.open('" & Globals!ReportServerUrl & " " & Globals!ReportFolder & "/" & "myreport " & "&rs:Command=Render&rc:toolbar=true','','width=8 ...Show All
.NET Development error in web service
Public Function HelloWorld() As String Dim R As String R = "SELECT * FROM PanHotelRate" Return R End Function i wanna return information from my database wif the above codes but there's an error i tink i noe the error it is this: Dim R As String i noe i should not declare it as String but i donnoe any other alternative what should i declare R as What is the error you get Your code looks OK as far as returning a string goes. You do have the <WebMethod> attributes applied right Of course the code you posted isn't querying the database, just returning a string. ...Show All
Customer Care Framework CCF Servers Verification Steps - GetAddresses problem
I am verifying installation as described in Deployment Guide sec. 11.4. When trying to invoke http://CCFIIS/Microsoft.Ccf.Csr.WebServices.ContactCenter/AddressBook.asmx op=GetAddresses web service in Firefox I got this error: System.DirectoryServices.DirectoryServicesCOMException: A referral was returned from the server. at Microsoft.Ccf.Csr.WebServices.Providers.ContactCenter.LDAPAddressBookProvider.GetAddresses(String prefix, Int32 howMany) at Microsoft.Ccf.Csr.WebServices.AddressBook.GetAddresses(String prefix, Int32 howMany) When I try invoke the service in IE it ends with: The page cannot be displayed,...., HTTP 500 - Internal server error Documentation says that it should return some XML structure. Running next url http://cc ...Show All
SQL Server Connecting to the server
Hi everyone, my friend is creating an online game and he needs help with something, he made the formatting for the configuration like this: "AccountDbIP"="example.com" "AccountDbID"="ABC" "AccountDbPwd"="123" "AccountDbName"="AccountDB" But his dedicated server host is running windows 2003 web edition and it only allows mssql express. And he cannot connect just by using the ip, he needs to use ip/SQLEXPRESS, can anyone tell us how to connect to the server database using the IP only Thanks and best regards to all, Bob R for remote connections the format is "[ServerName or IP][\Named Instance][,Port#]" for local c ...Show All
Software Development for Windows Vista Some questions
Hi, Some generate questions: 1) For Sequential Workflow, I can track the Instance History without using SQLPersistenceService, but for the Statemachine workflow, I must start the SQLPersistenceService before I can get the tracking history, is that true 2) In Beta 2.2, I remember we have the script to create the SharedPersistenceAndTracking database. But for the RC version, where can we get the Sql Script to generate the Shared store 3) After the workflow completion, we can get the Output Properties within the workflow instance with e.OutputParameters("ClaimAmount"). But before the completion, how can be get the properties (such as the Claim Amount we send to the workflow when we start the workflow) from the Workflow T ...Show All
