Malfunction Posted April 22, 2004 Posted April 22, 2004 I'm trying to translate this VB declaration: Private Const WM_NCPAINT As Integer = &H85 into C#: private const int WM_NCPAINT = &H85; Honestly I don't know what type of number format that &H85 is so I'm having trouble converting the code. Quote Debug me...
wessamzeidan Posted April 22, 2004 Posted April 22, 2004 Dim WM_NCPAINT As Integer = &H85 I think its a hexadecimal number Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
Malfunction Posted April 22, 2004 Author Posted April 22, 2004 Yes &H indicates a hexnumber but in the MSDN I can't find how to declare a hexnumber in c# :( Quote Debug me...
wessamzeidan Posted April 22, 2004 Posted April 22, 2004 Shouldn't it be the same as you declare it in VB, I mean something like int WM_NCPAINT=&H85; Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
JABE Posted April 22, 2004 Posted April 22, 2004 If I'm not mistaken, I think you have to prepend "0x" such that: const int WM_NCPAINT = 0x85; Quote
Malfunction Posted April 22, 2004 Author Posted April 22, 2004 That's it...many thx. Strange I couldn't find it in the MSDN. Quote Debug me...
Jaco Posted April 22, 2004 Posted April 22, 2004 The vb to c# conversion tool Instant C# gives: private const int WM_NCPAINT = 0X85; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.