MuscleHead's Q&A profile
Windows Forms Load an image dynamically in statusbar...
Hi... In my application on status bar i am changing the image of " toolstipstatuslable " at runtime. for loading the image i have given the path as - this .toolStripStatusLabel1.Image = System.Drawing. Image .FromFile( @"..\Red.bmp" ); But when i run my only .exe file by putting it in some other folder & if i am runing my .exe file from that folder then its giving me error as file ot found... So how to load the image file in resources so that it will take it from their at runtime. Thanks, Vinay Hi Ahmedilyas … My bitmap image files are in Resource folder.I have added those image file as Embedded as a resource & I am doing ...Show All
Visual C# Allocating memory throws exception when trieng to use native code dll
Hi, I need to use a native code dll in my application. I am working on .NET2 env, written in c#. When I try to use the Init method in the native dll, it throws the following exception: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." I know this method supposed to open a com port and allocate a block of memory. I wrote a .NET wrapper for this dll. The h. file of this native dll includes 2 structures: 1. typedef struct ALARMREC { int Flag; int AlarmType; int AlarmUnitNum; int AlarmUnitWing; int AlarmLocation; int AlarmDelayFlag; char AlarmTime[20]; }alarmRec; 2. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Locking vertex and index buffer while rendering
Let me see if I got this one right. I have a vague memory of reading that if I have a vertexbuffer and lock it with the discard flag, then I can get a buffer to write into while the gfx card is still rendering the previous buffer that I locked. Is this correct Will I need to do this in two threads then As far as I know, the drawPrimitives call is blocking so it does not return before rendering is done. What I would like to do is to render with a vertex buffer and an index buffer while I am showeling vertices into a vertex buffer and an index buffer that I locked. That way I can double my speed, assuming that the showleing and rendering takes the same amount of time. Thomas Greenleaf wrote: Will I ...Show All
Visual Studio Team System Sharepoint Service App Pool always stop automatically
hi, all After my team use team system to manage software development and version control, we found that it is really a convenient and fatastic platform. But few days ago, I found that I cannot access sharepoint web site of team project. And I cannot create new team project, the error information indicates that I have some issues with Sharepoint service. I checked TFS, and found that Application Pools for Sharepoint always stop automatically. The application pools are TFSWSS and TFSWSSADMIN. If someone knows that answer or meet this kind of issue before, I would be appreciate for your help. Thanks. ...Show All
Visual Studio 2008 (Pre-release) How to create a list of unselectable Items?
I have a ListBox binded to some data and with an ItemTemplate. I'd like a list of unselectable items in the list. I cannot find the switch that make the items unselectable. Can I tell the ListBox or its item to not be selectable or should I use a different control in stead of a ListBox Any help is greatly appreciated. <DataTemplate x:Key = " myTemplate " > < StackPanel > < TextBlock Width = " 265 " Text = " {Binding Mode=Default, Path=ShortDescription} " Foreground = " White " FontSize = " 10 " FontWeight = " Bold " TextWrapping = " Wrap " /> < TextBlock Width = " 265 " Text = " {Binding M ...Show All
Visual Studio Team System Latency when Connecting via VPN remotely
Hello! Are there any limits or recommendation for the latency to a remote place The connection is done with two VPN routers. We are currently setting up that connection and it seems, that we have a latency of about 250 - 300 ms. Will that be good enough Any practical experiences about latency Regards CSharpNewbie22 Team Foundation Server is optimized to work on connections with high latency and low bandwidth so you shouldn't face any issues. I've used exactly that kind of set up for intensive development / testing using TFS for the past year and had no problems. My latency is usually around the 200ms mark, but it can occasionally spike up to 2000 ms and I have never noticed any problems wha ...Show All
.NET Development Boolean or bool?
I noticed when I am declaring fields that their are both a Boolean type and a bool type private Boolean mIncreasedInvasion = false ; private bool mExecuteScript = false ; What's the differance between the two Is there a performance differance Should one be used instead of the other Or are they both the exact same thing Thanks for clearing this up for me, Scionwest No difference. From MSDN: The bool keyword is an alias of System.Boolean Most people use the bool keyword (and similarly for int, long, string etc). ...Show All
Software Development for Windows Vista Sub Flows within XOML based workflows
Hi, I have a workflow which is XOML based and the XOML and rules file is loaded dynamically from the DB. With this I have a server control which manages all workflows loaded into with forward and back controls. I want to implement sub flows now and am wondering how to go about this with XOML based workflows. I have a demo working with code based files but cannot get the XOML working Is it possible if so, any pointers would be greatly appreciated. Thanks! Hi Tom, Thanks for that.This demo works fine intially, but as soon as the CalledWorkflowLibrary.dll is recompiled (without making any changes) I get an error saying "Unable to start program <PATH> Called WorkflowLibrary.dll. Is this a version issue, I ...Show All
Game Technologies: DirectX, XNA, XACT, etc. No way to set the SpriteBatch transform ?
I can't find a way to set the transform of the underlying ID3DXSprite of the XNA SpriteBatch. Am I missing something Thanks L. The SpriteBatch class doesn't support any transform state members. You will need to perform any transforms yourself before calling Draw methods. The overloaded Draw methods also contain options for scaling, translation and rotation transforms. ...Show All
Audio and Video Development Playing sounds from markup
How would one go about playing sounds in markup Specifically, I want to trigger audio from a focused state without passing an event to script. I understand that I can create a wav object, but how is the object sent to Player.audio.effect in markup Thanks! Do you mean that if you have very fast animations (eg, move 1000px over 2 frames) it looks bad Well.... not much you can do there I am afraid. There's only 24 (or 50/60) frames per second to draw in. Make your duration longer or your distance shorter, or you *could* create a version of you graphic that was deliberatly "blurred" and use that so it looks like a smoother animation. ...Show All
.NET Development DataAdaptor Update() method
Hello, I am facing a problem regard updating data back from a dataset to my data store using SqlDataAdapter. first i wished to perform updates from multiple tables at one call for Update() method but it did not work. Then i made a simple application to Update data of one table. Still i am getting same problem. ( No row is being Updated/Deleted/Inserted ). Here is the code. public void DoUpdate () { DataSet ds; SqlDataAdapter da; this .da = new SqlDataAdapter ( "Select companyName, address from companies; Select sms from Inventories" , @"MyConnectionString" ); this . da . UpdateCommand = new SqlCommand ( "Update Companies set companyName='New Compnay'; Update Inventories set SMS='New ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA doomed?
XNA may be the greatest thing since sliced bread, but I don't see it getting a lot of support until you make a simple web page that explains what features the XNA framework supports and why I would want to use it. I'm not going to download the thing just to figure out what it is. Dear: Cache friendly If u will d/l visual c# studio express...for this moment...u will have (for the moment) one of the most easy/cheap/fast/powerful tool for window based pc applications. Visual studio itself is "da men", proven by many. GSE is not a revolution of course, but as others already said...it's worth a try. "MEN, IT'S XNA, U WANT IT" BTW. Don't buy Creator's club submision....until you write some ...Show All
Visual Studio error 1335
pls hel me.i want to install ms visual studio2005 with msdn. but when i start instalation i got a error says "error 1335.the cabinet file'_14311_vc80_pdb_winsxs_atlmfc_x86.msm' is required for this installation is corrupt or cannot be used. this could indicate a network error, an error reading from the cd-rom,or a problem with this package." pls tell me what i do. have you tried and read this http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=778624&SiteID=1 ...Show All
Visual Basic Tool Tip in vb.net - Handle is not initialized
I am developing a windows application using VS-2005, vb.net, net framework 1.1 and SQL. Following is the code for utilizing tool tips in the form: Private Sub frmEMS_Incident_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load Dim tTip As New ToolTip ' Set up the delays for the ToolTip tTip.AutoPopDelay = 1000 tTip.InitialDelay = 1000 tTip.ReshowDelay = 500 ' Force the ToolTip text to be displayed whether or not the form is active tTip.ShowAlways = True ' Setup the ToolTip text for selected fields and buttons on the form tTip.SetToolTip( Me .cmd902Update, "Auto-fill of da ...Show All
Visual Studio Express Editions DateTimePicker needs "two goes" ....
Recipe : 1) Open a new 'Windows Application' 2) Add a DateTimePicker, set the following minimal code: Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AddHandler DateTimePicker1.DropDown, AddressOf GenericDTPFormatSetter End Sub Private Sub GenericDTPFormatSetter(ByVal sender As System.Object, ByVal e As System.EventArgs) sender.Format = DateTimePickerFormat.Long sender.CustomFormat = "yyyy-MMM-dd" End Sub End Class Set these design time properties of the DTP: .Format = DateTimePickerFormat.Custom .CustomFormat = " " This code allows the DTP to initially display as a blank, without any date showing at all. This is ...Show All
