HWM's Q&A profile
.NET Development Delete a File on FTP Server
I try to delete a File form a FTp Server. The example from the MSDN page not work for me. Here My example: Dim reqUri As String reqUri = String .Format( "ftp://{0}:{1}/" , "ftp://xxx.xxx.xxx/transfer/delta/input/test" , 21) Dim req As FtpWebRequest = CType (WebRequest.Create(reqUri), FtpWebRequest) req.Credentials = New NetworkCredential( "ftpuser" , "ftp_pass" ) req = CType (WebRequest.Create(reqUri), FtpWebRequest) req.Method = WebRequestMethods.Ftp.DeleteFile Dim resp As FtpWebResponse = CType (req.GetResponse, FtpWebResponse) The error is: The remote name could not be resolved: 'ftp' Thanks ! ...Show All
.NET Development Inserting into two sql tables at the same time
Hi, I have two tables in my database, Orders and OrdersId and are laid out as following: Orders OrdersId ------- ---------- OrderId (comp key) OrderId (PK) LineId (comp key) RepId ProductCode CustId ProductPrice ProductQuantity The OrderId field in table OrdersId is the primary key, whereas the Orders table has a composite key (OrderId and LineId). I need to add a row of purchased item data data into both tables but am not sure how. I want the OrdersId table should be filled first as the OrderId field is also required in the other table, but how do I take the OrderId value and fill the the Orders table including this value ...Show All
Smart Device Development How can i turn on the screen backlight
How can i turn on the screen backlight from my application fter it was automatically turned off to save power. I use Windows Mobile 5.0 and writin in C# The SDK docs has a how-to on this here: http://msdn.microsoft.com/library/default.asp url=/library/en-us/mobilesdk5/html/mob5tskHowToProgramApplicationsToTurnSmartphoneBacklightOffOn.asp A managed sample can be found here: http://www.peterfoot.net/KeepYourSmartphoneBacklightOn.aspx http://www.peterfoot.net/TimeToTurnOutTheLights.aspx Michael ...Show All
Visual C# bool and objects
I have an collection of objects(arraylist)...in my list is want to check to see if properties within my arraylist have changed by using a _IsDirty flag...but i get an error saying cannot convert object to bool can anyone help me out here [code languge="C#"] for ( int x = 0; x < ArrayList.Count; x++) { if (Convert.ToBoolean(Arraylist[x]) == this ._IsDirty) { } [/code] how should this be yes that looks ok. A better way would be to use the Generic List<> collection as you don't have to do any casting as you are right now....the Generic List<> will hold a type of an object (Tracking.BusinessObjects.OrderLegDetail in this case) which means you don't need to do any casting and can ac ...Show All
SQL Server An internal error occured on the report server (rsInternalError)
hi, I have enabled custom authorization in SQL server 2005 reporting services. If i try to view the reports thru report manager by using the url http://localhost/reports then i'm getting the error message as "An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help Get Online Help The event log file is full" If i try to view the reports by using reportserver url http://localhost/reportserver then its working fine. Please help me in resolving this issue. The log file is as follows <Header> <Product>Microsoft SQL Server Reporting Services Version 9.00.1399.00</Product> <Locale>en-US< ...Show All
Visual Studio 2008 (Pre-release) how to change selection highlight color [at hover and selection]?
i don't know what i do wrong but i can't find a way to change the selection color from the standard system color to for example a linear gradient brush. My try which doesn't actually work as desired is the following: <Menu Width="30" HorizontalAlignment="Right" Background="White"> <MenuItem> <MenuItem.Style> <Style> <Style.Triggers> <Trigger Property="MenuItem.IsMouseOver" Value="true"> <Setter Property="MenuItem.Foreground" Value="White" /> <Setter Property="MenuItem.Background"> <Setter.Value> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <LinearGradientBrush.Grad ...Show All
Visual Studio Express Editions Cleaning up
I have a class that contains a looping thread checking for input from a socket. When my application closes I would like this class to stop the thread so the program exits cleanly. I managed to stop it cleanly in my main program by listening for the game.disposed event, but i would like the class to close itself internally when the rest of the program is being cleaned up. Show me the way someone... Keep a reference to the thread instance and call the Abort() method to stop it when your application is closing. Another way would be to have a bool in the class where the thread code is running in declared as volatile. Default the value of the bool is false and when the application is closing it gets set to true. In the thread you check ...Show All
Windows Forms Graphics: How to create smooth Clip region?
Hello, I am trying to create a graphic that looks like a donut. The outside of the donut is smooth, but the inner circle of the donut is not smooth. Question: How can I make the inner circle smooth Here is the sample code. Thanks for any suggestions: ' ' Create circle Dim myCircle As New Drawing2D.GraphicsPath myCircle.AddPie(80, 80, 80, 80, 0, 360) ' Create cutout Dim innerCircle As New Drawing2D.GraphicsPath innerCircle.AddPie(95, 95, 50, 50, 0, 360) Dim innerRegion As New Region(innerCircle) ' Display e.Graphics.SmoothingMode = SmoothingMode.AntiAlias e.Graphics.ExcludeClip(innerRegion) e.Graphics.FillPath( New SolidBrush(Color.Green), myCircle) ...Show All
Visual Studio error report while trying to add reference in visual studio.net 2005
Hello, I already have VS.NET 2003 in my laptop and i also have installed VS.NET 2005 . when i am trying to add a reference, and when i press the "Add reference" link, the visual studio, hangs for a second and then it exits and asks me whether i should send the error report or not and then exits. I am so unable to add any references. Any help or clue please Thanks, Praveen Please find the error information in the event logs.. It just gives me this information. there is no error number or any thing.. when i clicked on the links available in the message box in the event log also it is taking me nowhere... please find the messsages Faulting application devenv.exe, version 8.0.50727.42, stamp 4333e69 ...Show All
Visual Basic serialport regex match
Sometimes I feel so stupid. I am trying to import data from the serial port to my computer. The data will be coming from an alarm system via COM1. What I want to do is, as the data is coming in, capture a line with the word "ALARM" in it and write some text after that word to a textbox. Below is the simple code I am trying to use. If I pull the data in using textbox1.appendtext(serialport1.readexisting), it pulls all the data in fine. But, using the code below, I get the results: ** ***** ** ***** ** ***** ** ***** ** ***** Imports System.Text.RegularExpressions Public Class Form1 Dim strIncoming As String = "" Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Se ...Show All
Windows Live Developer Forums Pushpin Layer not updated
i'm trying to implement geotagging on my website that allow my blog reader to add themself to the map using pushpin. under my map i've several field for the users to key in their details then upon clicking the "add" button... their details will be appended to a georss xml file... and this step works fine as the details can be appended without problem... but when the page refreshes after my user hav clicked the "add" button... the details added are not shown... and even click "refresh" on IE wont help... all i got to do to get the newly added details shown is to close the current IE and re-request the page in a new IE... then all the pushpins(including the last pushpin added) can be shown... y is this problem occuring am i doing a ...Show All
.NET Development Compile a .NET 2.0 application as .NET 1.1
I'll start off by saying that I know almost nothing about .NET, so please use very small words. I'm not sure if I am posting this in the correct place, but I will be glad to move it if it doesn't belong here. If you are able to supply a solution, please be as detailed as possible. A very small, very simple C# .NET application was built on the 2.0 .NET framework. Well, .NET 2.0 has not been rolled out to the users that will have access to this program, so they are still using 1.1. These users do not have admin rights on their machines and cannot install the framework. How can I use Visual Studio 2005 to compile this application to work on computers that only have the 1.1 framework installed that is true. ...Show All
Windows Live Developer Forums Dragging contacts from live messenger to a .NET application
Basically, what I am trying to achieve is retrieve the contact information of a contact drag-dropped into my application. In version 7.5, the data was a simple string of the format : display_name <signin_name> in version 8.0 it seems the data is an object of some sort. does anyone know what type of obect that is, and what information is available when dragging a contact thanks! ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA - Microsoft lack of vision
Its real sad that Microsoft, once again, shows this lack of vision for a games development tool: 1: Get visual: Don't force users to write such a lot of code to do just very little. It reminds the Charles Petzold's "Hello Window" hell of code days. 2: Provide visual tools: Let users choose the components, change their properties and write just the required code for the events. 3: Quick development means quick prototype and minimum learning curve. XNA has a lot of things to learn. Definetively it is NOT for students and hobbists. We will have to wait until someone encapsulates XNA framework into a group of visual components, that can be easily drag & dropped, inspected and tested very easily without having to learn lots of n ...Show All
Visual Studio Express Editions how to modify a timer?
hi all, i found this simple timer on http://www.developer.com/lang/other/article.php/792901 5: using System; 6: using System.Timers; 7: 8: class myApp 9: { 10: public static void Main() 11: { 12: Timer myTimer = new Timer(); 13: myTimer.Elapsed += new ElapsedEventHandler( DisplayTimeEvent ); 14: myTimer.Interval = 1000; 15: myTimer.Start(); 16: 17: 18: 19: 20: 21: } 22: 23: pub ...Show All
