Answer Questions
J M B Graphics.DrawImageUnscaled scaling image?
My goal here is to copy an image to a new, blank larger image without scaling. However, when I do this, the image gets scaled. I have no idea why this is happening, it happens whether I use Graphics.DrawImageUnscaled or Graphics.DrawImage. Below is sample code which reproduces the quirk on my machine (create a form with two pictureboxes, and add this code to the constructor, below InitializeComponent). I tried setting g.Transform to the identity matrix, and that didn't help. I get different results depending on what image file I use. Some are unchanged, some are enlarged and some end up bewing smaller. So, what am I doing wrong // Load The Bitmap Bitmap sourceImage = new Bitmap ( @"E:\Devel\CShapGameLib ...Show All
stellag Remove Empty tag from XML file
Hi All, I have a xml document which has one empty element. I want to remove/delete it using aspx page. e.g. Xml file is in this format <abc> <xyz> <efg/> </xyz> </abc> In the above exampele I want to remove <efg> tag It depents. You could do a simple string replace ( xml.Replace("<efg/>", "") ) or you could load it into an XmlDocument instance, get the node and remove it from the parent node and save the whole XmlDocument again. You can find empty elements with the XPath expression //*[not(node())], the remove the node with RemoveChild called on its parent node e.g. C# XmlDocument xmlD ...Show All
turkeytickler installing .net framework SP1 problem
I was just trying to install the sp1 for 1.1 on a media center pc and i need it because i want to connect to my 360.. Anyways, the message: (Microsoft Visual C++ Runtime Library runtime error! Program: C;/WINDOWS/system32/msiexec.exe This application has requested the Runtime to terminate in an unusal way. Please contact the application;s support team for more information) i have windows installer 3.1 and framewark 2.0 and 1.1 installed and it wont let me uninstall them either, same message comes up. Please can anyone help me Moving the thread to the .NET Framework Setup forum. srry, the site i used to get the tools is down or not working for some reason Hi, ...Show All
angelina DLookup with VB.NET?
Hello everyone, I'm trying to rewrite some old forms created with Access 2003 in VB.NET. However it seems that the DLookup function of VBA is not available in VB.NET, is there a new function that does the same thing I'm trying to get a single field value from an access database based off of a query to display in a text box. Here is an sample of the table I'm working with: Zip Min Cls L5C M5C M1M M2M M5M M10M 44076 6000 70 1145 916 688 573 412 358 44077 6000 70 1056 845 633 528 380 331 44078 6000 70 1056 845 633 528 380 331 44079 6000 70 1056 845 633 528 380 331 44080 6000 70 1145 916 688 573 412 358 44081 6000 70 1056 845 633 528 380 331 44085 6000 70 1100 881 660 551 397 343 44086 6000 70 1056 845 633 528 380 331 I'd like ...Show All
Armela XmlSerialize a System.Drawing.Font
Hi, I haven't used the XmlSerializer with any built-in types before, so maybe this is a common restriction... But are System.Drawing types possible to serialize When I try to serialize any System.Drawing type, I get a runtime error: Could not load file or assembly 'System.Drawing.XmlSerializers' I can't find any references to this assembly anywhere on the net. Is it something that hasn't been implemented in .NET yet.. Thanks, Jonas OK, thanks - and good link! Strange though, can't see anything in Font or Pen that would make them unserializable. I wonder if it was just overlooked by the Drawing team. I'll check if I can use my own XAML-style serializer to do the work. Edit: Ah, I forgot - font ...Show All
Rtalan SMTP Server Can't send out email
< %@import NameSpace="System.Web.Mail"%> <% Dim myMail As New MailMessage() myMail.From = " fromName@domain.com " myMail.To = " toName@domain.com " myMail.Subject = "eMail Testing" myMail.BodyFormat = MailFormat.Html myMail.Body = "<b>Hi,</b><p>eMail Tesing" SmtpMail.Send(myMail) %> in SMTP server, it is under C:\Inetpub\mailroot after I run the pgm, there is no error message, the email can't send to target email account, and the mail move to Badmail folder. Server Config: Window 2000 SP4 / .Net Framework 1.1 ...Show All
rwbogosian Stopping/Killing a windows service
I'm writting a watchdog application that will test a windows service on the same server. If the service does not respond with updated information I want to stop and start the service(this seems to take care of our problem); however, the service does not always stop in a decent manner and it seems that I need to kill the process. I have tried to implement process.kill(), but that doesn't seem to be doing the trick either. Is there another way in c# to kill/terminate this process Sorry, missed that one. However, TerminateProcess won't help you here. Process.Kill is just a wrapper around it. [ DllImport ( "kernel32.dll" , CharSet = CharSet . Auto , SetLastError = true )] public static extern ...Show All
WPF Fan problem with converting PDF to Xml
Joe thanks a lot for your early replay im trying to do this simply open the PDF document and I make it saved into as a .xml format. If the word like “first“ in pdf document ,its displaying like ” rst “. Where ever the fi,ff,ff,<,>, is their that symboles replaced with "box" symbol . here are the some of the examples what i am getting in xml: different -> "di erent" (a) changed into " a " changed into " " hid; 1i h=i hid; 2i h+i hid; 3i h_i h60i so please give me an idea to solve the problem Thanks, Ram krishna It seams that you have problem reading (decrypting) PDF file. You may contact Adobe for help in this or forums related to ...Show All
GAtkins We're not supposed to use List<T> ? ( List )
I installed FxCop and had it analyze my application. In several spots, it says: "Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection." I'm a bit weak in my OO.. so I'm not sure what "expose" really means in this context. Is this saying to not use List<T> ...Show All
Davids Learning Client not returning server cookie
Hi friends, During my server's communication with client, I add a cookie to the HTTP response. I also set the "Expires" property of cookie using cookie.Expires = DateTime .Now.AddDays(1); This used to work earlier but today I have seen that my client has stopped sending the cookie back to me in the same (TCP and HTTP) session. I saw that in the HTTP response from my server, the Max-Age info about the cookie was missing. Does that mean that the way I set the Expires property of cookie did not work I can't seem to figure whats the problem. Can anybody point out what could the possible problem be How can I ensure that I get the cookie back from client Thanks n Regards, Kunal Have you tried to exam ...Show All
Sean Connolly Using Regex/Match to find decimal Index location from RightToLeft.
I am trying to find the decimal index location from RightToLeft using Regex/Match. When the code below runs, I keep getting the index value from LeftToRight even though I specified RegexOptions .RightToLeft . What am I missing here Regex r = new Regex ( @"[.]" , RegexOptions .RightToLeft); Match m = r.Match(tbMainInput.Text); if (m.Success) { m.Index.ToString(); } Thanks for your help... Or : string test = "1.12" ; int index = test.Substring(test.LastIndexOf( "." ) + 1).ToString().Length; Console .WriteLine(index); sorry if this is not exactly what you wanted however wanted to suggest perhaps using the IndexOf('.') to obtain your decimal index string theSt ...Show All
Kanhaiya Second path fragment must not be a drive or UNC name.
Can someone help me with a bug in my code . I have the following lines: try { fileInfoz = directoryInfo.GetFiles( folderPath ); } catch ( Exception e) { throw new IOException ( e.Message , e ); } The GetFiles throws "System.ArgumentException" with the following message: Second path fragment must not be a drive or UNC name. Parameter name: path2 folderPath contains "X:\backup\code\Months\2006-09". (Pasted) folderPath contains no wierd characters as I have inspected it in hex. I can paste folderPath in a command window after 'dir' and it's ok. The directory exists and was created by the same user+program a little earlier. The directory contains NO files - just one directory I can ...Show All
Marcus J A 100 second timeout somewhere causing Unauthorized error
We have an ASP.NET application that calls a web service on another host. Normally everything works fine but if I wait 100 seconds between two calls to the web service I get an 401: Unauthorized error. If I just press F5 (when the error page appears) the page is displayed as it should so there is just not any authorization problem. Ive looked everywhere and nothing helps. What can be the problem What authentication methanism do you use for your web app and for your web service thx Hi Kirill Its the same for both: web.config: <authentication mode="Windows" /> <identity impersonate="true" /> IIS: Integrated Windows a ...Show All
softwarejaeger easy winsock question
I've been using visual basic for a few years but I just switched to .NET today, and I can not figure out how to add a winsock control, can someone help me Thanks. Thank you for the response. Can you detail some of the customizations you are referrencing above What particular feature of the control allows added customization that you cannot get using the System.Net APIs Please see: http://msdn2.microsoft.com/en-us/library/system.net.aspx System.Net is the core networking namespace in the .Net Framework class library. It provides a simple programming interface for many of the protocols used on networks today. Some of the many classes you may want to look into are: Socket, TCPClient, TCPListen ...Show All
Alok Thakkar Netgear Wireless adapters
I have a WiFi network comprising a Netgear router, a desktop and a laptop. A web service is set up on the desktop IIS. But when I try to add a web reference to a web application developed on the laptop to access the desktop web service, I get an error message : "The proxy settings on this computer are not configured correctly for Web discovery". The desktop and laptop both have the Windows XP firewall enabled. The internet browser LAN settings are not set to use a proxy server. What do I need to configure and on what machine Hi I had the same problem, what I did was in LAN settings uncheck all the check boxes, that worked for me. I'm having this same issue on W ...Show All
