Ben Amor Bassem's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. New XNA Competition?
Anyone know (and willing to talk about if you do) this Whoever is behind it is hiding using DomainsByProxy.com. January isn't that far off, so I expect more details soon. Guess I'll just get my main game ready and see what happens. Well, not all day. Oh, and what are you doing ! ...Show All
Windows Forms Checking for special characters in text control
I have an IP address text box that takes in multiple IP addresses (space separated). I would like to restrict the user to enter only - numbers, "." and whitespace. How should I do it i mean, without having to do a strchr check on every alphabet (lower and upper case, special characters like "! @ # $ %.....". Is there an easy way for me to do this check Advise please... try this: if (!Char.IsNumber(e.KeyChar) && !e.KeyChar.Equals('.') && !e.KeyChar.Equals(' ') && !e.KeyChar.ToString().Equals("\b")) { e.Handled = true; //we handled it so it won't show/accept the input but ignore it } the \b is the character that identifies tha ...Show All
Visual Basic Picking out the year
Can anyone tell me how to pick out the 4 digit year from a date I'm using VB.Net 2003 thanks tattoo date.ToString("yyyy") http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/cpconcustomdatetimeformatstrings.asp ...Show All
Visual Studio Team System Where can I get a download of Agile and CMMI full template,not just guidiance?
I made a mistake modifying my templates and I'd like to get them back to the original state. Where can I download the full original template I can only find the guidance. Thank you. You will need to restore it from your installation files (you should be able to get them from your installed folders). They are .zip archives, so I don't think you modified them. In case you have, then you need to get them from the original media files. After this older version is in place, then you can download the latest guidance and merge it following instructions at the bottom of the download page: http://www.microsoft.com/downloads/details.aspx familyid=10B578F1-B7A4-459F-A783-04BC82CB2359&display ...Show All
Software Development for Windows Vista Vista Security - Privileges not enough?!
Hi, I am trying to write an application using Event Tracing for Windows (ETW). And I am getting an "Access is Denied" HRESULT from the OpenTrace function. This is understandable because I am trying to start an NT Kernel Logger Session as outlined in MSDN. I am running this application through remote debugging with Visual Studio 2005 on Vista RC1. It is a command line application as it stands right now. Now, if I copy the debug to the remote machine and right click "Run as Administrator" everything works fine and I don't get the Access is Denied error. This is very inconvenient however since it does not allow for easy remote debugging. So I tried a programatic way of escalating my applications privileges, so I crea ...Show All
Visual Studio 2008 (Pre-release) Video Restart Button
Hey All, I am making a WPF video player and it is working well. I have buttons to Play, Pause and Stop the video but now I want a restart button. Anyone know how to accomplish this Thanks, Dvl I found out something interesting. If I play the video and then hit the restart button with your above code in it, it does nothing. However, if I play the video, pause it, and resume it THEN hit the restart button it works. With this new information, how do you suggest I proceed Again, I really appreciate the help, Dvl ...Show All
.NET Development Custom Data Types
I am having trouble creating a custom data type. I would create a data type that will work like the standard data types in .net so I can using in the following manner. I am using vs 2003. Dim mt As MyType mt = Type1 How can I define a structure that will allow me to set its value this way. And how can I make intellesense list the available options. For discussion purposes my options would be Type1, Type2 and Type3 which would actual correspond to 1,2 and 3. From what I can tell I need to use a structure to do what I want. An enum would work except I would like to have a parse and tostring method. The reason I want to do this is I will be reading values from a database that are stored as string ...Show All
Software Development for Windows Vista In July CTP, using StateMachineWorkflowInstance to obtain CurrentState freezes workflows in that State
Dear all, I have a working StateMachineWorkflow hosted under asp.net 2.0. I have written a simple routine (shown below) to interrogate the current state of a workflowinstance: public string WfCurrentStateDescription(string WorkflowInstanceId) { // Get the workflowRuntime which was started in global.asax WorkflowRuntime wfRuntime = (WorkflowRuntime)Application[WorkflowRuntimeKey]; StateMachineWorkflowInstance wfInst = new StateMachineWorkflowInstance(wfRuntime, new Guid(WorkflowInstanceId)); return wfInst.CurrentState.Description; } I find that, once I have called this on a workflowinstance, that instance gets "stuck" in the current state and never transitions to the next state, even though code appears to get c ...Show All
Windows Forms ClickOnce Workaround.
hey guys, I need help from you guys. Just a few questions if these can be dealt with. 1. Is it possible to use click once without its backward compatibility I mean would want the newly published files(all files) overwrite the old ones. Would it be possible 2. Just wanna hear your ideas on this guys. For example, we have multiple servers running. Considering a multinational compay that has employees on North America, Asia and Europe. Each continent is being represented by a server. The purpose of which is that every time theres an update, those employees from europe would just connect to the server on europe and so is USA and Asia with their assigned servers respectively. Would it be possible for ClickOnce to deploy to multiple servers ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Installing DXUT?
I've created my own application using DXUT. That's a water simulation that uses shaders 2.0. But I've encountered next problem. How to launch a project that uses DXUT on another PC without installing DirectX SDK Currently it doesn't work, even though runtime DirectX is up to date and same for video drivers. When program starts an initialization error "0x0150002" occurs. What Language are you using... The DXUt are just a set of classes that compile into your application... there is no need to install it on the client as your application includes it, but If you are using the GUI Controls inside you will need to make sure that you package up the .fx and texture files that the Framewor ...Show All
Windows Forms Accsessing usercontrol elements
Hi all I have a user control in which i have many sub web controls placed How can i access, say a dropdownlist control or a linkbutton click event in the usercontrol from an aspx page code behind Is this possible Can anyone please give some idea Thanks The general rule of thumb is to either expose the control(s) as public members of the user control to provide unrestricted access or to create a few properties and/or methods that give a user of the user control only the access you want them to have to the sub controls. Also for note, this forum is generally dedicated to Windows programming and for future ASP.NET/web related ones the ASP.NET forums would be the better place to inqu ...Show All
Visual Studio Express Editions how to: bind a single control to multiple datasources
hi, im really new to programming and i was wondering if there's someone out there who's kind enough to teach me how to bind a single control (ex. a textbox) to multiple datasource's (ex. two or more table's). thanks a lot.. you are talking more of a drilldown combobox and have recently helped someone do this. Take a look at this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=786157&SiteID=1 unfortunately for you, its in C#! however its easily convertable to VB.NET. I hope reading the link will give you some knowledge and understanding on how it can be achieved. The way it works is like this: fill the first combobox with data on selectedIndexChanged event of the combobox, ...Show All
Game Technologies: DirectX, XNA, XACT, etc. fireballs follow character?
ok, im not sure what im doing wrong... but when I stop press space bar(character is facing right) to fire and then decide to move my my character left the fire ball moves backwards with the character and vice a versa I can move my character left, right, left right repedatly and the fireballs stays with the character until I stop moving and they finish the x distance and disappear here are two methods im using protected void AddFireball() { if (_fireballsElapsed == 0) { bool _addFireball = true ; foreach ( KeyValuePair < string , Sprite. Sprite > aFireball in _fireballs) { if (aFireball.Value.Visible == false ) { aFireball.Value.StartPosition = new Vector2 (_tif.Position.X + 50 ...Show All
Visual Studio Express Editions View source code!!!
Hey, how can i view the source code on a webbrowser ok. 1) did you navigate to a webpage first in the webbrowser Me.theWebBrowserControl.Navigate(" http://www.microsoft.com ") 2) did you do this to display the code in a textbox after the page was loaded Me.theTextBox.Text = Me.theWebBrowserControl.DocumentText remember, you have to wait until the contents of the webpage have been loaded in order for you to view the source/code of that site otherwise you will get nothing, as you currently maybe experiencing. Select the webbrowser control in designer view. View the events (lightning icon in the properties window) and double click "documentCompleted" to create the document completed event so it will ...Show All
SQL Server Moving a DB to a different domain and then connecting
If a thief yanks (technical term) a hard-drive containing a SQL Server 05 database from a server and then installs it on a server in a different domain, is there any way he could connect to it This question assumes that a hacker didn't somehow transfer the domain logins. Could the local admin even add himself as a user to the database without having the admin login information from the previous domain Thanks, As the server is attached by a sysadmin (no matter if its a malicious domain :-) ) the sysadmin will have full access to the database. Thats why the access to the physical files also has to be secured rather than just the logical access through autorization. See this recently answered post: http://forums.microsoft.com ...Show All
