473,668 Members | 2,308 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 2658
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****@discuss ions.microsoft. com> wrote in message
news:CB******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> wrote in message
news:CB******** *************** ***********@mic rosoft.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
1354
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 - xml file- is in my host too. why i recieve this error
4
3259
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 within Dreamweaver MX. I get the above error, which is 'dealt with' in http://support.microsoft.com/default.aspx?scid=kb;en-us;174943 , but I'm not wise enough to be sure about the correct process for ensuring that the IUSR_<machinename> account...
1
2116
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 return anything: sISBN = "0-98765-8-9" OpenSQL(select URL from ISBN_Redirect where ISBN=" & sISBN )
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" (ByVal hwnd As Integer) As IntPtr Dim me_hdc As IntPtr = GetWindowDC(Me.Handle) ////the error is on "Me.Handle"
0
1153
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
1298
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 error to myErrorpage.aspx. Then for testing I add a button on my form and when clicking that button I
1
2523
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 number BUT when i try to get a screenshot with ... Dim hdcSrc As IntPtr = User32.GetWindowDC(handle) ...
1
1375
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 Authentication is not enabled. Onde eu acho a solução para estes erros ? Tarcísio Corte,
1
2000
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 doing so? I mean using global.asax app_error event to handle all the error of aplication. as i will not be using try catch any where in the app... Thanks
2
1437
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 Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase. The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions,...
0
8374
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8890
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8791
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8653
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7398
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1783
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.