|
Not getting your question.
we can justice with your question when you did first.
|
|
|
|
|
well,
what i'm realy doing is writing an application for controling a Lync client.
I am using the Lync client SDK,
i was able to do all the actions that i wanted, except turning the camera on and off.
So i wondered if there is any way to do it from my application when i have the device ID.
Thanks
|
|
|
|
|
Hello Friends,
Can anyone out there let me know the maximum no of rows and columns excel in all excel versions like 10.0, 11.0 and 12.0?
Thanks
Varun
|
|
|
|
|
This[^] or this[^] might help.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Thanks Abhinav, I by mistake voted the answer bad sorry for that
|
|
|
|
|
you can easily fix that by voting again, it'll replace your previous vote.
|
|
|
|
|
Varun Sareen wrote: Thanks Abhinav, I by mistake voted the answer bad sorry for that
No problem. Things appear to be fixed now.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
|
|
|
Varun Sareen wrote: Thanks dear
you are welcome.
|
|
|
|
|
I need an activeX which handles global hotkey: Shift+b
The code below is supposed to do this when I call this ActiveX from IE.
I see the result of RegisterHotKey is true which means that the hotkey has been registered Ok.
But I don't see that any messages come to the ThreadPreprocessMessage method.... why????
Please help.
Thank you
namespace Kosmala.Michal.ActiveXTest{
public class ActiveXObject : NativeWindow, IDisposable {
public const int WM_HOTKEY = 0x0312;
private IntPtr pFoundWindow ;
public ActiveXObject(){
System.Windows.MessageBox.Show("constructor<<");
Process[] processes = Process.GetProcessesByName("iexplore");
foreach (Process p in processes){
pFoundWindow = p.MainWindowHandle;
}
System.Windows.MessageBox.Show("pFoundWindow:" + pFoundWindow);
SetupHotKey(pFoundWindow);
ComponentDispatcher.ThreadPreprocessMessage += ComponentDispatcher_ThreadPreprocessMessage;
System.Windows.MessageBox.Show("constructor>>");
}
void ComponentDispatcher_ThreadPreprocessMessage(ref MSG msg, ref bool handled){
System.Windows.MessageBox.Show("inside handler");
if (msg.message == WM_HOTKEY){
System.Windows.MessageBox.Show("inside handler");
}
}
private void SetupHotKey(IntPtr handle){
bool res = RegisterHotKey(handle, GetType().GetHashCode(), 0x0004, 0x42);
System.Windows.MessageBox.Show("SetupHotKey res:"+res);
}
public void Dispose(){
UnregisterHotKey(_host.Handle, GetType().GetHashCode());
}
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool RegisterHotKey(IntPtr hWnd, int id, int fsModifiers, int vlc);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool UnregisterHotKey(IntPtr hWnd, int id);
}
modified on Friday, November 26, 2010 8:03 PM
|
|
|
|
|
Please remember to properly format the code you post using the pre tags, i.e. the "code block" menu item above the textbox. Many people will not read or answer a post that does not follow the guidelines that have been clearly posted here.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
FWIW: I've never used ComponentDispatcher nor its ThreadPreprocessMessage, maybe this is a WPF app? For a WinForm, I would use a visible Form (possibly off-screen, i.e. with fake Location) and override its WndProc. And then the app needs to run as administrator on Vista/Win7 for the (un)RegisterHotKey to work properly.
|
|
|
|
|
hi
i have C# Winform program and i need to convert it to Webform.
can i get any simple sample for how to show database grid on screen,
add new, update and delete ?
i try to show table on screen like this:
SQL = "SELECT * FROM MEN order by Lname";
dsView = new DataSet();
adp = new SqlDataAdapter(SQL, Conn);
adp.Fill(dsView, "MEN");
adp.Dispose();
GridView1.DataSource = dsView.Tables["MEN"].DefaultView;
but i dont see nothing
|
|
|
|
|
Don't cross post. Read the forum guidelines and pick one forum.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Is there a library to
-read/stream MP3
- detect beats per minute
- create a mix between 2 different MP3/Wav
|
|
|
|
|
hi
i have Winform program that connect to sql-server-2008
there is 100 user's that connect to this database and
run search query --> and update the database.
i open the connection when the program start's and close when the program end's.
is this the right thing to do ?
is it be better to open connection -> run query -> update -> and close connection ?
thank's in advance
|
|
|
|
|
Have a look at this[^]. I'm sure it will help you.
|
|
|
|
|
Absolutely: Open connection, query, close and dispose.
Database connections are a scarce resource, do not hog them or you will make your DB admin very annoyed...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
It's best to open and close connections on the fly. Under the covers, .NET manages a pool of connections so opening and closing connections is cheap and managed for free. You can take control of this pool if you want.
|
|
|
|
|
Plus, I hope you don't have data access in the UI layer.
|
|
|
|
|
My rule of thumb is to leave a connection open the shortest time possible. Open, query, update, close.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
Navigate the Give Link to know best practices of Using Connection.
best practices[^]
|
|
|
|
|
Hi C# Guru's,
i have recently written a command line C# app that uses psexec to run Netstat on remote machines and sends the results to a text file, it works ok...ish.
firstly, even though i have set the process to psi.UseShellExecute = false and psi.CreateNoWindow = true it still pops up a command window - any idea how i stop this?
secondly, even though it sends most of the output to the text file it cuts it off short, i have used the below code TNA.
while(p.StandardOutput.EndOfStream == false)
{
sw.Write(p.StandardOutput.ReadToEnd());
p.WaitForExit();
sw.Flush();
}
the bottom part of the output file looks like:
TCP 172.17.134.138:80 172.17.134.133:51076 TIME_WAIT 0
TCP 172.17.134.138:80 172.17.134.133:52450 TIME_WAIT 0
TCP 172.17.134.138:80 1
any ideas on how to get the full output?
Many Thanks,
Phil
|
|
|
|