satya999's Q&A profile
Visual C++ Passing a value from one class to another class
I am have a sample Thread on a Windows Form Project. I have a button that Starts a Thread and does a simple loop. The loop is in located in a header file but i want it to update a a progressbar in form1. I understand i would need a delegate in form1 to update the progressbar but calling that delegate in form1 is what i am having problems with. Below is the entire Header. #pragma once #include "Form1.h" namespace NamespaceThread { using namespace System; ref class ThreadClass { public: static void MyThread(); }; void ThreadClass::MyThread() { for (int i = 0; i <= 100; i++) { //Delegate needs to be called to update progressBar1->Value } } } in form1.h i have a delegate like below delegate void ProgressSte ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Unable to share a windows game - Followed the instructions on the manual
Okay, so I finished my first game using XNA Game Studio Express, it has been only a few days since I installed it, and it has been quite easy, having experience at making games. Now, I want to show this game to my friends, so I send it to a couple of them (both of them have XNA Game Studio Express installed), and it works great. Now I want to show it to some other friends, these who do not know what making games is about, these who do not have XNA Game Studio Express. I ensure they follow these instructions, from the manual: Sharing a Windows game On Windows you need to distribute your game executable and any content required by your game. In addition you need to ensure that the user has the following redistributables installed ...Show All
SQL Server List a city only once
Hi...I want one listbox showing cities but I dont want to list a city more than one time.... I know that DISTINCT maybe could work...But I dont get it to work correctly.... The code: < asp : ListBox ID ="ListBox1" runat ="server" AutoPostBack ="True" DataSourceID ="DataSource1" DataTextField ="City" DataValueField ="City"></ asp : ListBox > < asp : SqlDataSource ID ="DataSource1" runat ="server" ConnectionString =" <%$ ConnectionStrings:ConnectionString %> " SelectCommand ="SELECT DISTINCT [City] FROM [Location]"> </ asp : SqlDataSource > I got the message: The text data type cannot be selected as DISTINCT because it is not comparable &nbs ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Writing a Custom Game Making Tool using XNA
I've posted quite a few threads in the past day, so bear with me. What I'm writing is basically a tool that will allow you to write a scene, using preloaded sprites, backrounds, audio and more. Now from there, it will use Reflection.Emit to take the game and turn it into a simple .exe file that will have all the draw calls included. Now, what I am worried about is that good old ContentLoadException. Now, I would need away for my exe to include all of the nessicary content at runtime. I was thinking of compressing them using a standard Gzip-like format, then at runtime loading up what would be needed. I'm wondering if there is a better approach at doing this. You certainly can use the content pipeline, b ...Show All
Visual C++ mirar
im havin the same problem with mirar how da hell do i remove it, it dosent appear the remove programs its driving me crazy poppin up every second Please be specific in your question in a good language. This forums is really intended to handle with C++ General Issues rather than some installation problems. I really didn't get what you meant by Mirar ...Show All
Visual Studio Team System <ALLOWEXISTINGVALUE> not valid for System.Reason
Can anyone explain why <ALLOWEXISTINGVALUE> is not allowed for System.Reason. I would think this is just an ordinary string field. Thanks. We are importing all the defects, features and tasks from our previous tracking system into TFS. The lifecyle behavior was different there (only states, no reason field). So I want to map all 'old lifecycle states to reasons in TFS. New work items in TFS however should follow the TFS-lifecycle (state, reason). ...Show All
Visual Studio Retrieving the COM class factory for component with CLSID {11BD5260-15B6-412D-80DB-12BB60B8FE50}
We has following error message after we move our program to production server: Retrieving the COM class factory for component with CLSID {11BD5260-15B6-412D-80DB-12BB60B8FE50} failed due to the following error: 800700c1. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.BadImageFormatException: Retrieving the COM class factory for component with CLSID {11BD5260-15B6-412D-80DB-12BB60B8FE50} failed due to the following error: 800700c1. Source Error: Line 28: Line 29: Try Line 30: Dim oRpt As New ReportDocument() Line 31: Line 32: ...Show All
Visual Basic what is the definition of module???
Hi I need some help. I was searching the definition of module, but I haven't found it yet. Could someone explain me exactly what module is please thanks!!!! Check out this explanation: http://weblogs.asp.net/alex_papadimoulis/archive/2004/06/17/158295.aspx ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Clipping Layered Sprites (UI Related)
You know how in a panel if a child button runs off the side of the panel, it gets clipped. Does anyone know how one might go about doing that with XNA Or how they do it in OpenGL/DirectX Are they doing something with the stencil buffer wouldn't it be more efficient to use logic to decide if (for example) the text goes outside of the rectangle text input area then use the source parameter on spriteBatch to then stop it from drawing e.g. if (area.Right > text.Right) { source.Width -= (text.Right - area.Right); } does that make sense, and wouldn't that be quicker to draw ...Show All
Audio and Video Development video zoom
I'm working on a small function that zooms the video (with optional panning) but using the code below doesn't seem to work, any tips addEventListener("controller_key_down",keyPressed,true); function keyPressed(evt) { Player.video.main.changeLayout(0,0,Player.createVideoScale(1,2),0,0,1920,1080,"00:00:00:00"); } The above code should have changed the video on any key press. Peter said " You can only specify 0 duration if the video is paused; otherwise, you need a duration anywhere from 1 frame to 3 seconds" but this is wrong. I think what he meant to say was "if paused you MUST specify a duration of zero. If playing, anything from 0 to 3 seconds is good. ...Show All
Visual Basic "pause code for x amount of time"
Is there a way that I could easily pause the code for an x anount time and then continue on Here is what my code looks like. Pretty simple but I just learning:) Thanks for the help -------------------------------------------------------------------------------------- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim generator1 As New Random Dim randomValue1 As Integer randomValue1 = generator1.Next(10, 100) Label2.Text = randomValue1 Do Until Label2.Text = 0 Dim generator As New Random Dim randomValue As Integer randomValue = generator.Next(1, 10) Label1.Text = randomValue Label2.Text -= 1 'I WOULD LIKE TO HAVE A PAUSE F ...Show All
Visual Studio Team System How to automatically create workitem when Team build fails?
Hi, How to automatically create workitem when the unit test fails/ incomplete code coverage during Team build Thanks... A work item is created, by default, when a build fails. You can modify the WorkItemFieldValues property in TfsBuild.proj to set the values of any field in the work item created on a build failure. Please let us know if you have further questions. Swaha ...Show All
Smart Device Development Debugging C++ Unmanaged code
Hi, I have a problem while trying to debug my unmanaged C++ application using Visual Studio 2005 and with Windows Mobile 5. Basically, I am able to run the application in the debugger, and even step into methods etc. But, all of this requires the use of a breakpoint. Right at the moment I have a deadlock which I would like to debug. I can reproduce the deadlock "at will", and want to use the debugger to "Break All"/"Pause" the session and to see the Call Stack of each thread. I can indeed pause the debugging session but none of the call stacks are available for the threads. As near as I can figure the symbols are loaded correctly, since I can see the call stack if I place a breakpoi ...Show All
Visual FoxPro How to use user-defined DLL in VFP 9.0??
I am trying to call a DLL writen by VC++ in VFP 9.0, but I have and error message: "Cannot find entry point "name" in the DLL" . I wonder that if that DLL file will accompany with VFP 9.0 and how could I check about that If I am trying it with VB6 by adding reference, it still work well. I also try with Define class... implement with Object Browser. But it don't work and the method return .T. when I call it in the pgrogram. Thanks in advance to anyone who can help me find out if I could use DLL that is not Win32API with VFP9.0, or I must use VB6 instead Best Regards As an addition to Alex's reply, keep in mind function names are case sensitive. That message generally in ...Show All
Windows Forms Changing selected tabpage when focus changes
Hello, I have a Windows form with a tab control containing two tabpages; each tabpage contains a few textboxes. The form also has an 'OK' and 'Cancel' buttons. The 'OK' button validates user input before processing it, and if there is invalid input, it displays a messagebox and sets focus on the invalid textbox. For simplification, let's assume this is the logic executed on btnOk.Click (Note that txtTabpage2 is in TabPage2): Private Sub BtnOk_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOk.Click If String .IsNullOrEmpty( Me .txtTabpage2.text.trim) Then MessageBox.Show( "Invalid content" ) Me .txtTabpage2.Focus() End If End Sub Now, if the user ...Show All
