Click here to Skip to main content
16,005,080 members
Home / Discussions / C#
   

C#

 
GeneralRe: Removing Icon from a Form Pin
Luis Alonso Ramos3-Aug-05 13:54
Luis Alonso Ramos3-Aug-05 13:54 
GeneralConverting Server to Local Time Pin
Anonymous3-Aug-05 8:32
Anonymous3-Aug-05 8:32 
GeneralJavascript from c# Pin
Renjith Ramachandran3-Aug-05 7:59
Renjith Ramachandran3-Aug-05 7:59 
GeneralRe: Javascript from c# Pin
Judah Gabriel Himango3-Aug-05 8:06
sponsorJudah Gabriel Himango3-Aug-05 8:06 
GeneralIntegrating C# library in C++ service Pin
Francois Dubé3-Aug-05 7:43
sussFrancois Dubé3-Aug-05 7:43 
GeneralRe: Integrating C# library in C++ service Pin
Rob Graham3-Aug-05 9:15
Rob Graham3-Aug-05 9:15 
GeneralRe: Integrating C# library in C++ service Pin
Member 104401004-Aug-05 5:27
Member 104401004-Aug-05 5:27 
GeneralAppend Text to Notepad programatically Pin
Alomgir Miah3-Aug-05 7:27
Alomgir Miah3-Aug-05 7:27 
To write to Notepad from c# without creating a file I found the following code.
I need this because I dont have write permission on the client but I need to show
the extracted data in the Notepad.


Private Declare Ansi Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As String) As Integer
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Int32, ByVal hWnd2 As Int32, ByVal lpsz1 As String, ByVal lpsz2 As String) As Int32
Private Const WM_SETTEXT As Integer = &HC

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim hwnd As Integer = FindWindow(vbNullString, "Untitled - Notepad") '/// assuming you have notepad open.
Dim x As Integer = FindWindowEx(hwnd, 0, "Edit", vbNullString)
Dim strText As String = "some text"
If Not x = 0 Then
SendMessage(x, WM_SETTEXT, 256, strText)
End If
End Sub


My question is: Is there a way to append text to notepad instead of WM_SETTEXT. I need this because sometimes the data to be extracted is huge and WM_SETTEXT may not suffice.

Live Life King Size
Alomgir Miah


Live Life King Size
Alomgir Miah
GeneralRe: Append Text to Notepad programatically Pin
Guffa3-Aug-05 7:33
Guffa3-Aug-05 7:33 
GeneralRe: Append Text to Notepad programatically Pin
Alomgir Miah3-Aug-05 7:36
Alomgir Miah3-Aug-05 7:36 
GeneralRe: Append Text to Notepad programatically Pin
Luis Alonso Ramos3-Aug-05 9:42
Luis Alonso Ramos3-Aug-05 9:42 
Generalusing a c++ .lib file Pin
Anonymous3-Aug-05 7:06
Anonymous3-Aug-05 7:06 
GeneralRe: using a c++ .lib file Pin
S. Senthil Kumar3-Aug-05 7:17
S. Senthil Kumar3-Aug-05 7:17 
GeneralMethod "Export" of CrystalReport Pin
DevC#3-Aug-05 6:42
DevC#3-Aug-05 6:42 
GeneralI spent 2 hours seardhing for an answer... Pin
Anonymous3-Aug-05 6:02
Anonymous3-Aug-05 6:02 
GeneralRe: I spent 2 hours seardhing for an answer... Pin
Judah Gabriel Himango3-Aug-05 8:10
sponsorJudah Gabriel Himango3-Aug-05 8:10 
GeneralView update pattern Pin
ppp0013-Aug-05 5:49
ppp0013-Aug-05 5:49 
GeneralRe: View update pattern Pin
Patric_J3-Aug-05 8:31
Patric_J3-Aug-05 8:31 
GeneralRe: View update pattern Pin
ppp0013-Aug-05 13:13
ppp0013-Aug-05 13:13 
Generalidentity map Pin
ppp0013-Aug-05 5:45
ppp0013-Aug-05 5:45 
GeneralSome way to Notifiy RDBMS changes to Clients Pin
NarayanVl3-Aug-05 4:05
NarayanVl3-Aug-05 4:05 
GeneralRe: Some way to Notifiy RDBMS changes to Clients Pin
Judah Gabriel Himango3-Aug-05 4:31
sponsorJudah Gabriel Himango3-Aug-05 4:31 
GeneralTricky XPath query C# Pin
abcxyz823-Aug-05 3:17
abcxyz823-Aug-05 3:17 
GeneralRe: Tricky XPath query C# Pin
hamster13-Aug-05 8:16
hamster13-Aug-05 8:16 
QuestionCalling C# dll from VC6 MFC application.. Possible ? Pin
Thierry Maurel3-Aug-05 3:10
Thierry Maurel3-Aug-05 3:10 

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.