K.Kong's Q&A profile
Visual Studio Tools for Office KeyBindings
Hi All, I am trying to create a function that would retrieve all Macros and the short cut keys (or Hot Keys) assigned to the Macros using C# with VSTO 2005. Using VBScript is working fine: Private Sub Test() For Each objKey In KeyBindings With objKey If .KeyCategory = wdKeyCategoryMacro Then sCode = objKey.KeyCode sShortcut = KeyString(KeyCode:=sCode) sCommand = .Command MsgBox "sCommand = " & sCommand End If End With Next End Sub Not sure if there is a way to convert the above code to C# I have tried the following: ApplicationClass objApp = new ApplicationClass(); String iKeyCount = objApp.KeyBindings.Count; MessageBox.Show(iKeyCount.ToStrin ...Show All
Software Development for Windows Vista DirectShow Transform Filter
Is there a DirectShow Transform Filter that act as pass / not pass for samples ...Show All
Visual C# Text Box Display (Without building public interface)
Hi I have 2 window forms. First form has a text box and a CmdButton. My second form has one text box. Both the text boxes are in Public modifier. My first form will show as default. My goal is whenever I type anything on Textbox1 (form1) and press command button, my first form should be closed and second form should be on visible, on that time, the contents which I typed on the First form’s text box will appear on the text box of my second form. Like this public void BtnSend_Click( object sender, EventArgs e) { SecondForm SF = new SecondForm(); SF.AllowDrop=true; SF.TextBox1.Text = This.TextBox1.Text; This.close(); SF.show(); SF.TextBox1.Focus(); ...Show All
.NET Development .net & XML & .pdf & error
Gang: "There was an error opening this document. The file is damaged and could not be repaired." Has anybody had issue with not being able to open pdf in any browser using .net application The pdf is fine if use Adobe to read it; or just a browser, but not when combined with .net. This is probably related to dll hell with version 1.1 framework. If anybody has pointers, I'll be researching the issue. The pdf is accessed via datagrid HyperLinkColumn. It was working until recently. I'll be asking the network admin if has backup of application/bin/dll's. I am having the same problem. My application prompts the user to either open or save the pdf. Once it has been saved, after opening it, it comes ...Show All
Software Development for Windows Vista missing wlanapi.dll
hi all, recently i installed windows sdk.while running a sample application on wlan,an error message was displayed saying that wlanapi.dll was not found.can anyone please tell me where can i find it i have searched the installation folder of the sdk but i could not find it there. any kind of help will be welcome. thanks in advance Jyoti A quick google looks like it will get installed with wireless drivers (dlink etc) so a system that is not connected by a wire will be missing this DLL (eg my xp is wired to the wall so no DLL). Looks like Vista contains the DLL regardless as my vista test machine has a wire for lan conectivitiy. ...Show All
SQL Server Yet another licensing question
In order for my mirrors to be functional in the event of a failover, there are two other databases that must be up and running on the server. One of the db's is used for tracking accounting info and the other is used mainly for authentication. One of the two databases is merge replicated, otherwise the 2 databases are completely inactive until a mirror fails over. So, does this mean that I have to have a license for the 2nd server I'm not sure which database you are referring to as the second database. However, none of the databases on the server will be used unless a mirrored database fails over to it. So on the server will be several database mirrors plus 2 additional databases that are not in a stand ...Show All
Visual Basic IP Address control
i found on the MSDN library something called a IP Address Control but i cant find it in VB. i tried adding the control by right clicking the toolbox and "choose control..." but it isn't there. Hi, This refers to entering IP address numbers into 4 textBoxes in the range 0 to 255 ( obviously ) and is often seen on some where the focus automatically moves to the next textbox. Such as when you enter a product key on installing windows. See http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1084829&SiteID=1 for two methods of how to imitate doing this only alter all the 5's in the code to a 3. How you then deal with the 4 numbers entered as an IP address i ...Show All
Windows Live Developer Forums Messenger Plug Inn Question
Hi I wrote a plug in for messenger, it is very simple. It is compile ok, and i install in Messenger. All seems to be ok but it doesn't work. What's wrong I use strong name assemblie Thanks Here is the code: using System; using System.Collections.Generic; using System.Text; using Microsoft.Messenger; namespace AnswerMachine { public class AnswerMachineAddIn : IMessengerAddIn { public MessengerClient m_client; public void Initialize( MessengerClient client) { m_client = client; m_client.AddInProperties.FriendlyName = "Answer Machine" ; m_client.AddInProperties.PersonalStatusMessage = "Envia un mensaje" ; m_client.AddInProperties. ...Show All
Windows Forms How to iterate through Windows Forms list box
To find the selected items in a mulit-selection list box, I have tried foreach(ListItem item in myListBox.SelectedItems) but "ListItem" is not recognized. How can I identify each of the SelectedItems in order to extract their value Thanks in advance If you bind a datatable to the listbox, the items in the list are of the DataRowView type. To iterate through them you can use something like: foreach ( DataRowView rowView in listBox1.SelectedItems) { DataRow row = rowView.Row; //Process row... } If you're using typed datasets you can also cast rowView to a typed row... Andrej ...Show All
SQL Server locked out of sql server management studio
Hi everyone, I hope someone can help me here! A friend of mine set up a Windows 2003 Server for me in my home with Sql Server 2005. I'm developing a website for prospective employers to see the kinds of things I can program since I have no field-related work experience. I have a cool site up, but I can't showcase the any features that use sql server (which obviously, are the kinds of things employers want to see) because the login and password my friend remembers produces this error: Cannot connect to server. Additional information: An error has occurred while establishing a connection to the server. When connecting to sql server 2005, this failure may be caused by the fact that under the default settings sql server doesn't ...Show All
.NET Development Socket connection between two mobile devices
Hi, Has anyone tried to establish a socket connection between two mobile devices Is it possible Thanks Not tried it, I connected Mobile Device to PC works fine. And I'm sure Mobile device to Mobile device will also work the same way bacause .Net Compact framework supports litening socket. Why dont you give it a try Cheers ;-) ...Show All
SQL Server This expression doesn't work.
I'm trying to write an expression in a text box and the expression is as below. =IIF( Parameters!Days.Value >=0 and IsDate(Parameters!FromDate.Value)=True ,Format(DATEADD(DateInterval.Day,Cint(Parameters!Days.Value), Parameters!FromDate.Value ),"yyyy/MM/dd"),"") It works ok when Parameters!Days.Value >=0 and IsDate(Parameters!FromDate.Value)=True, but when Parameters!Days.Value =0 and Parameters!FromDate.Value is nothing (i.e. Parameters!FromDate.Value=""), it doesn't work and comes up with '#Error'. However, if I change the expression to the below, it works with the exact same parameters used in the above expression. it looks to me that RS doesn't want to deal with a tiny bit complexit ...Show All
Visual Studio Team System ValidationException: How to find out what field broke the validation ?
I've come accross this error multiple times and most of the time it is obvious what change in the WIT-definition has lead to this error, but sometimes the change was a long time ago and its hard to find out what may have caused the validation error. Is there any way to find out what field exactly has broken validation [WI] [Error, 1484, 32, 10:50:52.334] SvrEx: Microsoft.TeamFoundation.WorkItemTracking.Server.ValidationException: Forcing rollback ---> System.Data.SqlClient.SqlException: Forcing rollback at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClien ...Show All
Software Development for Windows Vista Problems with Vista
ive recently installed Vista Home Premium and of course there are problems. my goal here is to list a few of them and hopefully comeone will reply on how to fix them. 1. AVG Free Virus scan will not properly boot up on start-up 2. After PC loads up, a splash screen appears that says "This system is not authorized to run DISCover" (What is DISCover, and how can i make this go away/fix the problem. 3. When signed into my Windows Live Messenger account choose to see my emial the browser seems to auto-refresh the Windows Live Mail loading screen every 1second making it immposible to load and check my mail. Those are my three questions, help would be greatly appreciated. Thanks, Pat. (patovens@hotmail.com) ...Show All
Visual Studio 2008 (Pre-release) Save visual to jpeg
Hi, I'm trying to save my form's visual to a jpeg file, is this possible Any ideas how to do this Thanks Bruno Silva Yep, and I just found a post to it :S (must remember to search more next time :)) http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=136333&SiteID=1 ...Show All
