eldiener's Q&A profile
.NET Development ProcessStartInfo to execute vb script with certain user
I tried to use ProcessStartInfo to execute a vb script with certain user name. My Code: --------- ProcessStartInfo psi = new ProcessStartInfo(); psi.FileName = fileName; psi.UserName = userName; psi.Password = password; psi.Domain = domain; psi.UseShellExecute = true; Process.Start(psi); The Problem: ---------------- When I set UseShellExecute to true --> the error is "The Process object must have the UseShellExecute property set to false in order to start a process as a user." When I set UseShellExecute to false --> the error is "The specified executable is not a valid Win32 application." Any Help please Bishoy I discovered the runas command in command p ...Show All
Visual C# code snippets
From what I've read, C#'s static modifier should work just like Java. So, I created a utilities class which has a public static method to do some things. The utilities class is declared within the same namespace as my form class (just in a separate file), but if I attempt to access the method in the utilities class from the form class, the compiler complains that the name of the utility method or the class (if I attempt to use the FQN of the method) does not exist in the current context. If I attempt to add a "using MyNamespace.Utilities" statement at the top (which I fully expect to be redundant) the compiler also complains that the "Utilities" type or name does not exist in "MyNamespace". Any suggestions are most welcome! According to wr ...Show All
Visual Basic VB.NET UserControl used in VB6 application
Hi. I build in VB Net 2005 an usercontrol that contains a toolstrip.On this toolstrip I add in runtime 9 toolstripbuttons.The code in which I add those buttons is: Public Sub AddButtonsOnToolbar(ByVal intNob As Integer) Dim tsButtons(8) As ToolStripButton For i = 0 To 8 tsButtons(i) = New ToolStripButton tsButtons(i).Tag = i tsButtons(i).Image = System.Drawing.Image.FromFile("D:\Work\Controale_Espot\Pictures\01.gif") tsButtons(i).AutoSize = False tsButtons(i).Size = New Size(48, 48) tsButtons(i).ImageScaling = ToolStripItemImageScaling.SizeToFit If i = 0 Then tsButtons(i).Margin = New Padding(80, 5, 0, 2) Else tsButtons(i).Margin = New Padding(10, 5, 0, 2) ...Show All
Visual C++ Calling C# DLL from C++ CLR console application.
Wow, I can't imagine I can't do this simple thing. I have a C# Class with public constructor which expects a String parameter. It is packaged in a DLL. I have a VC++ CLR console application and I want to instantiate that class. Below is my C++ code String ^text = gcnew String(bptr); Gateway gateway = gcnew Gateway(text); // this class is from the C# DLL Hey, when I compiled, I got this error. Error 1 error C2664: 'PrintGateway::Gateway::Gateway(System::String ^)' : cannot convert parameter 1 from 'PrintGateway::Gateway ^' to 'System::String ^' e:\SAP\TestC\TestC\TestC.cpp 48 What could be wrong Please advice me. Urgent and I will reward you. Thanks and best regards cl408e w ...Show All
Visual C++ Convert char* to wchar_t*
I'm developing a C program. I want to convert char string to wchar_t string. I know there is a function in the C99. But I don't want to use that. Is there is a function in the win32 api to do this Viorel. wrote: (I do not think modern conversion macros always allocate the strings on the stack. Only short results are kept on stack into a pre-allocated buffer. In my opinion longer strings are allocated on the heap, in the same manner as it is done today in case of std::string class.) in vain: For 2005: #define A2W(lpa) (\ ((_lpa = lpa) == NULL) NULL : (\ _convert = (lstrlenA(_lpa)+1),\ (INT_MAX/2<_convert) NULL : \ ATLA2WHELPER((LPWSTR) alloca (_convert* sizeof (WCHAR)), _lpa, _con ...Show All
Windows Forms Customized PropertyGrid
Hello, I need to wrap the user-entered text in one of the propertyGrid rows and resize the height of that row to make all user-entered text visible. Can someone suggest the way to do it Thank you. ...Show All
Visual Basic variables in reports.
How can i use my program variables in a report. all efforts so far have been useless. I have tried using a text box and programing in the variable, but it doesn't work. example: TextBox1.text = Tm(0,0) (which is a persons name and age) and is declared as a public variable in attached module. It is used extensively in various parts of the program with no problems, but the report form doesn't recognize it. Hi, You could either put ALL of your variable declarations in a CLASS definition OR immediately after the> Windows Form Designer Generated Code region put in all your variables in Dim statements before any code for any Sub. That way the variables are seen as "GLOBAL" within your project / solution ...Show All
SharePoint Products and Technologies How are you gnerating application definitions?
Hello All, I am just cusrious to know how are you guys generating your application definitions in BDC by hand or using one of the tools out there to auto generate that scary XML file I am unable to find a tool which gives me the ability to include stored procedures in my app def instead of pure tables or views Any help would be appreciated. Thanks a lot Frank, My take on this is 1) Microsoft have always stated that there is a significant market for partners to develop value added tools for the MOSS platform. BDCMetaMan is one example. What they have done is provide a very good import routine that will identify exactly where in the XML you have problems. 2) If you create a lot of BDC meta ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Big Help and FAQ Post, also contains code to render 2D and 3D lines
Hi everyone. I read through many posts here in the board and I collected quite a bit of resources about the XNA Framework and collected everything in one big monster post on my blog. It contains tips how to get XNA working on 64 bit, how to get it working with VS 2005, many blogs and articles and a lot of personal questions and answers about XNA (fonts, sounds, music, mouse cursor, keyboard text, drawing lines in 2d and 3d, Shaders and debugging and many more issuses). Link to the full article on my blog abi.exdream.com . I hope this helps :) Sorry, I kind of forgot about this. I didn't think I phrased what I said too well. (That'll teach me to post early in the morning. I'm not properly awake till noon.) What I meant was that it ...Show All
Windows Forms Version property for MSI Files
Hi, We have created a deployment MSI package and when i right click and click on properties i see only "General" and "Security" tabs. How do i include "Version" tab that would have my product version We are using Visual Studio.NET deployment projects to create the MSI file. Thanks, Kris Phil, Sorry i guess i didn't put my question right. Well after building the deployment project we get a setup.exe and an application MSI file. I was talking about that , how do we also add a version tab to the created MSI file properties that will contain the version information. Is it possible someway to edit through ORCA and enable this feature Thanks, Kris ...Show All
Visual Studio Team System Can't Create New Projects - Help Please?
Hi, I'm running a 180 Day Trial of Visual Studio Team Foundation Server, and it's been sitting quite happily for a while. Stupidly, I carried out a DCPromo, whereupon it deleted all the local machine accounts and everything stopped. Realising how bad an idea this was, I've demoted the machine, and recreated all the user accounts and groups. It all works again, with the exception of the Reporting Services section. I can't create new Projects either, I get this error when trying to create them: Error TF30004: The New Team Project Wizard encountered an unexpected error while initializing the Microsoft.ProjectCreationWizard.Reporting plug-in. Explanation TF30171: The Microsoft.ProjectCreationWizard.Reporting ...Show All
Software Development for Windows Vista UI: 16 bit vs 32 bit color, Photoshop & "windows vista basic"
Hi all, One important questions that I am not even sure how to ask, so I will describe. I can get Photoshop cs2 to work if I put the display (lcd) in 16 bit color mode or change the mode to "windows vista basic" insetead of Aero. Photoshop and some other "legacy" programs do not display correctly but kind of work. The menu text is blurry, eg, the mouse will not paint correctly unless I change the mode. Then Photoshop works and looks fine. I am using a an Nvidia 7800 gs and the problem was with both Beta 2 and RC1. I was hoping... I am not sure if it is the card/driver Photoshop or Vista. I have looked for answers quite a bit. Any thoughts ...Show All
SQL Server Tracking table changes on SQL server ce without using RDA?
Hi, Can anybody let me know if there are ways to programatically track changes made to a SQL SERVER CE table I am writing a db monitoring tool on SQL server CE which should track any changes made to the table.(Insert update and delete) We could have done this using triggers on Sql Server 2005. Since triggers are not supported on SQL Server CE, are there any alternate ways to achieve this functionality Regards, Ananth Have you considered merge replication, which does exactly that for you. If that is not an option, then you would have to implement this manually through your Data Access Layer code, as there are no other ways to do this (other than merge replication/rda) ...Show All
SQL Server Please help: object reference not set to an instance of an object
I have created a new local website from the "Personal Web Site Starter Kit" template. I got an error message when i double click on the database file: "Object reference not set to an instance of an object." I cannot open Personal.mdf in VS2005. I have not tuch anything. SQL Server 2005 Express is running in bacground. What is wrong This sounds like something is not registered correctly in Visual Studio. The ASP.net forums is a better place to ask questions about ASP.net and Visual Web Developer. You can find all the forums at http://forums.asp.net/ and the forum that is specifically about SQL Express in VWD at http://forums.asp.net/54/ShowForum.aspx . Mike ...Show All
Windows Forms Resources.resx
I can't seem to find any information on how to use the Resources.resx file. I basically want to be able to store path data and connection strings in the file so that I can change them easily when I run my app on the live system, I thought the Resources.resx file would be my best option for this. Does anyone have any info on how to use this with C# Thanks, Russ OmegaMan is correct. If you want to be able to configure your application after you have deployed it, you want to use settings and not resource. In addition do OmegaMan's link, there is also an article here: http://msdn.microsoft.com/vcsharp/default.aspx pull=/library/en-us/dnvs05/html/settingscs_rl.asp Best regards, Johan Stenberg ...Show All
