monkey1888's Q&A profile
Visual C# Couple of C# newbie questions
I am very new to C#, so please bear with me if these questions are rather elementary. 1) I wanted to get the system time, so I searched the forums for it, and found this example: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=424660&SiteID=1 while this is all good and well, are there no easier ways to format a date Maybe something similar to Java's DateFormat classes 2) I tried to apply generics to an ArrayList class, as such: ArrayList<MyObject> myList = new ArrayList<MyObject>(); but I got the exception that I cant use ArrayList with type arguements. Am i doing something wrong Or are there other lists reserved for Generics use 3) I cant seem to figure out how to add a Titled border to ...Show All
Game Technologies: DirectX, XNA, XACT, etc. VideoSettings/Threading questions with XNA...
Scratching my head over this one. Want to set some device/presentation parameters before adding .graphics to the GameComponents, in this case through a form. public Game1() { //create settings form Form f = new frm_DisplaySettings(); //wait for "Start" button clicked on f //pass settings on to Designer to Initialize InitializeComponent(mySettings[]); } //wait for "Start" button clicked on f// is where I am stuck. I've tried spawning threads but not sure how the Game class handles this and not sure how to implement cross-class ManualResetEvents. TIA, lushdog You need to show the form Form f = new frm_DisplaySettings(); f.S ...Show All
SQL Server Moving Table to another SQL server using Linked Server
Hi, I can't seem to find any information on how exactly to do this. Basically I want to move a particular table on my DB to a remote SQL server, and have write operations (destined for that table) to be written directly to the table on the remote server. How is this done Thanks in advance. If you have set up one server as a linked server, you should be able to set up one of your tables just as a view, so that operations that happen to it actually happen on the underlying one (on the remote server). That's the theory at least, and it ought to work, but you should be wary of network latency and things like that. You may find it just doesn't perform well enough, and that you need some sort of a process which polls the table on ...Show All
Audio and Video Development Video Events
How can I handle video events in the script For example, when new chapter started. Or when certain frame reached. I'm confused. try { Player.video.main.capture(filename,VideoMainCaptureCallback); } Shouldn't it be: try { Player.video.main.capture(filename, VideoMainCaptureCallback(int status, String uri)); } To match the signature specified in Z.10.19.3 And also, I don't understand why the interface for that callback. Why pass the uri and status ...Show All
Windows Forms setup.exe that doesn't require .NET 2.0
I've created a setup project with VS2005 and can run my install fine on systems with .NET 2.0. On many of my customer's systems, they do not want to install .NET. Currently when I run my setup.exe it goes off and tries to install .NET 2.0 first and fails if I don't. How do I create a setup.exe/.msi that does not require .NET 2.0 on the system doing the install When you click on the prerequisites button you can "The operation could not be completed. The system cannot find the specified file." Do you know what file it is looking for. I tried a re-install of VS. Thanks, Stuart ...Show All
.NET Development datetime field sql server 2005 updates incorrectly
I am using vb 2005 expess edition and sql sever 2005 The problem I have is the LastUpdated field which is a datetime field in the database does not update properly the code I am using is Dim cnSQL As SqlConnection Dim cmSQL As SqlCommand Dim strSQL As String cnSQL = New SqlConnection(ConnectionString) cnSQL.Open() strSQL = "update people set LastUpdated = " & DateTime.Now.Date & " where PersonId = 13" cmSQL = New SqlCommand(strSQL, cnSQL) cmSQL.ExecuteNonQuery() this executes with no errors but the database is updated with the same date each time 01/01/1900 00:00:00 I have tried all combinations of the datetime field values with no effect Can anyone h ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Is Memexport currently exposed on XNA?
I know thats a very specific 360's feature, so its probable not avaiable on v1. But, is it ever going to be exposed on Xna framework Going by Ms's Gamefest slides, memexport can be a HUGE win in certain spots, like skinning meshes... ...Show All
Windows Search Technologies Windows search replaced by desktop search?
I downloaded Windows Desktop Search about a week ago.Today I needed to search my computer for a .dll file,and found that the Search in my Start menu has been replaced by Windows Desktop Search.How do I get my normal search function back Anzol- I guess I never got the alert feature to work-so I never saw your reply.Thanks for the info.I finally found this feature,also. ...Show All
Visual Basic JScript to VB
im converting a website from no asp.net abiltys to asp.net 2.0. origanaly the site used jscript to do interactivity now i want to use VB. some of the code i dont understand so i cant convert it. any help would be great. the code is (its very long): var document_gregorian_year = "1998" , //Curent english year document_gregorian_month = new Array( "January" , "Febuary" , "March" , "April" , "May" , "June" , "July" , "August" , "September" , "October" , "November" , "December" ), //English months document_gregorian_month_index = 0 //Curent english month document_gregorian_wday ...Show All
SQL Server Password History with CHECK_POLICY and CHECK_EXPIRATION
I've tried to find a definitive answer to this but I cannot. If CHECK_POLICY = ON and CHECK_EXPIRATION = ON will password history be checked when a user changes their password By password history I mean the idea that a password once used cannot be used again for another X password resets.... If password history does work, why would executing the following statement multiple times then work ALTER LOGIN Bob WITH Password = '123User321' If I execute this statement four times in a row wouldn't I get a message that I cannot reuse the password on the second call Thanks in advance No, password history won't take effect in your example, because what you are doing is resetting the password. You ha ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Is Boo a viable option for Scripting for both PC and XBox360?
I'm just wondering if anyone has tried getting Boo to work for scripting on the XBox360, or is there some feature that Boo takes advantage of on the PC that isn't available on the console I've been reading that IronPython isn't an option, and LuaInterface wouldn't work either, since P/Invoke doesn't seem to be supported for security reasons. Can anyone shed some light It would be greatly appreciated. Thanks, Kevin Boo's core is P/Invoke free (but you can put a P/Invoke in your Boo-based library if you want). Boo is System.Reflection.* free as long as you do not use duck-typing. ...Show All
Visual C# Inherited interface properties behaving differently in VS2005
I’m upgrading a large project from VS2003 to VS2005, and have run into a change in the C# language behavior that I’m trying to explain. The following sample code works fine in VS2003, causes an infinite loop/stack overflow in VS2005. I'll grant that this design is evil (basically it is using explicit interface implementation to allow a property to behave differently depending on if it is called via the interface.). What I'm wondering is why the compiler's behavior has been changed, and whether there is any documentation on the change. Has anyone else run into this Thanks, Robert Just so this does not disappear into the ether ...I tested the code on 2005 and received the same results. I found the results interesting to say the least, if ...Show All
.NET Development Generic performance... benefit?
Hi, in every article about generics is written that they improve performance because no boxing, etc. occurs. So I wrote this simple test code and was astonished that the non generic part actually performs a couple milliseconds faster than the generic part About 59.8 seconds for the generic and 59.1 seconds for the non generic (avg. of 10 runs). Am I missing something here [code] using System; using System.Collections.Generic; using System.Text; using System.Xml; using System.Collections; namespace ConsoleApplication6 { class Program { static void Main(string[] args) { string s = ""; Test<string> test = new Test<string>("hi"); DateTime start = DateTime.Now; for (int j = 0; j < 1000000; j++) { foreac ...Show All
Visual Studio BUILD FAILED: Error adding missing documentation tags
Hi I'm trying to generate documentation for a multi-solution project I'm working on, and I keep getting the following error message: BUILD FAILED: Error adding missing documentation tags Objektreference not set to an instance of an object Here's my setup: Development environment: VB Express Sandcastle: September 2006 CTP Refresh SandCastle GUI: Eric Woodruffs GUI SandCastle Help File Builder (v1.3.1.1) The error is only generated if I switch on DocumentPrivates and/or DocumentInternals - if I leave these off, the documentation is generated Here's the snippet from the Output window showing the linies up to and including the error: Warning: Missing <summary> documentation for F:AD2LC.Hovedbrugerflade._ ...Show All
Visual Basic Building an OS.
I know this is Ironic, me posting something like this on my admired Microsoft site, but just for fun I'm going to do it anyways. I am a big visual basic fan, and so for FUN I've decided to design and build an x64 operating system via Visual Basic... the problem is I haven't the slightest clue on where to start with making a boot program and such. I know it is possible to create an operating system using Visual Basic and it would be very easy to program and continue to build. So with your help ill make a website for an open source OS where you guys can help me out, you can E-mail me at Aztecthorn@yahoo.com if we get deep into it... but otherwise ide like to post here for help :) I think the best you can hope for is to build an OS-like ...Show All
