devstuff's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. getting variable from GameCompnent without instancing?
how would you do this I'm not exactly sure what you're trying to do here. The only way you could get access to a variable from a class without instancing the class itself is to make the variable static and then either have a public static method to return the variable or make the variable public. The problem is, the variable itself wont be much use to you because it will be null as you haven't initialised it in the class constructor (or wherever else). The only way around this would be to create another public static method to initialise the variable or have the variable public and then assign it a value before you use it. Basically, it sounds like extremely bad programming. Why do you want to do it What exactly are you wanting to do ...Show All
SQL Server Conditional Where using a Parameter
How do I construct a select with a conditional where: If DefaultWH is not blank I want to add a "AND part". SELECT DISTINCT Name FROM Warehouse WHERE (Cono = @Company) CASE WHEN @DefaultWH' <> ' ' THEN AND (@DefaultWH = whseid) END Here is something that I have done. Rather than use a blank, set it to null and use an isnull. Example: If @DefaultWh = '' Begin Set @DefaultWh = NULL End Select Distinct Name from Warehouse Where (Cono = @Company) and isnull(@DefaultWH, WhseID) = WhseID Hope that helps! BobP ...Show All
Visual Studio 2008 (Pre-release) ListView move items up and down
I've got a ListView bound to an observable collection and I am able to move the items in the list programatically moving their index value in the list. But the selection is now a problem because the selection doesn't move with the item. What's the correct way of doing this This smells wrong to me too. I've opened a bug. I traced through this - ListCollectionView has all the information it needs to move currency along with the item and it's really simple for it to do the right thing; it just doesn't do it. Sorry about that. ...Show All
Visual Studio Team System Error while editing WorkspaceMapping.xml file to get sources from other TP
Hi, I know that this Q was asked already on this forum But, I couldn't get really answer for this issue - Way can't I get sources from few team projects when I'm editing the WorkspaceMapping.xml file to get sources from a few team projects My WorkspaceMapping.xml looks like this: < xml version = " 1.0 " encoding = " utf-8 " > < SerializedWorkspace xmlns:xsi = " http://www.w3.org/2001/XMLSchema-instance " xmlns:xsd = " http://www.w3.org/2001/XMLSchema " > < Mappings > < InternalMapping ServerItem = " $/TeamProject1 " LocalItem = " D:\Program Files\Microsoft Visual Studio 8\Common7\IDE " Type = " Map " /> ...Show All
Windows Forms Alternating between two images every 3 seconds using a timer
Hello! I am quite new to C sharp and want to write a small program. I use an Mdi form with several child forms. I want to have a little picture box in a corner, possibly the Mdi form, that alternates every few seconds or so between two images continuously even while I switch between the various child forms. Is this even possible in Visual Studio 2005, and if so how Many thanks, Boombastic Just to ensure we are clear ... You can add the timer to the MDI parent. This would allow the event to be generated regardless of what is going on with the child forms. However, I don't know how you would *display* it on the MDI child form. Unless you wanted to put it as a background image of the MDI paren ...Show All
SQL Server Queue not disabling
HI There My activated proc is rolling back the transaction and putting the message abck on the queue infinately Normally it disabled the queue after a few rollbacks, i can see in the sql log that it just keeps rolling back and re-activating thousands of times. It only stops when i disable activation on the queue. WHy is the queue not disabling Thanx Sorry that comment was on the wrong post, yes i check sys.service_queues to make sure it is enabled. ANd i check the sql log and can see the activated sp activating and rolling abck thousands of times until i disable actiavtion. I find it very strange it always used to disable becuase of the poison message, but no longer not sure why, i would ...Show All
SQL Server Help Needed in writing a function to help daily nightmare with Debugging.
I debug SPS on a daily basis and I use SQL profiler to help me trace where the problem is. Once I have established which SP is the main problem I need to debug the line of code. What I do is Cut and Paste the SQL Profiler details and populate all the parameters,sometimes that can be 30 and more.. Now what i thought is to write an SP or Function where I pass : SP name and Parameters that profiler genererates and returns me Declare Statements and Set Statements with parameters filled. EG Profiler Returns Customer_INSERT,20,'JO',BLOGG','5 LONDON ROAD' I would call my new SP =PopulateSPParams and cut and paste the profiler's string PopulateSPParams 'Customer_Insert,20,'JO',BLOGG','5 LONDON ROAD' this will RETURN THE FOLLOW ...Show All
SQL Server deadlock victim
Here is the exception I am getting, any idea why this might be happening: Exception: ThisMethod is done: let this go: Exception: Transaction (Process ID 74) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction. Stack Trace: at Thanks for the reply. While users are working in the user interface I am inserting data to the table with another that is back end for the user interface. Although we do insert and update I do not think that user are dealing with the same data row, so I am assuming I should not be receiving deadlock. Does SQL server do RowLock or TableLock. How can I get my insert and update work on the Row ...Show All
Visual C++ Visual Studio features - gone in later versions
I'm trying to figure how to do certain things in a later version of Studio that I could do in VS6 but don't work anymore. Such as (a) dismiss the compilation output window just by hitting ESC, and (b) identifying the exact path to a given source file. I switched from 6 to .NET a couple of years ago, and have regretted not knowing how to make .NET behave like 6 in these particular areas. The Properties window - that's what I was missing. Thanks a million - that really helps! But sadly enough, the ESC key doesn't do for me what it does for you. Before I hit F7 to build, I have Solution Explorer (and now Properties) on the left and my code on the right. I hit F7, and the top half is taken o ...Show All
.NET Development manual IL code fails verification with "unable to resolve token"
Hi, I'm trying to write a (naive concept test) script that adds a prologue & epilogue to methods. It modifies the output of ildasm on an assembly to create a new IL file which I in turn compile with ilasm. It works by adding the following lines to the begining of every method: call class [Reflex]Reflex.ReflexWriter [Reflex]Reflex.ReflexWriter::get_Instance() callvirt instance void [Reflex]Reflex.ReflexWriter::Enter() It works on very simple assemblies I compiled with C#. To challenge my naive idea, I tried running it on the fxcop executable. The executable compiled but peverify fails with many similar errors, I copied the first one here: [IL]: Error: [D:\Program Files\Microsoft FxCop 1.35\FxCopy_trac ...Show All
Visual Basic vb2003 - Database designer/diagrams where the heck are they?
I've been perusing the VB helpfiles in 2003 and it talks about a database diagram and a database designer. If I right-click on the toolbar areas I can check both and get added icons for them which are ghosted, but I cannot figure out how to enable them. I have a database connection in the server explorer that works but seemingly no way to access either the diagram or the designer. Any hints as to how to activate these Hi, 1) Go to FILE then New Project 2) Open the OTHER PROJECTS tab and you should see a screen like.>> http://i13.photobucket.com/albums/a272/u-might-want-this/NewDataBaseProject.jpg Once you have clicked OKAY on this the DATABASE toolbars should become ...Show All
Visual Studio Express Editions Audio Volume
Hi, I have another question. Is it possible to display audio input and/or out put levels as seperate channels (Left and Right) I have two of the the VU audiometer ( http://www.codeproject.com/useritems/KEMA_Code.asp ) on my form. one named 'Left' and the other 'Right'. Any help would be great. I just tried it, it works a treat (not sure it's working that well under vista though - looks like the mixer has changed quite a bit. I also found the usage from this article: http://www.csharp-home.com/index/tiki-read_article.php articleId=134 Usage: private void button1_Click(object sender, System.EventArgs e) { //Display the current master volume MessageBox.Show(AudioMixerHelper.GetVolume().ToString()); //set t ...Show All
SQL Server Add parameter to "navigation" url
Add parameter to "navigation" url - Hello, I'm trying to add a parameter to my JUMP TO URL but it doesn't work. basiclly i'm useing javascript there: javascript:window.open('http:www.a.com num=XXX'); i want to change the XXX with a value from the dataset. I tried - javascript:window.open('http:www.a.com num= + Fields!ME.Value '); or - javascript:window.open('http:www.a.com num= & Fields!ME.Value '); it didn't worked :( any help = window.open( 'http:www.a.com num= " & Fields!ME.Value & "' ),_top" Ayzan ...Show All
SQL Server Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B
Hi, I have developed several SSIS packages with the last Beta of VS2005 / SQL Server CTP. After the public release I tried to uninstall the CTP-Versions to install the msdn finals but this time I got lost and was not able to satisfy the requirements of the final setup of VS2005. So I decided to install the whole pc again and after some hours I had a clean machine (XP with latest SQL Server 2005 Standard and VS2005 Professional). Now I have tried to open my SSIS-Project but getting the following error: Error loading ImpNetqNewsRss.dtsx: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Schlussel ist im angegebenen Status nicht gultig.". You may not be authorized to access this information. ...Show All
Windows Forms Folder Browser Dialog -- Disk Error
When using the folder browser dialog, how do you trap or prevent the "There is no disk in the drive. Please insert a disk into drive ..." dialog. This is happening for disk which the system has identified as removable media. Excel doesn't experience this problem, I believe I should be able to achieve the same level of performance. Hello All. RoadGlide: I don't guess I understand what you mean. If I try to browse to a removable media drive in Excel when choosing File -> Open, and there is no media in the drive, then the dialog you speak of pops right up. Could you elaborate ...Show All
