Shaun Bowe's Q&A profile
Visual C# How can I get the length of a remote file??
How can I get the length of a remote file For example, the url is www.abc.com/abc.rar , I want to know the length(bytes) of the file abc.rar, how to do that You would say just download it, clearly I don't like that way. Any help will be appreciated! This worked for me private int GetFileSize(String url) { try { Uri Url = new Uri(url); // Create a 'HttpWebrequest' object with the specified Uri. HttpWebRequest myHttpWebRequest = (HttpWebRequest)WebRequest.Create(Url); // Send the 'HttpWebRequest' and wait for response. HttpWebResponse myHttpWebResponse = (HttpWebResponse)myHttpWebRequest.GetResponse(); // Release resources of response object. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Ann: A "Proper" Text Rendering Component
Hi! I'm just in the process of writing a proper text rendering component for XNA. It fully integrates into the content pipeline and can import any TrueType font during compile time. Just like any other XNA framework content, an .xnb file is generated from the font which can at runtime be loaded by XNA's ContentManager, eg. BitmapFont myFont = this .content.load< BitmapFont >( "Content/Fonts/Arial" ); // ... this . myFont.drawText( new Vector2 (100.0f, 100.0f), "Hello World" , Color .White ); The component is still in development and there will likely be some changes in its interface, but it's already fully usable. If you want to give it a go, you can find the component here: http://www.nuclex.org/fra ...Show All
SQL Server When is SQL 2005 SP2 available?
I have seen a few KB-articles about SQL 2005 SP2 at support.microsoft.com, but I cannot find the download. Is it available If not, when will it be available Best regards Niklas Engfelt Niklas, I do not believe that a public statement about the RTM availability of SP2 for SQL Server 2005 has been released. However, I did find mention of the CTP2 release of SP2 located here: https://forums.microsoft.com/MSDN/ShowPost.aspx PostID=760644&SiteID=1 Based on that announcement, it can be assumed that the RTM version SP2 is still under development and is not yet available for public download. ...Show All
Visual C# Using 3rd party dll
Do you know why whenever Delvis uses a third party dll, Delvis always get teh following error: static void main(){ ...... Application.Run(new Form1()); // ERROR } ERROR= "Could not load file or assembly "dllname" version = 1.4.0.1.1.111, culture=neuitral, publickey token =d8273827d872838 or one of its dependencies File can not be found" Explanition : dllname is the name of the dll used, version number above is just an example culture=neutral is quoted exactly publickey token="above": is an example series ofnumber All others are exactly repeated Hint: dllname is dotnetCharting and C#Express is being generously used due to its freeness and that Delvis doesn't have much money to afford expensive softw ...Show All
Visual Studio Team System Determine if there is a label already applied to the latest version
Is there an easy way to determine if there is already a label applied to the latest version Thanks for the info. It's good that there is a way to accomplish the task, I just hesitate to tell our developers about this solution because it exposes deficiencies in the product when compared to VSS. Don't get me wrong, I absolutely love VSTS but I do hope that future releases to the product (especially the Team Foundation Server and client) are released on a more regular basis. ...Show All
Windows Forms Threading, Invoke, Control Creation and other horrors...
Ok, where to start... I basically have the main thread handling the forms (user interface), then I have a System.Threading.Thread running in the background doing some calculations. I have a main form, then a secondary form that is displayed after the calculations are done (showing the results). The secondary form is shown from the calculation thread rather than the main thread, thus the need for an invoke as shown below (aren't there any proper code tags here ). Should work fine, however when called I get the invalidoperation-exception telling me cross-thread operations are made. It seems like the actual form is properly created in the main thread (as it should) however some (all ) of its controls are created in the calculations thre ...Show All
SQL Server Iterating the rows of a script component
Hi There, Can someone please let me know what is the best way to iterate the output rows of a script component and stick in those ids in a where clause of a select query (to retrieve additional info from a database) Is this possible at all If not, what is the best way to deal with this situation Thanks a lot!! Sam_res03 wrote: Hi There, Can someone please let me know what is the best way to iterate the output rows of a script component and stick in those ids in a where clause of a select query (to retrieve additional info from a database) Is this possible at all If not, what is the best way to deal with this situation Thanks a lot!! Any particular reason you aren't posting in your other thread on this topic Th ...Show All
Software Development for Windows Vista working of a keyboard !
i want to know how keyboard/mouse interact with the system how any instruction is get executed by the system whenever any key is pressed in mouse/keyboard e.g. when we pressed 'a' key in the keyboard then exactly what happens in the system how system execute that instruction i think my question is clear to you , please give ans of my query n if any doubt in question then ask your welcome. thank you Hi Sentient, No , my Keyboard is working properly . actually i m trying to make a new input device to operate the system in place of keyboard/mouse. for that what i hav to do with my system if i want to make another device for operating a system. in which language this can be implement plz reply as soon as possible ...Show All
Windows Forms Unsure of code sequence with MyBase call on inherited control when overriding methods
Hello all, I have a control which inherits from Forms.Button and I am overriding the OnClick method. I am not sure which of the following is the correct sequence, can someone please enlighten me Thanks in advance for any ideas and/or suggestions! CODE ' Option 1 Protected Overrides Sub OnClick(ByVal e As System.EventArgs) MyBase.OnClick(e) ' My additional code here End Sub 'On Click CODE ' Option 2 Protected Overrides Sub OnClick(ByVal e As System.EventArgs) ' My additional code here MyBase.OnClick(e) End Sub 'On Click It depends. MyBase.OnClick() will generate the Click event which a form may handle. You'd have to try to guess what your control's user may write in this handler ...Show All
Software Development for Windows Vista BugCheck 0xFE, {8, 6, 5, 9445a000} ,
Hi: I got a dump file with BugCheck 0xFE, {8, 6, 5, 9445a000}. But there is no description about 0xFE{8,....} in DDK. Does anyone know how to get relative documents Best regards ...Show All
SQL Server Delete record from table over 5000 count.
Hi, I want to delete from table when the record count is over 5000. That is, the table's record cannot over 5000 count. How row_number() seem to be used... remedios_ wrote: Right! The table doesn't have any key column. A column doesn't have to be a "key" column to have an index built on it. ...Show All
.NET Development ArgumentException in WriteXml
Hi, I'm getting problems when try to create a XML file. It's throwing a System.ArgumentException with the message "The surrogate pair is invalid". I think that it's a bug of XML classes of Framework Class Library, because I tried all possible ways to write this file (I used all possible classes: from DataSet, with XmlDocument). Please, could someone help me Thanks Francisco Amaral Are you using the WriteSurrogateCharEntity method on XmlWriter if so are you makeing sure the first character is between 0xDC00 - 0xDFFF and the second character is between 0xD800 - 0xDBFF If not you will get this error. ...Show All
Windows Forms TreeView doesn't cancel user check
Hi, I have a tree view which holds directories and the state if the content is installed or not. The user should not change the state of the CheckBox - this is done by code. But if the user clicks quick enough (first double click is the encounter of this behaviour) the checkbox changes its state. This is my code to test that: private void tvDirectories_BeforeCheck(object sender, TreeViewCancelEventArgs e) { e.Cancel = true; } With this code - I cannot set the checkbox with code. But the user can that (after first double click). What's wrong with this code Thanks in advance. This is documented behavior of the .NET ListView control. It is on the "to fix" list but without a ETA ...Show All
Windows Forms How to trap keyboard event. like Esc and Delete etc.
in my case , i want the same ability like in VS IDE which is when on design surface, select a control and then press ESC ,the Selection Control will turn to it's parent control. i trying to add the messageFilter to handle the key event . but it will trap all key events in the application. Apperently this not meet my requirement, i just want the design surface handle the message. i have tried to handle Message Loop as well it doesn't work ; for example: System.Windows.Forms.Application.AddMessageFilter(_msgFilter); ...... public class MessageFilter:IMessageFilter { private BaseForm _owner; private const int WM_KEYDOWN = 0x0100; private const int WM_RBUTTONDOWN = 0x0204; public MessageFilter(BaseForm owner) { this._o ...Show All
Visual Studio Please fix Source.GetEntryAttributes in MPF
I don't know if it has already been addressed internally, but Source.GetEntryAttributes is the source of a raised exception, when the local variable `member' is null. The call to GetMember returns null on an account that the argument `entry' is -1, passed from native code. The exception is raised because of the call: member != null This calls DropDownMember's != operator evaluation, which calls == and tries to execute return m1.Equals(m2); As both `'m1' and `m2' are null, this fails. Thanks, Paul. Hello: I can confirm this bug. I have experience the same problem. During the inicialization of an editor, GetEntryAttributes() is called before any call to OnSynchronizeDropdowns() (containing my have ...Show All
