473,404 Members | 2,114 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,404 software developers and data experts.

DrawIconEx

What is the exact syntax for using DrawIconEx
DrawIconEx(System.Windows.Forms.PictureBox1.hdc, _
0, _
0, _
lngmIcon, _
660, _
450, _
0, _
0, _
DI_NORMAL)
as you can see it doesn't work. I tried adding .PictureBox1 (the name
of the control) and it didn't work either.
I'm new to this, so please bear with me.
Marshall

Feb 19 '06 #1
13 2972
Private Declare Function ExtractAssociatedIcon Lib "shell32.dll" Alias
"ExtractAssociatedIconA" (ByVal hInst As Long, ByVal lpIconPath As String,
lpiIcon As Long) As Long

Private Declare Function DrawIconEx Lib "user32" (ByVal hdc As Long, ByVal
xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal cxWidth As
Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal
hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long

Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As Long) As
Long

Why do you want to use unmanaged code? Just curious.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Marshall" <ra****@oriok.net> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
What is the exact syntax for using DrawIconEx
DrawIconEx(System.Windows.Forms.PictureBox1.hdc, _
0, _
0, _
lngmIcon, _
660, _
450, _
0, _
0, _
DI_NORMAL)
as you can see it doesn't work. I tried adding .PictureBox1 (the name
of the control) and it didn't work either.
I'm new to this, so please bear with me.
Marshall

Feb 19 '06 #2

vbnetdev wrote:
Private Declare Function ExtractAssociatedIcon Lib "shell32.dll" Alias
"ExtractAssociatedIconA" (ByVal hInst As Long, ByVal lpIconPath As String,
lpiIcon As Long) As Long

Private Declare Function DrawIconEx Lib "user32" (ByVal hdc As Long, ByVal
xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal cxWidth As
Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal
hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long

Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As Long) As
Long

Why do you want to use unmanaged code? Just curious.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com
vbnetdev:
I've done all that. I just took my code out of context.
I didn't think that I had to show it all.
It's just that DrawIconEx(System.WIndows.Forms.PictureBox.Picture 1.hdc
doesn't work either.
So what is the syntax for System.Forms.....?
Marshall

"Marshall" <ra****@oriok.net> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
What is the exact syntax for using DrawIconEx
DrawIconEx(System.Windows.Forms.PictureBox1.hdc, _
0, _
0, _
lngmIcon, _
660, _
450, _
0, _
0, _
DI_NORMAL)
as you can see it doesn't work. I tried adding .PictureBox1 (the name
of the control) and it didn't work either.
I'm new to this, so please bear with me.
Marshall


Feb 19 '06 #3
"vbnetdev" <vb******@community.nospam> schrieb
Private Declare Function ExtractAssociatedIcon Lib "shell32.dll"
Alias "ExtractAssociatedIconA" (ByVal hInst As Long, ByVal
lpIconPath As String, lpiIcon As Long) As Long

Private Declare Function DrawIconEx Lib "user32" (ByVal hdc As Long,
ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal
cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long,
ByVal
hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long

Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As
Long) As Long

Your code is VB6 code but this is a VB.Net group.

The correct declaration is: (unverified)

Private Declare Function ExtractAssociatedIcon Lib "shell32.dll"
Alias "ExtractAssociatedIconA" (ByVal hInst As intptr, ByVal
lpIconPath As String, byref lpiIcon As Integer) As intptr

Private Declare Function DrawIconEx Lib "user32" (ByVal hdc As intptr,
ByVal xLeft As integer, ByVal yTop As integer, ByVal hIcon As intptr, ByVal
cxWidth As integer, ByVal cyWidth As integer, ByVal istepIfAniCur As
integer,
ByVal hbrFlickerFreeDraw As intptr, ByVal diFlags As integer) As boolean

(In VB 2005 you can use the Unsigned Integer type for istepIfAniCur and
diFlags.)

Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As
intptr) As boolean
But I agree that we should use the managed version wherever possible. BTW,
in Framework 2.0, there is the Icon.ExtractAssociatedIcon method.
Armin

Feb 19 '06 #4
"Marshall" <ra****@oriok.net> schrieb
So what is the syntax for System.Forms.....?

Where do you get the Icon from? Do you have a System.Drawing.Icon object or
did you receive a icon handle somewhere from unmanaged functions?

Wherever possible, use the Graphics object to draw. In a Paint event, you
get it in e.graphics. Outside Paint, you create it by calling
YourControl.Creategraphics. Then call the Graphics object's DrawIcon method.
Armin

Feb 19 '06 #5
My bad. Old habits die hard.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Armin Zingler" <az*******@freenet.de> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
"vbnetdev" <vb******@community.nospam> schrieb
Private Declare Function ExtractAssociatedIcon Lib "shell32.dll"
Alias "ExtractAssociatedIconA" (ByVal hInst As Long, ByVal
lpIconPath As String, lpiIcon As Long) As Long

Private Declare Function DrawIconEx Lib "user32" (ByVal hdc As Long,
ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal
cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long,
ByVal
hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long

Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As
Long) As Long

Your code is VB6 code but this is a VB.Net group.

The correct declaration is: (unverified)

Private Declare Function ExtractAssociatedIcon Lib "shell32.dll"
Alias "ExtractAssociatedIconA" (ByVal hInst As intptr, ByVal
lpIconPath As String, byref lpiIcon As Integer) As intptr

Private Declare Function DrawIconEx Lib "user32" (ByVal hdc As intptr,
ByVal xLeft As integer, ByVal yTop As integer, ByVal hIcon As intptr,
ByVal
cxWidth As integer, ByVal cyWidth As integer, ByVal istepIfAniCur As
integer,
ByVal hbrFlickerFreeDraw As intptr, ByVal diFlags As integer) As boolean

(In VB 2005 you can use the Unsigned Integer type for istepIfAniCur and
diFlags.)

Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As
intptr) As boolean
But I agree that we should use the managed version wherever possible. BTW,
in Framework 2.0, there is the Icon.ExtractAssociatedIcon method.
Armin

Feb 19 '06 #6
Gentlemen;
here is the project. All 54 lines of it.
Private Declare Function DestroyIcon Lib "user32" _
(ByVal hIcon As Long) As Long
Private Declare Function DrawIconEx Lib "user32" _
(ByVal hdc As Long, _
ByVal xLeft As Long, _
ByVal yTop As Long, _
ByVal hIcon As Long, _
ByVal cxHeight As Long, _
ByVal cyWidth As Long, _
ByVal istepIfAniCur As Long, _
ByVal hbrFlickerFreeDraw As Long, _
ByVal diFlags As Long) As Long
'
' For Icon extraction and placement in Image control
Private Declare Function ExtractIcon Lib "shell32.dll" _
Alias "ExtractIconA" _
(ByVal hInst As Long, _
ByVal lpszExeFileName As String, _
ByVal nIconIndex As Long) As Long
Private lngmIcon As Long
Const DI_MASK As Long = &H1
Const DI_IMAGE As Long = &H2
Const DI_NORMAL As Long = DI_MASK Xor DI_IMAGE
Const ERROR_SUCCESS = 0

Private Sub frmCCw_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Extract_the_Icon()
End Sub

Private Sub Draw_The_Icon()
DrawIconEx(System.Windows.Forms.PictureBox1.hdc, _
0, _
0, _
lngmIcon, _
660, _
450, _
0, _
0, _
DI_NORMAL)
' remove the icon from the memory
DestroyIcon(lngmIcon)
End Sub
Private Sub Extract_the_Icon()
lngmIcon = ExtractIcon("C:\Windows\System32", "Shell32.dll",
84&)
If ERROR_SUCCESS Then
Draw_The_Icon()
End If
End Sub

Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles PictureBox2.Click

End Sub
End Class
Now everything is fine, I guess, except the line that has
DrawIconEx(System.Windows.Forms.PictureBox1.hdc, _
..
..
Where it reports in the error window,
Error 1 'PictureBox1' is not a member of 'Forms'.
F:\VB Studio Net
Projects\ControlCenter\ControlCenter\CCW.vb 32 20 ControlCenter
So again;
What is the syntax for DrawIconEx?
Marshall

Feb 19 '06 #7
"Marshall" <ra****@oriok.net> schrieb
Gentlemen;
here is the project. All 54 lines of it.

Is there a reason why you ignore my posts? The declarations are still wrong.
Armin

Feb 19 '06 #8

Armin Zingler wrote:
"Marshall" <ra****@oriok.net> schrieb
Gentlemen;
here is the project. All 54 lines of it.

Is there a reason why you ignore my posts? The declarations are still wrong.
Armin


I'm looking now on Microsoft.com for just what are the Declarations.
No luck so far.
When I'm wrong I will change the declaration.
WHAT ARE THEY.
God I cant find anything. They're doesn't appear to be any built-in
API Viewer so I can get the declaration right.
AND STILL, what is the syntax fro DrawIconEX?
Marshall

Feb 19 '06 #9
"Marshall" <ra****@oriok.net> schrieb

Is there a reason why you ignore my posts? The declarations are
still wrong.


I'm looking now on Microsoft.com for just what are the Declarations.
No luck so far.
When I'm wrong I will change the declaration.
WHAT ARE THEY.
God I cant find anything. They're doesn't appear to be any built-in
API Viewer so I can get the declaration right.
AND STILL, what is the syntax fro DrawIconEX?
Marshall

<quote>
Where do you get the Icon from? Do you have a System.Drawing.Icon object or
did you receive a icon handle somewhere from unmanaged functions?

Wherever possible, use the Graphics object to draw. In a Paint event, you
get it in e.graphics. Outside Paint, you create it by calling
YourControl.Creategraphics. Then call the Graphics object's DrawIcon method.
</quote>
<quote>
Private Declare Function ExtractAssociatedIcon Lib "shell32.dll"
Alias "ExtractAssociatedIconA" (ByVal hInst As intptr, ByVal
lpIconPath As String, byref lpiIcon As Integer) As intptr

Private Declare Function DrawIconEx Lib "user32" (ByVal hdc As intptr,
ByVal xLeft As integer, ByVal yTop As integer, ByVal hIcon As intptr, ByVal
cxWidth As integer, ByVal cyWidth As integer, ByVal istepIfAniCur As
integer,
ByVal hbrFlickerFreeDraw As intptr, ByVal diFlags As integer) As boolean

(In VB 2005 you can use the Unsigned Integer type for istepIfAniCur and
diFlags.)

Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As
intptr) As boolean
But I agree that we should use the managed version wherever possible. BTW,
in Framework 2.0, there is the Icon.ExtractAssociatedIcon method.
</quote>

I do not have the declaration for DrawIconEx, but you can use
Icon.FromHandle to create an Icon and draw it the managed way as shown
above.
Armin

Feb 19 '06 #10

Armin Zingler wrote:
"Marshall" <ra****@oriok.net> schrieb

Is there a reason why you ignore my posts? The declarations are
still wrong.


I'm looking now on Microsoft.com for just what are the Declarations.
No luck so far.
When I'm wrong I will change the declaration.
WHAT ARE THEY.
God I cant find anything. They're doesn't appear to be any built-in
API Viewer so I can get the declaration right.
AND STILL, what is the syntax fro DrawIconEX?
Marshall

<quote>
Where do you get the Icon from? Do you have a System.Drawing.Icon object or
did you receive a icon handle somewhere from unmanaged functions?

Wherever possible, use the Graphics object to draw. In a Paint event, you
get it in e.graphics. Outside Paint, you create it by calling
YourControl.Creategraphics. Then call the Graphics object's DrawIcon method.
</quote>
<quote>
Private Declare Function ExtractAssociatedIcon Lib "shell32.dll"
Alias "ExtractAssociatedIconA" (ByVal hInst As intptr, ByVal
lpIconPath As String, byref lpiIcon As Integer) As intptr

Private Declare Function DrawIconEx Lib "user32" (ByVal hdc As intptr,
ByVal xLeft As integer, ByVal yTop As integer, ByVal hIcon As intptr, ByVal
cxWidth As integer, ByVal cyWidth As integer, ByVal istepIfAniCur As
integer,
ByVal hbrFlickerFreeDraw As intptr, ByVal diFlags As integer) As boolean

(In VB 2005 you can use the Unsigned Integer type for istepIfAniCur and
diFlags.)

Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As
intptr) As boolean
But I agree that we should use the managed version wherever possible. BTW,
in Framework 2.0, there is the Icon.ExtractAssociatedIcon method.
</quote>

I do not have the declaration for DrawIconEx, but you can use
Icon.FromHandle to create an Icon and draw it the managed way as shown
above.
Armin

Armin,
1. Up above is the method with which I retrieved the Icon.
2. What the heck is 'the managed version'? Never heard of that before.
3. I must be stupid or whatever, because I don't understand a damn
thing you are saying about Icon.handle and create an Icon, etc.
I extracted the Icon, NOW, How do I draw it into a Picture Box.
Step by Step.
If you can't or no one else can, then forget it.
Thanks for all your time and trouble.

Marshall

PS. Now I know why VB6 coders are fighting moving to VB.Net.
It looks similar to Java and C#.
Now who in their right mind wants to go thru all the trouble of the
name.name.name stuff
when in VB6 you could just do it.
I'm trying to learn VB.Net, but as you can see I have a mindset to
overcome.
VB6 is SO MUCH EASIER to understand and to code for; I started with VB
3.0 on WIndows 3.11 and was writing code within a 1/2 hr.
Now I can't even get the program to run unless I do ctrl+F5
VB6 not being an OOP language, as far as I am concerned is a complaint
of the Publishers of magazines, C++ and Java programmers who have a
propensity to favor total OOP languages.
Now that said, I would be willing to wager that 1,000's of VB6 programs
run companies.
So to say it's not a 'real' language is absurd.
But I digress.
Sorry to go on a rant, but I had to say my 2 cents worth. For whatever
that's worth.

Feb 19 '06 #11
"Marshall" <ra****@oriok.net> schrieb

Armin Zingler wrote:
"Marshall" <ra****@oriok.net> schrieb
>
> Is there a reason why you ignore my posts? The declarations
> are still wrong.

I'm looking now on Microsoft.com for just what are the
Declarations. No luck so far.
When I'm wrong I will change the declaration.
WHAT ARE THEY.
God I cant find anything. They're doesn't appear to be any
built-in API Viewer so I can get the declaration right.
AND STILL, what is the syntax fro DrawIconEX?
Marshall
<quote>
Where do you get the Icon from? Do you have a System.Drawing.Icon
object or did you receive a icon handle somewhere from unmanaged
functions?

Wherever possible, use the Graphics object to draw. In a Paint
event, you get it in e.graphics. Outside Paint, you create it by
calling
YourControl.Creategraphics. Then call the Graphics object's
DrawIcon method. </quote>
<quote>
Private Declare Function ExtractAssociatedIcon Lib "shell32.dll"
Alias "ExtractAssociatedIconA" (ByVal hInst As intptr, ByVal
lpIconPath As String, byref lpiIcon As Integer) As intptr

Private Declare Function DrawIconEx Lib "user32" (ByVal hdc As
intptr, ByVal xLeft As integer, ByVal yTop As integer, ByVal hIcon
As intptr, ByVal cxWidth As integer, ByVal cyWidth As integer,
ByVal istepIfAniCur As integer,
ByVal hbrFlickerFreeDraw As intptr, ByVal diFlags As integer) As
boolean

(In VB 2005 you can use the Unsigned Integer type for
istepIfAniCur and diFlags.)

Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As
intptr) As boolean
But I agree that we should use the managed version wherever
possible. BTW, in Framework 2.0, there is the
Icon.ExtractAssociatedIcon method.
</quote>

I do not have the declaration for DrawIconEx, but you can use
Icon.FromHandle to create an Icon and draw it the managed way as
shown above.
Armin

Armin,
1. Up above is the method with which I retrieved the Icon.


Today... I did not quote it because I wanted to know how you get the icon
because you posted it meanwhile. I only quoted it because I wrote how you
use the graphics object to paint an icon, and because you wrote you didn't
find the correct declaration. That's why I assumed that you didn't see the
message and I quoted it again.
2. What the heck is 'the managed version'? Never heard of that
before.
Calling API functions (also called pInvoke (=plattform invoke)) is the
"native" way to draw an icon, wheras using the classes in the
..Net Framework is called the "managed" way. It is called that
because the Framework provides the "managed excution" of applications
that are based on the framework.
3. I must be stupid or whatever, because I don't understand
a damn
thing you are saying about Icon.handle and create an Icon, etc.
An Icon is an object. See class System.Drawing.Icon. The method
Icon.FromHandle is a method that can be used to create an Icon object by
passing an icon handle. Pass the icon handle that you got from the
Extracticon function.
I extracted the Icon, NOW, How do I draw it into a Picture Box.
Step by Step.

1. get the icon handle using your api function
2. call icon.fromhandle to create an Icon
3. see first quote above
If you can't or no one else can, then forget it.
Thanks for all your time and trouble.

Marshall

PS. Now I know why VB6 coders are fighting moving to VB.Net.
It looks similar to Java and C#.
Now who in their right mind wants to go thru all the trouble of the
name.name.name stuff
when in VB6 you could just do it.
Do you have all your files in C:\ or do you create sub folders? I love
(VB).Net
for being able to organize classes in namespaces. Would be very chaotic if
thousands of them were thrown in one big pot, including the problem of
conflicting names.
I'm trying to learn VB.Net, but as you can see I have a mindset to
overcome.
VB6 is SO MUCH EASIER to understand and to code for; I started with
VB 3.0 on WIndows 3.11 and was writing code within a 1/2 hr.
Now I can't even get the program to run unless I do ctrl+F5
VB6 not being an OOP language, as far as I am concerned is a
complaint of the Publishers of magazines, C++ and Java programmers
who have a propensity to favor total OOP languages.
Now that said, I would be willing to wager that 1,000's of VB6
programs run companies.
So to say it's not a 'real' language is absurd.
But I digress.
Sorry to go on a rant, but I had to say my 2 cents worth. For
whatever that's worth.


Well, it takes some time to get accustomed to it because it is so different,
but once done, you'll love it. Things are often much simpler to do (not
always, of course).
Armin

Feb 19 '06 #12

Armin Zingler wrote:
"Marshall" <ra****@oriok.net> schrieb

Armin Zingler wrote:
"Marshall" <ra****@oriok.net> schrieb
> >
> > Is there a reason why you ignore my posts? The declarations
> > are still wrong.
>
> I'm looking now on Microsoft.com for just what are the
> Declarations. No luck so far.
> When I'm wrong I will change the declaration.
> WHAT ARE THEY.
> God I cant find anything. They're doesn't appear to be any
> built-in API Viewer so I can get the declaration right.
> AND STILL, what is the syntax fro DrawIconEX?
> Marshall
>
<quote>
Where do you get the Icon from? Do you have a System.Drawing.Icon
object or did you receive a icon handle somewhere from unmanaged
functions?

Wherever possible, use the Graphics object to draw. In a Paint
event, you get it in e.graphics. Outside Paint, you create it by
calling
YourControl.Creategraphics. Then call the Graphics object's
DrawIcon method. </quote>
<quote>
Private Declare Function ExtractAssociatedIcon Lib "shell32.dll"
Alias "ExtractAssociatedIconA" (ByVal hInst As intptr, ByVal
lpIconPath As String, byref lpiIcon As Integer) As intptr

Private Declare Function DrawIconEx Lib "user32" (ByVal hdc As
intptr, ByVal xLeft As integer, ByVal yTop As integer, ByVal hIcon
As intptr, ByVal cxWidth As integer, ByVal cyWidth As integer,
ByVal istepIfAniCur As integer,
ByVal hbrFlickerFreeDraw As intptr, ByVal diFlags As integer) As
boolean

(In VB 2005 you can use the Unsigned Integer type for
istepIfAniCur and diFlags.)

Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As
intptr) As boolean
But I agree that we should use the managed version wherever
possible. BTW, in Framework 2.0, there is the
Icon.ExtractAssociatedIcon method.
</quote>

I do not have the declaration for DrawIconEx, but you can use
Icon.FromHandle to create an Icon and draw it the managed way as
shown above.
Armin

Armin,
1. Up above is the method with which I retrieved the Icon.


Today... I did not quote it because I wanted to know how you get the icon
because you posted it meanwhile. I only quoted it because I wrote how you
use the graphics object to paint an icon, and because you wrote you didn't
find the correct declaration. That's why I assumed that you didn't see the
message and I quoted it again.
2. What the heck is 'the managed version'? Never heard of that
before.


Calling API functions (also called pInvoke (=plattform invoke)) is the
"native" way to draw an icon, wheras using the classes in the
.Net Framework is called the "managed" way. It is called that
because the Framework provides the "managed excution" of applications
that are based on the framework.
3. I must be stupid or whatever, because I don't understand
a damn
thing you are saying about Icon.handle and create an Icon, etc.


An Icon is an object. See class System.Drawing.Icon. The method
Icon.FromHandle is a method that can be used to create an Icon object by
passing an icon handle. Pass the icon handle that you got from the
Extracticon function.
I extracted the Icon, NOW, How do I draw it into a Picture Box.
Step by Step.

1. get the icon handle using your api function
2. call icon.fromhandle to create an Icon
3. see first quote above
If you can't or no one else can, then forget it.
Thanks for all your time and trouble.

Marshall

PS. Now I know why VB6 coders are fighting moving to VB.Net.
It looks similar to Java and C#.
Now who in their right mind wants to go thru all the trouble of the
name.name.name stuff
when in VB6 you could just do it.


Do you have all your files in C:\ or do you create sub folders? I love
(VB).Net
for being able to organize classes in namespaces. Would be very chaotic if
thousands of them were thrown in one big pot, including the problem of
conflicting names.
I'm trying to learn VB.Net, but as you can see I have a mindset to
overcome.
VB6 is SO MUCH EASIER to understand and to code for; I started with
VB 3.0 on WIndows 3.11 and was writing code within a 1/2 hr.
Now I can't even get the program to run unless I do ctrl+F5
VB6 not being an OOP language, as far as I am concerned is a
complaint of the Publishers of magazines, C++ and Java programmers
who have a propensity to favor total OOP languages.
Now that said, I would be willing to wager that 1,000's of VB6
programs run companies.
So to say it's not a 'real' language is absurd.
But I digress.
Sorry to go on a rant, but I had to say my 2 cents worth. For
whatever that's worth.


Well, it takes some time to get accustomed to it because it is so different,
but once done, you'll love it. Things are often much simpler to do (not
always, of course).
Armin

Armin;
Thank you for your time and efforts.
I will give it a try.
Hopefully I can get it to work.
As an aside; Who knew that Native was not as good as Managed.
Native sounds like it's built in, and Managed sounds like it run by a
committee. LOL
Marshall

Feb 19 '06 #13
Marshall,

I agree with Armin. I've been coding for some time but I just started
coding in .NET a couple of years ago. It takes about 3-6 months before you
"get it" (OOP) but once you do you don't want to go back. VB6 uses objects
it just conceals them from you and consequently you don't get the benefit of
being able to use them yourself for the most part.

The basic idea of "managed code" is that your code runs in it's own process
space and the framework "manages" it. The framework keeps an application
from interfering with other applications running on the system and keeps the
application from interfering with the system itself. There are a number of
advantages to "managed code", including cleaning up objects after they're no
longer needed, but the most significant is probably that in the even that
your program crashes the vast majority of the time it won't affect other
running applications or crash the system. If you use "unmanaged code" and
you make a simple programming error you can crash the entire system.

I'm sure that some of the other posters could give you a better synopsis of
the advantages but that should give you a good start.

I've read quite a few books on OOP and .NET and if you'd like to keep the
length of time it takes to "get it" down to 3 months get a copy of John
Connell's book Coding Techniques for Microsoft(r) Visual Basic(r) .NET.

Stan

--
Stan Smith
ADS Programming Services
Birmingham, AL
205-222-1661
ss****@adsprogramming.com
Feb 20 '06 #14

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

Similar topics

0
by: Raymond H. | last post by:
Hello, I try to make work this code but there is an error that occurs in the line number 500. What isn't work? I'd like to display the icone in a listview with the name of each file of a...
4
by: gregory_may | last post by:
Does anyone know if anything is in the works to make DirectX work better with .Net? Thanks!
0
by: gregory_may | last post by:
I apologize for cross posting, but I don't know the best place to post this. This link is a pretty good overview of the various System Cursor routines....
2
jamesd0142
by: jamesd0142 | last post by:
Hi im just starting to dabble with windows API and i getting a headache!. Is there any way to find a list of functions available in user32 DLL file? any other info is welcome here... James
5
by: RomeoPapacy | last post by:
I'm currently writing a replacement shell and am suffering from quite dire memory leaks, when running, every time I roll my mouse over the taskbar icon a new window scrolls out revealing the window's...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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
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
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...
0
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
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,...

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.