LOTG's Q&A profile
Visual C# How to access the Windows Register?
Hello, what functions, controls or 'usings' do I need to talk to the Windows Register regards, Henk Hey great! I also found out that 'using Microsoft.Win32;' is needed to use the registry functions. Thanks (Bedankt) Henk ...Show All
Visual Basic Obtain day name passing a number
Hello. A question please. Is there a function that receives a number (0...6) and returns the day name Example: func(0) ===> Sunday func(1) ===> Monday Thanks... You can simplify your code Dim TheDate As Date = #1/14/2007# Dim dayString As String = [Enum] . GetName ( GetType ( System . DayOfWeek ), TheDate . DayOfWeek ) ...Show All
SQL Server Rows in Pages
Hi everyone, I have a simple question about Rows in Pages for you. In my opinion, rows are the storage of the data in databases. I would like to ask that there are any important properties of Rows which I am not aware. Thanks If you could please reformulate your question a bit more specifically, it would be easier to answer ;) Anyhow, as a first note let me say that in SQL pages are the phisical units of storage, while rows can be considered as logical units. Say, when you perform a query and process results in application, you think of rows, while when you are TUNING the query, you think about disk accesses, that is, page read/writes. ...Show All
Visual Studio Express Editions Adding to listveiw on another form?
I am making an application which has a parent and several children. I have benn using VB6 for years but the higher object coding is getting the best of me. I have a listbox on "form1" form and would like to add to it from another form "form2". I want to add to it when some serial data comes in. I have made a public property on the "form1" to add the value tothe listbox but it does not work. Any help would be awsome.. Here is the property that i call from "form2" to add to the listbox. Public Property Listbx1Add() Get End Get Set ( ByVal value) ListBox1.Items.Add(value ) End Set End Property You are right it will not w ...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
Windows Forms datagrid column headers fire the click event
VS 2003 I have a datagrid, and on the click event I process the selected row. You click the selector on the left side of the row. If you click any of the column headings, the click event fires for the row that currently has the focus. So if you are just trying to drag and re-size columns, it fires and process that row. I just want my code to execute if you click on the record selector to the left. How can this be done Thanks lol :-) yes :-P I love doing this stuff, helping out you guys succeed and making sure you get the best experience possible! Besides, I want to brush up my skills and show them off (if I do have any!) ;-) ...Show All
Visual Studio Tools for Office GetObject and Createobject fails with Outlook 2007 RTM
Hi, I have a VB.NET application (.net2.0). Running on Vista RTM with Visual Studio 2005 I have an application that used to do a GetObject(Class:= "Outlook.Application" ) and it always worked until I upgraded to Vista and office 2007. Now this used to work under XP Pro and Office 2007 BTR. Now all of a sudden I am getting the following error, and I cannot figure out why. --> System.Exception: Cannot create ActiveX component Any idea what I can do to get this going again Thanks, Ryk Hi Ryk The better place to ask this would be the Outlook programming newsgroup, especially as you're not using VSTO: http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.publ ...Show All
Smart Device Development Your own installation
How can i make my application use it's own installation Like this: *Click: setup* Alert: Are you sure you won't to install this program Install Don't Install: *Install* *first screen: Welcome to ***** [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[* *Second screen: where do you want to save the file * *third screen: Installing -----------------------------* *fourth screen: Thank you for installing this program* Why dont you want to use the CAB route If you want to write your own installer, it would be easy to do so - just write an executable which uncompresses the rest of the files and puts them in the right folders after displaying the right UI ...Show All
SQL Server Newb question
If I am using Ado.Net from a .Net Class library hosted outside SqlServer to do Sends and Receives do I have to use anything else other than queues The reason I am asking is because I already have an abstraction layer for a couple of our queueing systems and I was hoping to put SSB in there as well but the abstraction layers' primitive is the Queue not Conversation/Dialog/Service, etc. Thanks Costas Dialog conversations are persistent sessions between two services -- the initiator and the target service. When beginning a dialog, you must specify the initiator service in the from argument and the target service in the to argument. Even if you use dialogs for one-way messaging, you still need a 'from' servic ...Show All
Visual C++ Simulating Left Mouse Button Click
Hi, At the moment, I am running into a problem which is this: Every time I right-click on a TreeView item in my application, the selected item remains the item prior to right-clicking rather than changing to the right-clicked item. While this isn't exactly a BUG, it is quite an inconvenience. The most obvious solution to the problem, to me, is to simulate a left-button click in the right-click NM_RCLICK event that will in turn select the item prior to any further actions. Is there a better way to accomplish this If not, how can the left-click simulation be accomplished Thanks in advanced. ---Dan To simulate mouse clicks, you can use mouse_event and SendInput. However, I think it will be better to use ...Show All
Software Development for Windows Vista Truly Dynamic Runtime Activity Property Nirvana
I'd like to acheive "Truly Dynamic Runtime Activity Property Nirvana". My most critical custom workflow activity needs to expose a list of items that is not known at custom activity compile time. Each item in the list can be bound to from other activities - this is a pretty powerful concept for our workflow application that makes it very useful for end users that design their own workflows with my custom activity. I've figured out a solution where this dynamic custom activity is possible but it involves dynamically generating / compiling a brand new custom activity class on the fly - not the prettiest solution and I'm trying to create a better solution. Ghenadie has a neat example of how to create dynamic properties here ...Show All
Software Development for Windows Vista InvokeWebService-Return value
Hi, I am using InvokeWebService for web method that returns me a List<string> in the workflow class I have a property with the same type of List<string> who bind to the return value of the web method. but the object do not pass from WS to the workflow- and I get null exception at run time. I also tried to pass a collection of object that I wrote - this collection derive IEnumerable and ICollection and have a [Serializable] property- but I get the same error. with simple return variable like int its work fine am I missing something I need some help... Thanks, Dror (Happy New Year :-) &n ...Show All
Internet Explorer Development opening new tab in IE7 via IHTMLWindow2::open method. Possible?
hi i need to open new tab in IE7 from my extension code and to get an IHTMLWindow2*, pointing to this tab. Exactly tab, not a new window. Is it possible to do it via IHTMLWindow2::open method or are where any other ways to do it from extension I walked through some docs and forums and heard opinions that a place(new window or tab) in which IE7 opens pop-ups (as ones created by IHTMLWindow2::open) is controlled by user settings and extension can't change it Can't anyone tell is it so So sad if it is.... Than you in advance. Sharath Udupa - MSFT wrote: You could use IWebBrowser2::Navigate2 with navOpenInNewTab flag. But note you wont get the IWebBrowser2 (so eventually the IHTMLWindow2) o ...Show All
Visual C++ Help button get chm instead of hlp
I have a application built around a CPropertySheet derived class. The help button is looking for 'app.hlp' file (this is the default MFC stuff, I've not added anything other than moving the button). How do I get it to look for a 'app.chm' file instead I've tried the following using a test help file in InitInstance() //First free the string allocated by MFC at CWinApp startup. //The string is allocated before InitInstance is called. free((void*)m_pszHelpFilePath); //Change the name of the .HLP file. //The CWinApp destructor will free the memory. m_pszHelpFilePath=_tcsdup(_T("C:\\filezilla\\filezilla.chm")); EnableHtmlHelp(); but i just get "Failed to launch help" You need to ca ...Show All
Community Chat I can't believe most Windows users don't know how to use toolbars, OMG.
This is most irritating. Almost all of Windows users in my company don't know how toolbar works. They don't know they can enable toolbar, take out toolbar, customize toolbar, and not even the simplest of all, move toolbar around. Toolbar is so simple, standard, and flexible. And yet, they don't know how to use it. And now, I think that's the main reason why IE7 doesn't support moveable toolbar, and that pisses me off even more. Argh. Quite true, Hans. (this subject is a pet-peeve of mine, so I'm going to interject a few retorts... ): Users do not want or need to configure such things. Users want things to stay the same. Users don't actually mind learning how to do something as long as it ...Show All
