|
What functions in the Windows API are you wanting to call?
|
|
|
|
|
I will get calling an windows api that another programmer at work is 'writing'? Should I ask her how to call the windows api?
|
|
|
|
|
Unless you are working for Microsoft, the other programmer is not writing a Windows API. And yes, you should ask her how her "API" should be called.
|
|
|
|
|
|
classy_dog wrote: Should I ask her how to call the windows api? Let's dub it the "Classy API"
using System.Windows.Forms;
using Microsoft.Win32;
using Classy;
using Classy.Dog;
using Classy.Core;
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I want to write a C# WPF application using visual studio 2010. I want to be able to allow the user to do the following:
1. enter some data,
2. select a file from a directory path,
3. error message will be displayed if the user enters wrong data,
4. the user will hit the submit button and call a windows api.
Thus can you tell me how to accomplish this goal?
|
|
|
|
|
Create a WPF project in Visual Studio. Write some code. Beyond that, it's up to you.
|
|
|
|
|
In addition to Pete's comments, if you head over to the articles section you will find plenty of good samples of Windows forms applications, and how to use the various controls. Alternatively look here[^] and here[^] on MSDN.
Use the best guess
|
|
|
|
|
|
I'm having the toughest time finding / figuring out how to get remote powershell working with 2012.
Currently this is my code:
private void OpenRunspace(string username, string password, ref Runspace remoteRunspace)
{
SecureString pass = new SecureString();
foreach (char c in password.ToCharArray())
{
pass.AppendChar(c);
}
PSCredential psc = new PSCredential(username, pass);
WSManConnectionInfo wmci = new WSManConnectionInfo(new Uri("http://" + ConfigurationManager.AppSettings["ExchangeServer"] + "/powershell"), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", psc);
wmci.AuthenticationMechanism = AuthenticationMechanism.Kerberos;
wmci.ProxyAuthentication = AuthenticationMechanism.Negotiate;
wmci.SkipCACheck = true;
wmci.SkipCNCheck = true;
remoteRunspace = RunspaceFactory.CreateRunspace(wmci);
}
The error I keep getting is "Access is denied". I've verified the credentials I am passign to it is part of the REmote Management Users group on that local server, ran the Set-User "Administrator" powershell enabled command in Exchange 2013
What else am I missing here?
|
|
|
|
|
Hi,
I have working C# winform application ,
I need access the database name userid,password in
variaus sysetems SQL Server's current DB Name UID, PWD
thanks,
Senthil Kumar
|
|
|
|
|
What is the exact problem? It is not really clear.
What have you tried, where are you stuck?
Please improve the question if you want us to help you.
|
|
|
|
|
My Question is How to change the connection string externally... i use a txt file and change the uid,pwd in client place... is there any other ways to set the sql DB,UID,Pwd
thanks
|
|
|
|
|
You can use the web.config or app.config files for that. They are accessed through the ConfigurationManager class.
They are XML based files and have several sections that ConfigurationManager can read. One of those sections is "ConncectionStrings" (or something similar.)
See here[^] and here[^] and here[^]
hope this helps.
|
|
|
|
|
You're going to have to be a lot more specific about what you're looking for. A database in SQL Server doesn't have a username and password. Even if it did, there's no way for you to get the password for any SQL Server account.
|
|
|
|
|
My Question is How to change the connection string externally... i use a txt file and change the uid,pwd in client place... is there any other ways to set the sql DB,UID,Pwd
thanks
|
|
|
|
|
A connection string is just a string of characters. If you need to change the userId and password used to connect to the database, just create your connection string and inclue easily replacable tabs where the username and password would normally go. Then it's just a very simple search and replace for those tags. For example:
Server=SomeSqlServer;Initial Catalog=SomeDatabase;Username={USERNAME};Password={PASSWORD}
Then you just replace the "{USERNAME}" and "{PASSWORD}" strings with their actual values:
string connString = configurationConnectionString.Replace("{USERNAME}", username).Replace("{PASSWORD}", password);
|
|
|
|
|
Hi,
I have a Windows Form application which connects to MySQL database.
In connection string, do you recommend to use the root as user or create a different user or have a separate MySQL user for every user in the company?
and does it make any difference in performance and security of my .NET WinForm application?
Technology News @ www.JassimRahma.com
|
|
|
|
|
We DO have a database-forum.
|
|
|
|
|
Using the root account for application access in any DB system is a very high security risk and doing so will probably get you fired as a developer.
Create an account in the DBMS specifically for your application to use and give it permissions to only the objects and accesses that it needs.
Does it make any difference in performance?? No. It's just an account that provides access to things.
Does it effect the security of your application?? No, but it DOES effect the security of the data you put in the database(s).
|
|
|
|
|
Jassim Rahma wrote: do you recommend to use the root as user
Definitely not.
Jassim Rahma wrote: or create a different user
Yes.
Jassim Rahma wrote: or have a separate MySQL user for every user in the company?
No.
|
|
|
|
|
Hi all,
I was just reading the following article Introduction to NUnit... and was introduced to Attributes.
I'm a noob so I've never seen this before or read about it. I understand that it allows you to define metadata within your program and so on...
My question is more so about format than understanding. I was wondering if I put in an attribute right above on function if that attribute is assigned to all functions below it until another attribute is reached.
For instance:
[SetUp]
public void init()
{
Person person = new Person();
}
public void foo()
{...}
Will the attribute [SetUp] be for both init and foo, or just init?
Thanks,
Jeramy
|
|
|
|
|
The [SetUp] attribute was placed above init - consequently, only the function init has that attribute.
By the way, with NUnit, you need a [TestFixture] above your class declarartion, a [TestFixtureSetUp] for the test setup method (if availbale), and a [Test] for every actual test method - the attributes differ between Microsoft Test and NUnit. You can use Visual NUnit for running your tests from Visual Studio (has some bugs, but it's still easier than using the NUnit GUI).
|
|
|
|
|
Hi all,
I am passing a string parameter to one of the method of web service.
This string parameter has /r and/n incorporated in it, but when value is passed to web service it removes /r from it.
Any reason why is it happening so.
Web service is created using .Net framework 1.1 and written in C# code.
I am trying to consume web service in an another application build using framework 1.1.
Rock Star
|
|
|
|
|
Do you have the source code of that web service?
Is it running on some OS where new lines are not \r\n but \n only? (Assuming that you actually meant \r and \n when you wrote /r and /n...)
|
|
|
|