|
.ToUpper() does NOT mean the upper, or Shifted, character on the keyboard. It simply converts a string to its Upper Case equivalent (lower case, UPPER CASE.) There is no function that will convert your key code to whatever the Shift-keycode is.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do I start a service programatically? Is there a way to do it from the command prompt or in the service installer?
Thanks a lot,
Jim
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
|
Thanks, but how do I use that? I don't see a start command.
Thanks,
Jim
Did I post well? Rate it! Did I post badly? Rate that too!
|
|
|
|
|
try this:
this.serviceController1 = new System.ServiceProcess.ServiceController("place here the name of the service");
serviceController1.Start();
|
|
|
|
|
You didn't look very hard. ServiceController.Start Method[^] docs on MSDN.
ServiceController myService = new ServiceController(@"MyServiceName");
if ( (myService.Status.Equals(ServiceControllerStatus.Stopped) ) ||
( myService.Status.Equals(ServiceControllerStatus.StopPending) ) )
{
myService.Start();
}
else
{
Console.WriteLine("Service is already running...");
}
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello people,
i'm using the DAAB (Enterprise Library) to access the data in my system. But I need to use the schema from the tables i'm reading....
when I was using the default DataAdapter, I have used the FillSchema() method, but now, when I use de DAAB to fill de data, I couldn't get the primary keys columns, unique columns neither autoincrement columns...
This is the code that i'm using to get the data with DAAB:
===========================
Database db = DatabaseFactory.CreateDatabase();
DBCommandWrapper cmd = db.GetSqlStringCommandWrapper("SELECT * FROM Customer");
ds = db.ExecuteDataSet(cmd);
===========================
But this code don't return the schema from the "Customer" table.
Do you have any tip to do it?
thanks people
André
|
|
|
|
|
Hi all,
Is there any API to change the system locale ?
I need to write a C# application which takes LCID as input, and based on the LCID it should change the system locale.
Thanks
Mahesh
|
|
|
|
|
how about putting this into the main
CultureInfo ci = new CultureInfo("De-de");
Application.CurrentCulture = ci;
the constructor of the cultureinfo accepts both - a string for the region or the code as int
|
|
|
|
|
SharePoint provides options to create sites with different types of locales available out of the box. Suppose we have a SharePoint site built using the English locale and we want to change the existing site to some other locale then this can be achieved using the following piece of code. Changing the locale of the site helps display the date and number formats with their respective decimal and group separators.
http://www.mindfiresolutions.com/Changing-SharePoint-site-locale-programmatically-834.php[^]Cheers,
Eliza
|
|
|
|
|
Anybody have a component that can use C# to view Autocad file like zoom in, zoom out?
|
|
|
|
|
|
Hi,
I am trying to read data from an Excel spreadsheet cell by cell which contains data with which I want to perform string manipulation and then save to SQL srvr..all the data in the spreadsheet are of a string data type..
I have recieved some help from one of the members of this site who gave me some direction, but using VB.NET code...I want to specifically use C# for this task.
How do i open the .xls file in order to read data from it??
How do I read the data from the cell(s) in a specified worksheet??
and (if i need to) how do i close the .xls file??
any advice and help will be greatly appreciated.
Thanks a million..
Afzal Hassen
Afzal Hassen
|
|
|
|
|
How do I access the item from the drop down list when I click the button?
Chindiwo
Jnr. Programmer
-----
|
|
|
|
|
ComboBox.SelectedItem
mav
|
|
|
|
|
Mav this a good e.g of what I want to do
label1.Text = combobox.SelectedItme.
and if I do that, there's errors
Chindiwo
Programmer
-----
|
|
|
|
|
in this case just use:
label1.Text = combobox.SelectedText;
|
|
|
|
|
thanx for your time, but this is how it suppose to be.
label103.Text = IncomeCombo.SelectedItem.ToString();
Chindiwo
Programmer
-----
|
|
|
|
|
That's simple: label1.Text is of type string, combobox.SelectedItem is of type object, that's what the error most likely tells you.
Reading (and understanding!) the errors you get is the key to successful programming.
Convert the object to string by using ToString() for example.
Try:
if (combobox.SelectedItem != null)
label1.Text = combobox.SelectedItem.ToString(); Regards,
mav
|
|
|
|
|
thanx a lot man! It works!
Chindiwo
Programmer
-----
|
|
|
|
|
Hello,
I want to lock my data grid mouse events during row based operations.For example when I make an update operations on a row then I should not pass another row by clicking mouse.
How can I do this.Any idea?
Thanks
|
|
|
|
|
normally it should be enough to disable the control.
dataGrid1.Enabled=false;
this way no input reaches the control anymore
|
|
|
|
|
Hello,
I want to lock my data grid mouse events during row based operations.For example when I make an update operations on a row then I should not pass another row by clicking mouse.
How can I do this.Any idea?
Thanks
|
|
|
|
|
i have found the code here (http://www.codeproject.com/dotnet/CSharpWhiteboard.asp) ,but it only can be used by two users . unfortunately, i need one which can support many users (i know that it need a server ,and need to use SOCKET) .
how to finish it ??? need to help !
thanks !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
can u send me some useful things about it ?
my email------------- saxon_100@hotmail.com
help!!!help!!!
|
|
|
|
|
I feel compelled to explain that your method for asking for help probably isn't the most effective.
If I were to change the code I would probably change it to use a Message Oriented architecture.
-
Drew
|
|
|
|