hi, i have this API call in VB6
Public Declare Function SetWindowLong Lib "user32.dll" Alias
"SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong
As Long) As Long
in sub
SetWindowLong(Form1.hwnd, GWL_WNDPROC, AddressOf WindowProc)
how can i convert this to 2003? thanks
--
-iwdu15 5 3230
Public Declare Function SetWindowLong Lib "user32.dll" Alias
"SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong
As Long) As Long
in sub
SetWindowLong(Form1.hwnd, GWL_WNDPROC, AddressOf WindowProc)
how can i convert this to 2003? thanks
from www.pinvoke.net:
Private Declare Auto Function SetWindowLong Lib "User32.Dll" _
(ByVal hWnd As IntPtr, _
ByVal nIndex As Integer, _
ByVal dwNewLong As Integer) As Integer
You can add alias "SetWindowLongA".
thanks, i got that now, but what about the function call?
SetWindowLong(Form1.hwnd, GWL_WNDPROC, AddressOf WindowProc)
you cant exactly pass in "AddressOf WindowProc" as an integer value....i
tried delegate, object...etc but nothing works, any idea?
--
-iwdu15
Hello iwdu15,
You're trying to subclass your window procedure here. In the .NET world
you can simply override the window proc. I'd prolly use the NativeWindow
class for this.
-Boo
hi, i have this API call in VB6
Public Declare Function SetWindowLong Lib "user32.dll" Alias
"SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal
dwNewLong As Long) As Long
in sub
SetWindowLong(Form1.hwnd, GWL_WNDPROC, AddressOf WindowProc)
how can i convert this to 2003? thanks
thanks, that works! ive been programming .net for three years now but i
havent really gone into APIs yet, so this is all new for me, thanks for your
help
--
-iwdu15
IWDU15
thanks, that works! ive been programming .net for three years now but i
havent really gone into APIs yet, so this is all new for me, thanks for
your
help
We know your age, don't think it is better to use API's in a Net program, is
shows a kind of VB classic programming where was missing a lot to do it
without that.
Using an API is doing a direct call to your OS and therefore depenend from
the version of that Win32, WinFX etc.
Therefore as advice: use it only if there are no Net alternatives. http://msdn.microsoft.com/library/de...l/win32map.asp
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Cyde Weys |
last post by:
I'm currently working on converting a simulator program from Visual
Basic 6.0 to Visual C++ .NET. I've figured out most of the stuff, but
there's still one thing I haven't gotten to and I've never...
|
by: rgarf |
last post by:
I am converting a C++ application to C#, What in C# replaces the following
C++ functions:
overloaded opertaor=
_ecvt(Math.Abs(val),14,&dec,&sign) ; //this function converts a double to a
string...
|
by: Edward Diener |
last post by:
I have some questions about the instructions for creating a mixed mode DLL
in the MSDN topic "Converting Managed Extensions for C++ Projects from Pure
Intermediate Language to Mixed Mode" in the...
|
by: Edward Diener |
last post by:
I received no answers about this the first time I posted, so I will try
again. My inability to decipher an MSDN topic may find others who have the
same inability and someone who can decipher and...
|
by: ChrisWoodruff |
last post by:
I have a C++ function in a COM object that I am trying to implement in
VB.NET (the functionality, NOT the COM object, I want to remove the
requirement for the COM DLL)
I am an experienced VB...
|
by: kjvt |
last post by:
Based on a prior posting, I've written a function to convert a
recordset to a dataview. The first call to the function for a given
recordset works perfectly, but the second call always returns a...
|
by: Derek Martin |
last post by:
Hi there, kind of a dumb question, but it falls in line with not
understanding (go figure) every nuance about .Net. Is it relatively
straight forward to convert a VB.Net built app to an ASP.Net...
|
by: Blasting Cap |
last post by:
I keep getting errors that pop up when I am trying to convert an
application from dotnet framework 1.1 to framework 2.0. The old project
was saved in sourcesafe from Visual Studio 2003, and I have...
|
by: Tejas |
last post by:
Hi,
I am using ldap_get_values() call to get the user attributes from
LDAP.
This call is returning the user attributes in UTF-8 encoding and its a
PCHAR*. For normal English characters this...
|
by: Peter Michaux |
last post by:
There seem to be some options for converting the arguments object
inside a function to an instance of Array. I'm curious if anyone has
encountered any problems with any particular techniques for...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |