TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ben
NA
159
0
VB to C# problem
May 6 2004 4:18 PM
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!
Reply
Answers (
2
)
invalid cast exception
ODBC Connection through code