Sincerus's Q&A profile
Software Development for Windows Vista Running Domain Logon Script as Elevated
We make extensive use of domain logon scripts for many interesting and uninteresting purposes. Unfortunately some of the simplest, most innocuous, programs executed seem to require privilege elevation in Vista. This is absolutely no good for a trusted logon script run by hundreds of users every day which should require no user interaction. Does anyone know of a way to get a trusted domain logon script (and anything launched by it) to automatically "run elevated" in Vista It would be rather nice if this were a simple Group Policy option. UAP breaks a number of other user-run scripts of ours as well, but I guess it wo ...Show All
Smart Device Development custom DLL
Hello guys, i have developed a custom DLL which i need to use for my PPC 2003 SE application, where should i store the DLL in order to use it with the emulator and access it using DllImport Anywhere you'd like. Generally, DLLs should be bundled in the same directory as the application that consumes them. ...Show All
Windows Forms Sticky question
What's the best technique used to see all the events and the order in which they execute during the life of a winform carrying labels, textboxes, checkboxes, and dropdownlists, etc Thanks. Hi, Are you suggesting that Validating and Validated events never fire on a form That is the behavior I am getting as of now, even I Call Form.Validate() I can call ValidateChildren() and force all children to validate, but still Form.Validating and Form.Validate ...Show All
Windows Forms Problem of circular reference.
I have two simple WinForms each packed in an assembly(.dll). In each form, I has a button that will open and show the other form when clicked(simply produce a new instance). However, I am not allowed to add reference of the forms to each other in VS.Net because a message saying that circular reference is not allowed. How should I solve  ...Show All
Visual Studio Express Editions How do I create command line software that works in MS-DOS mode?
Hi, I was wondering why the console app that I made works in the MS-DOS prompt under Windows, but doesn't work under MS-DOS mode, when booting from an emergency disk. Any ideas Any application you make in Visual Basic Express requires the 2.0 .NET Framework which unfortunately is far too large to be able to run from most emergency disks. To add insult to injury though the framework also ties into Windows in such a way that some sort of Windows environment is required to run it, something else that would not easily fit on or be run from such a disk. ...Show All
Visual Basic Using XML in Comments
Hello...I am using a self-study book and in the latest chapter and code example, they use XML in their comments. The book doesn't explain why they start this. What purpose does this serve Without looking ahead in the book, I assume it could be for later use. Is that the main purpose of it Thanks, Brian Hey, What book is it Visual Studio 2005 uses XML comments for .NET 2.0 applications. This is great because the XML is automatically compiled into an XML file that exists with your DLL, and its like instant documentation. Brian ...Show All
Visual C# How to Pass (from any index of) Array in function
In C++, I can do: int array[]={0,1,2,3,4,5,6,7,8,9}; void PrintArray(int array[], int count) { for(int i=0; i<count; ++i) cout<<array [ i ] <<endl; } void Main(void) { PrintArray(array, 3); //Print 0 1 2 PrintArray(&array[5], 3); //Print 4 5 6 *****How to do that***** } My Question is How can I Pass "&array[5]" in C# C# tends to be more verbose than C++. It's annoying at first, but with intellisense it doesn't really make much different, and you end up gettind used to how things work. An example of something that's possible is: public static void Print<T>( IEnumerable<T> enumerable ) { f ...Show All
Visual Studio Express Editions Media Center Style
Hello, i want to know, if it's possible to build an application like the GUI of Media Center. Thanks In advance! I don't see why not (although I've never seen Media Center edition in any great detail) - how good it is depends on the amount of effort you want to put in. Just like most other interfaces, there isn't a 'native' functionality to do so ( mediaCenterStyle = True doesn't appear to exist). ...Show All
SQL Server Reading and writing same variable to a script
It looks like its not possible to both read and write the same variable from a script using the conventional Me.Variables.<variable> syntax. I can only assign a variable as Readonly or ReadWrite and not both. If I assign it ReadOnly I can only access it in the PreExecute subroutine. If I assign it ReadWrite I can only access it in the PostExecute subroutine (in fact doesn't this just make it WriteOnly in fact ). So I can only either read in or read out a variable using this syntax, noth both. Is this right So the read and write a variable to a script, the VariableDispenser approach is the only option to use. Is this right and is ...Show All
Visual Studio Tools for Office ListObject behavior in Excel
How does the ListObject behaves in Excel when its databinding is changed. I mean if it is placed over a range and when the binding changes the format of the cells changes too. Is there a way to preserve the cells format over which the ListObject is placed Unfortunately, when you change the databinding on a ListObject using VSTO, the cell formatting gets reset. There is no way around this that I know of, so you will have to format the cells of the list after you bind it to a Data Source. ...Show All
Visual C++ How to convert string object to char array?
Hello, I am writing MFC program. There is a string object that needs to give its content as char [] array. Is there anyway to extract string object as char Array Thanks, vcboy Hi, if you're talking about the string from the STL then all you have to do is call the c_str() method that returns a pointer to the first char in the string: std::string str("test string"); char* s = str.c_str(); if you want to copy the string to a char [] then follow the same procedure: std::string str("test string"); char* s = new char[str.length]; strcpy(s, str.c_str()); ...Show All
Visual Studio Team System Installation error : "...error occurred during the login process..."
Hello, I have selected SQL Server and Windows Authentication Mode and the Login properties ->Status section for the new SQL login is set to "Enable". I work with Windows 2003 Server (without domain), SQL Server 2005 during installation of TFS i get the following error in "msi log file": ================= Is WSS Installed : True ConfigDBName : Not Available ConfigDBServer : Not Available Virtual Server State: NeedExtend AdminApPoolName: StsAdminAppPool VSApPoolName: Not Available AdminPort: 10885 ContentDBName: Not Available ContentDBServer: Not Available ====================================================== ...Show All
Visual Basic Changing the connection string of a QueriesTableAdapter at Runtime
Hi Guys, Is it possible to change the connection string of a QueriesTableAdapter at Runtime I figured out how to change the connection string of a normal table adapter by changing the ConnectionModifier to public but the QueriesTableAdapter doesn't seem to have this option. Any ideas Thanks Woody Hello Woody You can add this as a seperate class file . Add a new class file thru Add->New item(Class.vb) dialog . TableAdapters are in a different namespace . You can just add the code from my previous post . Hope this helps . Thanks Sunder vb.net ...Show All
Visual Studio Tools for Office Action Pane Holder Customization
Hello, I woner if there's any way to customize appearance of the ActionPanel (I'm using Word app as my app's GUI) By default the 'dropdown menu' at the top shows a list of actions - Getting Started, Help, .. Document Actions (if any) etc. What I'm looking for is: 1. Restrict access to anything except of Document Actions (I dont' want users to have access to XML Structure etc. which comes by default). 2. Hide navigation buttons (Back, Fwd, Home) at the top as they'll become meaningless. 3. Possibly provide access to the different views of my Win Control, hosted by Action Panel by introducing my own dropdown menu items. I can do it through the ...Show All
Visual Basic Reading registry keys with a name of (Default)
Trying to read a registry key that has a name and a value associated with it. However, the value name doesn't have a name, per say, but it does have a name of (Default). I hope I'm putting that in clear terms. Anyway, the following lines of code return a value of Nothing. Dim ReadValue As Object = My .Computer.Registry.GetValue _ ( " RegKeyName " , " (Default) " , Nothing ) 'Try to use "(Default)" for the name. However, if I pass empty quotes, as the ValueName, it returns the correct value for the value name. Believe me - as a rookie I spent quite alot of time before even thinking of try ...Show All
