VB to C# problem
Hello,
I hope I posted this in the correct forum...
I am no good at translating code from one language to another.
can anyone translate the following code from VB to C#? I would really appreciate it.
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA"
(ByVal hwnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) _
As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA"
(ByVal hwnd As Long, _
ByVal nIndex As Long) _
As Long
Private Declare Function UpdateWindow Lib "user32" (ByVal hwnd As Long) As
Long
Private Const GWL_EXSTYLE = (-20)
Private Const WS_EX_TRANSPARENT = &H20&
Private Sub Form_Load()
Dim hStyle As Long
hStyle = GetWindowLong(RichTextBox1.hwnd, GWL_EXSTYLE)
Call SetWindowLong(RichTextBox1.hwnd, GWL_EXSTYLE, hStyle Or
WS_EX_TRANSPARENT)
Call UpdateWindow(RichTextBox1.hwnd)
End Sub
Thank you so very much!
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

joy.simpsonRank #4,292 · 353 reputationPosted May 12, 2004, 9:56 AM EDT
tb_anywhere29 reputationPosted Jun 13, 2004, 5:33 PM EDT