|
This is not answer but, this is what I have learned so far ( I'm still learning so don't take this as the end all answer in any way! )
Every control is a window.
suguimoto wrote: 2)
How can I enumarate all the controls in a window so that I can (for instance) press buttons, check radio buttons, read labels etc?!
So CallEnumChildWindows when you find the parent window. That will give you the handle you need. All controls are a window.
I have noticed that others say to use SendInput, while more say PostMessage. I like SendInput better, but it is was more complicated. You have to actually move the mouse around, send input, and other cool stuff. And, I'm still figuring it out.
If you use Spy++ you can locate your window in question and inspect what is there. Look for the item object name.
I have noticed that Tabs have a tab window with a panel.
I hope this has hepled you.
PS: TreeViews. I think you have to actually hook into thier callback functions to get the data. I tried a long time ago, and remember that since a treeview works on callbacks you have to do that. I could be wrong tho.
Nick
Nick
1 line of code equals many bugs. So don't write any!!
|
|
|
|
|
Thankss!!!!
Best Regards!
|
|
|
|
|
hi,
i am using Data access layer to populate the datagrid where i made certain columns as hidden, by using datakey property of gridview i can access first column which is hidden please tell me how to access other hidden columns value
thank you in advance!
sunny
|
|
|
|
|
use
Gridview1.datakeys[0]["Datakeyname"].tostring();
thank you guys,
sunny
|
|
|
|
|
hi all,
i am binding a datasource (access database) to datagridview.
i have a column which holds some values. and want to add a new row which will have two columns namely 'total' <text> and 'totalvalue' <sum of="" all="" values="" above="">.
how can i do this ?
any suggestion ?
thanks in advance, bye.
|
|
|
|
|
I haven't used DataGridView since we're using .NET 1.1 at work, but
if you have rows in your DGView with 1 column, I seriously doubt that you can add new rows containing 2 columns. Unless you can change existing 1 column rows into rows with 2 merged columns.
I'm only second guessing though.
-Larantz-
|
|
|
|
|
Hi,
can we start SQL Server Services programmatically in c#. if so how?
if anybody knows (or know about articles) then please let me to know.
Thanks in advance.
|
|
|
|
|
You can call "net start server-name" to start a service by using the Process class. It's not elegant but it should work..
|
|
|
|
|
Thanks Laubi,
i'll try it. but i need bit detail.
|
|
|
|
|
Just use the code from Paul Brower - this is the more elegant way I mentioned
|
|
|
|
|
private void CheckLocalDBService()
{
try
{
ServiceController[] services = ServiceController.GetServices() ;
foreach ( System.ServiceProcess.ServiceController cont in services)
{
if (cont.ServiceName.ToUpper().CompareTo("MSSQLSERVER") == 0)
{
if (cont.Status != ServiceControllerStatus.Running)
{
cont.Start() ;
cont.WaitForStatus(ServiceControllerStatus.Running,new TimeSpan(0,1,0)) ;
if (cont.Status == ServiceControllerStatus.Running)
{
//Service was successfully started
}
}
else
{
//Service was already running
}
}
}
}
catch
{}
}
|
|
|
|
|
Thanks alot Paul Brower,
and to all.
with Best regard,
|
|
|
|
|
To start/stop a service
MSDN
Sqlserveragent and Mssqlserver are two services you need to start.
|
|
|
|
|
hi all,
how can i sort data displayed in datagridview with respect to a specific column ?
let's say i want it to be sorted wrt 1.st column ?
help please ...
thanks, bye.
|
|
|
|
|
Mehmet Fatih Akbulut wrote: how can i sort data displayed in datagridview with respect to a specific column ?
Simply click on the (desired) column Header.
|
|
|
|
|
If you're using databinding, you can set the BindingSource.Sort member to the column you want to sort by.
|
|
|
|
|
i wnat to create a blue selection rectangle, i've tried to serch inside ControlPaint class but nothing.
Who can help me?
|
|
|
|
|
What exactly do you mean. Some blueish transparent thingie?
SolidBrush brush = new SolidBrush(Color.FromArgb(100, Color.Blue));
graphics.FillRectangle(brush, destRect);
graphics.DrawRectangle(Brushes.Black, destRect);
|
|
|
|
|
I have a string
I want to split it if it has more than one word
else I don't want to split it
Suggestions?
I don't know how to count the words in my string...
|
|
|
|
|
Hi,
Split the string from the blank spaces and store it into array.
Best Regards,
Apurva Kaushal
|
|
|
|
|
be care ful about:
Number of words = Number of blank space +1
ok
|
|
|
|
|
ofcourse
Best Regards,
Apurva Kaushal
|
|
|
|
|
i need help in these section, i uploaded a pdf file and converted it to a binary file and then
i want to encrypt the username and password string and embedding that to the excisting binary file what we have created from the
pdf formats
with regards
kannan
-- modified at 5:59 Thursday 1st June, 2006
|
|
|
|
|
Look into System.Security.Cryptography. All of the encryption algorithms are there. You may also want to search the forum for 'encrypting a string' to see an example of sending the data into a memory stream and running it through encryption.
|
|
|
|
|
Hi all,
When I use the following code in my C# Windows application, it works well.
File.WriteAllText(MapPath(@"softUser_log\log.txt"), "abcd");
But, I want to do the same thing in ASP.NET and I m hosting my files in a remote server "lunarpages" where they use PLESK. Now, When I execute the mentioned code, i dont see that
file has been created and written to it. Do I need to log in PLESK and manually change any permission ? If so, what is the permission should be. I was familiar with Linux and Unix where I used to set permission 777 to a Folder to create or delete file from it, 666 to a file to write on it. But in PLESK, i got very confused, becasuse in Permission area, i saw "user name, IIS domain...etc..etc.... "
Can anyone help me please,.
Thanks and regards
|
|
|
|