473,509 Members | 2,508 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getWindowDC erro

hi,
im using the getWindowDC but getting the error- " Value of type
'System.IntPtr' cannot be converted to integer "
can someone tell me whats wrong??

Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Integer) As IntPtr

Dim me_hdc As IntPtr = GetWindowDC(Me.Handle)

////the error is on "Me.Handle"

hope someone help me...
thanks
Nov 22 '05 #1
4 2649
Declare Function GetWindowDC Lib "user32" (ByVal hwnd As IntPtr) As IntPtr

or

Dim me_hdc As IntPtr = GetWindowDC(Me.Handle.ToInt32)

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"s-galit" <sg****@discussions.microsoft.com> wrote in message
news:CB**********************************@microsof t.com...
hi,
im using the getWindowDC but getting the error- " Value of type
'System.IntPtr' cannot be converted to integer "
can someone tell me whats wrong??

Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Integer) As
IntPtr

Dim me_hdc As IntPtr = GetWindowDC(Me.Handle)

////the error is on "Me.Handle"

hope someone help me...
thanks

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004
Nov 22 '05 #2
Declare Function GetWindowDC Lib "user32" (ByVal hwnd As IntPtr) As IntPtr

or

Dim me_hdc As IntPtr = GetWindowDC(Me.Handle.ToInt32)

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"s-galit" <sg****@discussions.microsoft.com> wrote in message
news:CB**********************************@microsof t.com...
hi,
im using the getWindowDC but getting the error- " Value of type
'System.IntPtr' cannot be converted to integer "
can someone tell me whats wrong??

Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Integer) As
IntPtr

Dim me_hdc As IntPtr = GetWindowDC(Me.Handle)

////the error is on "Me.Handle"

hope someone help me...
thanks

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.742 / Virus Database: 495 - Release Date: 19/08/2004
Nov 22 '05 #3
THANK YOU!!!!!!!
you have been very very helpul :)
Nov 22 '05 #4
THANK YOU!!!!!!!
you have been very very helpul :)
Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1346
by: berehneh | last post by:
for one of my website i add a function that when i add a new post to it , this function make xml file automaticly but i recieve this error .. i open a file for write mode by fopen and this file -...
4
3253
by: Ian U | last post by:
Hello, I'm looking for a "Set Up Your Permissions 101" in response to the above error, which I get on a local IIS5.1 installation, when I'm trying to view Live Data / preview an ASP file from...
1
2108
by: Satvic | last post by:
Hi all, I have a table in the DB which holds ISBN book nubers .. which, as you know have dashes (examlple: 0-98765-8-9). When I run a query from an ASP page to find the number, it doesn't...
3
324
by: s-galit | last post by:
hi, im using the getWindowDC but getting the error- " Value of type 'System.IntPtr' cannot be converted to integer " can someone tell me whats wrong?? Declare Function GetWindowDC Lib "user32"...
0
1147
by: Chen Houwu | last post by:
I use vc6.0,something wrong when i use GDI+ : in StdAfx.h I add the following code betwen #endif//AFX_NO_AFXCMN_SUPPORT and //{{AFX+_INSERT_LOCATION}} code as following: #include "Gdiplus.h"
1
1290
by: serge calderara | last post by:
Dear all, I try to test and implement custom error feature by setting my web config file as follow: <customErrors mode="RemoteOnly" Defaultredirect="MyErropage.aspx" /> Trying to redirect...
1
2506
by: Sephi berry via .NET 247 | last post by:
Hi I'm having this problem of accessing the handle of a window. I retrive it by: Dim procs As Process() = Process.GetProcessesByName("ArcScene") dim intHWND1 IntPtr = procs(0).Handle and get a...
1
1371
by: tarcisio | last post by:
Pessoal, qdo eu mando rodar a pagina o VS 2003 aparece o seguinte erro: Erro While trying to run project : Unable to start debbuging web server. Debbuging failed because integred Windows...
1
1995
by: vikram | last post by:
I want to provide a custom erro handler for my application. henc I decided to handle all error in Global.asax application_error event and then process the error respectively. Is there any problem...
2
1426
sujithkrishnan
by: sujithkrishnan | last post by:
hi all... please help me in resolving this error.. i created a web service and i am not able to consume it in my app. When i browse that page am gettin an ERRO as follows.. Exception...
0
7233
marktang
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,...
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
Oralloy
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,...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.