Click here to Skip to main content
15,918,742 members
Home / Discussions / C#
   

C#

 
GeneralRe: Communicating thru Serial port and UART interface Pin
Luc Pattyn9-Dec-08 23:41
sitebuilderLuc Pattyn9-Dec-08 23:41 
QuestionSerialization problem Pin
Richard Blythe9-Dec-08 18:01
Richard Blythe9-Dec-08 18:01 
AnswerRe: Serialization problem Pin
N a v a n e e t h9-Dec-08 18:10
N a v a n e e t h9-Dec-08 18:10 
QuestionNot being able to close an application with Alt-F4 Pin
Joshomedia9-Dec-08 13:48
Joshomedia9-Dec-08 13:48 
AnswerRe: Not being able to close an application with Alt-F4 Pin
User 43300289-Dec-08 15:09
User 43300289-Dec-08 15:09 
AnswerRe: Not being able to close an application with Alt-F4 [modified] Pin
PIEBALDconsult9-Dec-08 16:52
mvePIEBALDconsult9-Dec-08 16:52 
AnswerRe: Not being able to close an application with Alt-F4 Pin
DaveyM6910-Dec-08 5:32
professionalDaveyM6910-Dec-08 5:32 
QuestionSendMessage Issues Pin
San249-Dec-08 10:43
San249-Dec-08 10:43 
I`m frustrated! Okay,I have Windows Application in C# which has Excel Embedded in it via WebBrowser. I can`t overwrite this file with the changes I make cause the file is locked. I tried a lot of things, but this seems to be a know issue. I can save the changes I make to the Excel File by using [Cntrl + S]. What I`m tying to do is have the users click a button which in turn does Cntrl + S. I can`t seem to get this working. Here is the code I`m playing with.


[DllImport("User32.DLL")]
public static extern int SendMessage(IntPtr hWnd, UInt32 Msg, Int32 wParam, Int32 lParam);

public const Int32 WM_KEYDOWN = 0x100;
public const Int32 WM_CHAR = 0x102;
public const Int32 WM_KEYUP = 0x101;
public const Int32 SDown = 0x220001;
public const Int32 SUp= 0x0220001; //0xC0220001
public const Int32 CtrlDown = 0x11D0001;
public const Int32 CtrlUp = 0x11D0001; // 0xC11D0001



private void button2_Click(object sender, EventArgs e)
{
SendMessage(this.Handle, WM_KEYDOWN, 0x11, CtrlDown);
SendMessage(this.Handle, WM_KEYDOWN, 0x53, SDown);
SendMessage(this.Handle, WM_CHAR, 0x7, SDown);
SendMessage(this.Handle, WM_KEYUP, 0x53, SUp);
SendMessage(this.Handle, WM_KEYUP, 0x11, CtrlUp);
}

Or is there anyother way to save the file? All replies are greatly appreciated.
AnswerRe: SendMessage Issues Pin
Christian Graus9-Dec-08 11:18
protectorChristian Graus9-Dec-08 11:18 
GeneralRe: SendMessage Issues Pin
San2410-Dec-08 3:30
San2410-Dec-08 3:30 
QuestionHow to configure TCPIP programatically Pin
s196675m9-Dec-08 10:03
s196675m9-Dec-08 10:03 
AnswerRe: How to configure TCPIP programatically Pin
led mike9-Dec-08 10:59
led mike9-Dec-08 10:59 
Questionhow to detect exit event when i click X button on form? Pin
ping_jacob9-Dec-08 7:38
ping_jacob9-Dec-08 7:38 
AnswerRe: how to detect exit event when i click X button on form? Pin
Dave Kreskowiak9-Dec-08 7:48
mveDave Kreskowiak9-Dec-08 7:48 
QuestionSetting a GDI Transform Matrix Pin
baranils9-Dec-08 6:49
baranils9-Dec-08 6:49 
AnswerRe: Setting a GDI Transform Matrix Pin
User 66589-Dec-08 9:18
User 66589-Dec-08 9:18 
GeneralRe: Setting a GDI Transform Matrix Pin
baranils9-Dec-08 9:45
baranils9-Dec-08 9:45 
GeneralRe: Setting a GDI Transform Matrix Pin
baranils9-Dec-08 22:12
baranils9-Dec-08 22:12 
QuestionQuery takes a long time and then crashes............??? Pin
Reality Strikes9-Dec-08 6:05
Reality Strikes9-Dec-08 6:05 
AnswerRe: Query takes a long time and then crashes............??? Pin
Le centriste9-Dec-08 6:55
Le centriste9-Dec-08 6:55 
GeneralRe: Query takes a long time and then crashes............??? Pin
Reality Strikes9-Dec-08 8:11
Reality Strikes9-Dec-08 8:11 
GeneralRe: Query takes a long time and then crashes............??? Pin
Le centriste9-Dec-08 8:16
Le centriste9-Dec-08 8:16 
GeneralRe: Query takes a long time and then crashes............??? Pin
led mike9-Dec-08 8:32
led mike9-Dec-08 8:32 
GeneralRe: Query takes a long time and then crashes............??? Pin
Reality Strikes9-Dec-08 8:39
Reality Strikes9-Dec-08 8:39 
GeneralRe: Query takes a long time and then crashes............??? Pin
led mike9-Dec-08 8:54
led mike9-Dec-08 8:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.