spree's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. How to control sprite (jpg) with arrow keys
Hi, i'm very new to programming, and was reading in the help files about recognizing keyboard buttons being pressed and released, but still cannot figure out how to make my simple jpg sprite to move when i press an arrow. I used tutorial to make the simple game sprite move around the screen and when it hits the edge it bounces, so what i want to do now is remove the sprite movement, keep the bounce, and allow the user to press an arrow key to make it start moving. As I said, I am very new to programming, although I can understand some technical terms. Thanks. Here is the code i'm using. namespace WindowsGame1 { /// <summary> /// This is the main type for your game /// </summary> ...Show All
Windows Forms DoEvents in a Class Library
Hi, I have a VC# dll which has a while(true) loop. I was using a DoEvents in the original code, but now when I write the dll I cant use the DoEvents !! Is there a way to use DoEvents in a Class Library Thanks. Yes i know that its not good programming practice. I have a while loop which is waiting for data received (or sent) over sockets. Since I have to keep on listening for data being received, I cant think of a better way of doing this thing without using the while(true) loop. The loop terminates when the client sends an exit message. So, I am using the DoEvents before I enter this loop to allow my program to do other stuff. And yes I know that DoEvents is in Windows.Forms, but that is wher ...Show All
Visual C++ using some old MFC code in a managed dll
Hi - I have some low-level C++ code to interface with a chip. The code works fine to open and download a configuration file. However, I want have that functionality from a VB app, so I'm trying to create a managed C++ dll that I can reference, pass the file path from VB and let the old C++ code process and download the file. The C++ code uses afxwin.h with all the old MFC classes, e.g. CString DownloadDlg::GetFileContents(CString fileName) { CFile file(fileName, CFile::modeRead); CString contents; // Create the buffer DWORD fileLength = (DWORD) file.SeekToEnd(); char * pFileContents = new char [fileLength + 1]; file.SeekToBegin(); // Read it in file.Read(pFileContents, fileLength); pFileContents ...Show All
Windows Forms DATETIMEpicker column in DATAGRID in VB 2005
Hi, How can i implement a DATETIMEpicker column in DATAGRID in VB 2005 Alex You can find an example of making a DateTimePicker for the datagrid here . There is a Sample DataTimePicker column for the datagridview in the Datagridview FAQ samples . ...Show All
Windows Forms Data Not Saving In Calculated Field
I have a textbox that is populated from a calculated variable. The textbox populates ok but when I save the data, the textbox resets to zero and saves to the database as zero. All of the other data on the form saves appropriately. The data is originally binded as: ctl.DataBindings.Add(new Binding("Text", usmDataSet_est1.Tables["cabinet"], ctl.Name, true, DataSourceUpdateMode.OnPropertyChanged)); I'm setting the text property of the calculated value with: private void populateAreaTextBox(string First, string Last, Control ctl) { string sArea = Convert.ToString(Decimal.Round(calcArea(), 2)); ctl.Text = sArea; } What could be the problem The textbox is read-only. I'm using VS200 ...Show All
Visual Studio Express Editions I want reinstall ALL
Hi! For some strange reasons now VC++2005Express get me an error every time I open a project. I've tried to reinstall it, but the problem persist. I've notice that the settings and some option perduring despite i've unistalled and reinstall the software. Infact some Vc2005 directories perduring....so, how i can remove ALL VC++2005 files Thank in advance! ...Show All
SQL Server Exporting Reports creates a blank window
I have created a few reports and linked them to a URL on a web page. (sample link is : http://servername/ReportServer/Pages/ReportViewer.aspx %2fMy_Reports%2fBacklog+Report&rs:Command=Render ) When the user clicks on the link above it renders correctly but when the user tries to export the report to any format on the list, it launches another window with the following URL : http://servername/ReportServer/Reserved.ReportViewerWebControl.axd ExecutionID=czq4c355dmsxdy55dif1nm55&ControlID=ad74d68e-2a9c-430f-8655-dd0e6c46f831&Culture=1033&UICulture=9&ReportStack=1&OpType=Export&FileName=Backlog+Report&ContentDisposition=OnlyHtmlInline&Format=EXCEL which then prompts the user to Open or Save the report. ...Show All
.NET Development Can't authenticate against non-Microsoft LDAP server.
Hello VB.NET gurus! I'm having a miserable time authenticating against a Novell LDAP server at a university. The code (below) that I use works GREAT against my SBS 2003 server. Does anyone have a clue as to as to what I'm missing Thank you for your time!!! My contact at the university pulled up some log of this query and stated that I keep doing a 'non-authenticated bind' with this code. This works: Dim path As String = "LDAP://x.x.x.x/DC=a,DC=local" Dim username As String = "CN=PersonName,OU=SBSUsers,OU=Users,OU=Gap,DC=a,DC=local" ' This doesn't work: 'Dim path As String = LDAP://x.x.x.x/o=wcslc ' Dim username As String = "cn=PersonName,ou=campus,o=wcslc" ...Show All
.NET Development Original table of view column
I need to know the underlying table of a column in a view. Using getschema("Columns") i can get a list of the columns in the view, but not the table that they come from. Using getschema("ViewColumns") gives me the table that they come from but not if they are visible or not in the view... it includes all columns from all tables in the view regardless if they are visible in the view or not. What I need is to get a list of columns in the view and the table that they belong to. What's the best way to do this Any advice Hi siftee, I think you have to use the the information_schema views from SQLServer - if you are using it - Here is a link where you can find how to use them Bes ...Show All
Visual FoxPro How to disable Foxpro screen?
I have a project with one screen form only. When I run the execute, the screen form is within the foxpro's screen. How do I make the screen form as the only window form shown on screen Thanks. Joe. screen = off in config.fpw is the best solution. Toplevel forms can NOT be modal (even if you set to modal it is ignored). You need "read events" to start the event processing and to prevent the application's immediately ending (flashing and closing). Here is a simple one form layout: * Form.init (showwindow property is 2-toplevel) this.Show read events * A button in form click - "Close Application" button * Button's click code clear events thisform.release * Config.fpw scr ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How to save several x files to one x file
hello everyone, I'm a newbie here. I want to open several X files with DirectX 9.0(C#), and save them to one X file. I loaded X with Mesh mesh1 = Mesh.FromFile(strXPath1, MeshFlags.Managed, meshDevice, out mtrl); Mesh mesh2 = Mesh.FromFile(strXPath2, MeshFlags.Managed, meshDevice, out mtrl); …… and wanted to save with following : Mesh meshSave = new Mesh(iAdjNum,iVerticNum,MeshFlags.Managed, CustomVertex.PositionNormal.Format, frm.device); Mesh meshsave = Mesh.Save(); but I failed , Could someone give some tips. Thanks!!!! Look in Managed DirectX docs. Im pretty sure the Mesh class have some methods for saving to x files. (may be those methods are static. not sure right now). You can merge ...Show All
Windows Forms IE7 control instead of browser control
I would like to know if there is a way to integrate some of the features of IE7 or better yet the entire IE7 into a .net app just like the browser control that already exists. Thanks in advance! The WebBrowser control will automagically use IE7. To see for yourself, right click the page and choose Print Preview... ...Show All
Visual Studio Express Editions syntax code
to those of you who are familiar with the coding, could you write a simple code example so we can understand,give us simple syntax examples please of; deleete command accept changes command that way those of us who are beginners can read the syntax and get a better view of how it works. i did drag the binding souce as yiou did as well as the dadatset, i dont know waht has gone wrong, so lii probably start againg, but to go back o my original statement about questions being answered in a simple fashion, that is what will help us beginers more. what i am doing as my knowledge grows is to write them down in a book in idiots language so anyone who is at the point i am can undertsand what thi ...Show All
Game Technologies: DirectX, XNA, XACT, etc. PC and XBOX in one project?
Currentyl I had to start a new 360 project.. write a xcopy batch file to copy any new source or asset files from my PC project over to the 360 project.. then by hand go in and add any new files to the 360 version. A bit of a pain.. It works... But I was hoping there was a simple flag or two I could swith to change over to the 360's Libraries and not have 2 seperate projects and all the batch file fun. btw, GREAT JOB ON XNA GUYS!... 1) Right-click on the project and select Add | Existing Item... 2) Select the files you want in the dialog 3) Click the little arrow on the right-side of the Add button and select Add As Link ...Show All
.NET Development Configuration Enterprise Library - OnDeserializeUnrecognisedAttribute
HI, I'm currently attempting to convert my applications existing configuration to the enterprise library method, and am having some problems. I need to configure groups of items where the items share some generic configuration detail, but must also be able to contain item-specific configuration. I intended to configure this by having the shared configuration as attributes on the item configuration node, and then permit a child node that could contain any specific configuration. I thought that I would be able to parse the child node into an XmlNode property by overriding the OnDeserializeUnrecognisedElement method in ConfigurationElement, but this seems to be causing some problems. If I use the XmlReader.ReadOuterXml() to acquire ...Show All
