473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2645
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
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
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
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
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
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
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
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
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
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
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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,...
0
jinu1996
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 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.