Kamahl's Q&A profile
Visual Basic Most elegant way to check if a network connection is available
Hi, I'm looking for the most elegant way to check if a connection is available to an ftp site. For example, I would lie to check the status of the connection before running a routine. Regards HerbiNZ I want to Continues Ping a Host My system has 2 Network card When i use the If My.Computer.Network.IsAvailable Then if my.computer.network.ping("your.ftp.server") then me.oicstatus.image=pic_yes.image else me.oicstatus.image=pic_yes.image end if End If on a timers tick event My Application Hanges up and also it gives the Stats d ...Show All
Visual Studio 2008 (Pre-release) Unable to bind to Dependency property from within a DataTemplate?
Why is it not possible to bind to a Dependency property from within a DataTemplate I'm trying to size items in a data template based on the size of some other control. The following XAML illustrates what I want to do: <Page xmlns=" http://schemas.microsoft.com/winfx/avalon/2005 " xmlns:x=" http://schemas.microsoft.com/winfx/xaml/2005 " Title="Page3" > <Page.Resources> <XmlDataProvider x:Key="BookData" XPath="/Books"> <Books xmlns=""> <Book IS ...Show All
Windows Search Technologies How do i find the calendar / appointments for a contact in code...
Hello Could some1 please help. Thanks a lot in advance. I am trying to create a query to return calendar and or appointments related to a given contact. I have gone through the sample wds code and in the QueryBuilder.cs file at the very bottom in the /// <summary> /// A list of PerceivedTypes that can be passed to ExecuteQuery(query, type filter) /// </summary> public struct TypeFilter { we have this public static string Contact = "contact", Communications = "communications", Email = "communications/email", Calendar = "communications/calendar", IMChat = "commu ...Show All
Windows Forms VS Crashes upon exit
I've been having the following problem since B1 and I was hopping it would go away in B2 but it didn't. Here it goes: I have a control designer (Windows Forms Control) that makes a call to the following code from a Verb: internal static void ShowURL ( string url) { WebBrowser browser = new WebBrowser (); browser.Navigate(url, true ); } This works fine, a new browser is created, the pages is shown and everything is fine and dandy, that is untill I try to close Visual Studio, it seems that thebrowser object (even though the browser window was closed) is still alive. Is this a bug Can anybody suggest a workaround Frank ...Show All
SQL Server Accessing analysis services from asp.net application
I have an asp.net application. This application provide consolidated information to the user using Analysis Services 2005. Within it, one aspx page uses MDX query to retrieve the information from the cube. However, we are unable to access AS 2005 because of authentication issues. What would be the easier to implement and deploy scenario 1) Using kerberos 2) creating a webservice with some Identity to access AS 2005 and using an agent in the application; 3) some other mechanism. Has AS 2005 come up with some mechanism to allow easy access from web applications (just like sql server authentication in SQL 2005). Is there any feature that ...Show All
Visual Studio Tools for Office How to add vsto in visual studio 2005 professional edition
Hi, I am trying to import VSTO-2005 in visual studio 2005 professional. but not succeeded, I installed window xp-service pack 2 Office 2003 professional-service pack 2 visual studio 2005 Professional VSTO 2005-redistributable package VSTO-Run time but I didnt see the office template in my visual studio . Can I use VSTO-2005 with visual studio professional edition OR I have to install visual studio team system for using VSTO-2005 Please help me, Thanks in advance khurram You need to install the Microsoft Visual Studio 2005 Tools for the Microsoft Office. On MSDN the ISO filename ...Show All
Windows Forms Accessing SetStyle from Outside the Control
I am developing a two-dimensional game engine using the .NET framework, Managed DirectX(TM) and C#. I am currently working on the Device and Control (in this case a Form) manager and need public access to the SetStyle method. I was wondering why this method was not made public and instead was kept protected Are there any known work-arounds to getting at this method I am using a Direct3D Device and it is necessary to call SetStyle with the following parameters to stop the Background from being erased: ControlStyles .AllPaintingInWmPaint | ControlStyles .Opaque Obviously I can inherit the Control ...Show All
Visual Studio 2008 (Pre-release) SVCUTIL.EXE Error
I am trying to get a very basic WCF service to work using the helloworld example described at: http://windowscommunication.net/collateral/pages/howto.htm I've built it exactly according to the instructions at that location using exactly the same code. (The only modification I made was to run it on port 8080...if I try to run it on port 80 as the orginal code, I get an IIS error that says that port is being used by another application. Here's the code I'm using: [code language="c#" ] using System; using System.Collections.Generic; using System.Text; using System.ServiceModel; namespace HelloService { class Program ...Show All
Visual Basic Save/Open file
Hi, i'm currently writing a program for .... and i want to save the textbox values in a file, how can i do this simply in vb6 you only had to open (filename) as input #1 print#1 (var) close#1 How to in pocket pc 2003 thanks you Kevin If you were using these commands in VB6 and wanted to do the self same thing in .net on PC My.Computer.Filesystem.WriteAllText(Filename, var, false) or System.IO.File.WriteAllText(Path, Contents) would be the commands you could use. As to a pocket PC - I'm not sure that the my is supported - you may have to check it out but if y ...Show All
SQL Server Extracting month, day, year from dates
I need help in building a Select statement for an ODBC connection to an AS400 DB2 system. I am using this Select statement for SQL Reporting Services. Unfortunately 15 years ago one of the main datatables on the AS400 was set up splitting the transaction date into THREE FIELDS! One for Month, one for Day and then one for Year. I need to take yesterday's date and somehow use this in my WHERE statement to connect the transaction records that are in this AS400 table. This is what I have now that is not working: WHERE QS36F.BRDMST."BREED#" = QS36F.DOGOWNR.BRDCOD AND (QS36F.DOGOWNR.TMONTH = "MONTH"(GETDATE() ) AND ( ...Show All
Visual C++ Running unmanaged C++ program without framework
All I wanted to do was to write a simple console c++ app (for example hello world) and to be able to execute it on any other windows computer. I selected Win32 project and console application in the Create Project Wizard, added some code and built the app. It works fine on my computer, but I can't run it on a computer without framework. I am getting this error: "This application has failed to start because the application config is incorrect. Reinstalng the app. may fix this problem." Does anyone knows why You are probably missing the SxS binaries on the other machine and not the framework. Either ...Show All
Visual C++ /docDebug\' and '/clr:oldsyntax' not incompatible???
I tried to activate to "Generate XML documentation Files" option on a C++/Clr project and I reveived the following error: Command line error D8016 : '/docDebug\' and '/clr:oldsyntax' command-line options are incompatible I'm not sure I like this one. I can activate this option on a native C++ code but not on all the code I did with VS2003 in managed code Stephane Guerin Ok, I just did that. For reference it was added at : http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx feedbackid=281d024a-0e33-4fe8-a681-d8057d935198 ...Show All
Visual Studio Team System Chinese characters become "?" after using TFS source control
After using source control, I found chinese characters in source code become " " How to fix this problem Thanks! That shouldn't happen. What encoding are your files What does TFS think the encoding is (look in the Properties dialog or 'tf prop') ...Show All
Windows Forms Loop through checked items of CheckedListBox
For some reason I can't figure out how to do this. I want to creat a string based on the valuemembers of the checked items. How can I loop through and get the values I believe you can do this in a simpler manner, if you want. (Sorry, was offline most of the weekend). You should be able to modify the code to create your ...Show All
Visual C# How to choose Web service and remoting?
We are about to build an application in our LAN. Which is better Thanks Now you are in the same line, and if all application is based on .net, you can use remoting. else use web service ...Show All
