By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,681 Members | 1,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,681 IT Pros & Developers. It's quick & easy.

Any chance for pointers in VB?

P: n/a
Have anyone ideea if there are plans to implement pointers in VB?

Or, have the classes substituting the pointers the same performance?

Crirus
Nov 20 '05 #1
Share this Question
Share on Google+
41 Replies


P: n/a
A reference 'is a' pointer. It points to an object. You can also treat value
types as objects i.e. obtain a reference to it, by 'Boxing' them.
"Crirus" <Cr****@datagroup.ro> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Have anyone ideea if there are plans to implement pointers in VB?

Or, have the classes substituting the pointers the same performance?

Crirus

Nov 20 '05 #2

P: n/a
"Crirus" <Cr****@datagroup.ro> schrieb
Have anyone ideea if there are plans to implement pointers in VB?

Or, have the classes substituting the pointers the same
performance?


All varaibles declared as a reference type are pointers.
--
Armin

Nov 20 '05 #3

P: n/a
I know, byt a pointer to memory was what I want to know, as in C#
"Nice Chap" <Ni******@PlasmaDyne.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
A reference 'is a' pointer. It points to an object. You can also treat value types as objects i.e. obtain a reference to it, by 'Boxing' them.
"Crirus" <Cr****@datagroup.ro> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Have anyone ideea if there are plans to implement pointers in VB?

Or, have the classes substituting the pointers the same performance?

Crirus


Nov 20 '05 #4

P: n/a
* "Crirus" <Cr****@datagroup.ro> scripsit:
Have anyone ideea if there are plans to implement pointers in VB?

Or, have the classes substituting the pointers the same performance?


Mhm... I never needed pointers like in C and I never missed them. I
think/hope they will never introduce them to VB.NET.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #5

P: n/a
"Crirus" <Cr****@datagroup.ro> schrieb
I know, byt a pointer to memory was what I want to know, as in C#


The methods of System.Runtime.InteropServices.Marshal might help.
--
Armin

Nov 20 '05 #6

P: n/a
Hi Crirus,

No pointers in VB. :-(

It's unlikely that there will be any as VB has not traditionally been a
pointer-based language. The best bet is to learn C# (or C++) and do it in a
separate Project.

The performance benefits can be considerable and for the graphics work
that you are doping, it is well worth investigating.

Here are some very useful articles for you

Multimedia and GDI+:
http://www.codeproject.com/cs/media
Look for Image Processing for Dummies which is a series of
walkthroughs on doing image manipulation using C# pointers.

Pointers UNDOCUMENTED - .NET
http://www.codeproject.com/dotnet/pointers.asp
Which gives additional background on pointers in .NET.

Unfortunately the codeproject site was unavailable when I checked just
now. If you're in a hurry, you can do a Google search and check out the cached
pages (but the images come from the site so will not be shown).

Regards,
Fergus
Nov 20 '05 #7

P: n/a
Hi Herfried,

It does depend on what you are doing in your programs, of course.
Run-of-the-mill Windows apps don't need pointers. Crirus' bitmap
manipulations? I think there's a good case there.

Regards,
Fergus
Nov 20 '05 #8

P: n/a
LOL, I guess I'm well known allready with my struggle with images :)
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:Oq**************@TK2MSFTNGP12.phx.gbl...
Hi Crirus,

No pointers in VB. :-(

It's unlikely that there will be any as VB has not traditionally been a pointer-based language. The best bet is to learn C# (or C++) and do it in a separate Project.

The performance benefits can be considerable and for the graphics work
that you are doping, it is well worth investigating.

Here are some very useful articles for you

Multimedia and GDI+:
http://www.codeproject.com/cs/media
Look for Image Processing for Dummies which is a series of
walkthroughs on doing image manipulation using C# pointers.

Pointers UNDOCUMENTED - .NET
http://www.codeproject.com/dotnet/pointers.asp
Which gives additional background on pointers in .NET.

Unfortunately the codeproject site was unavailable when I checked just
now. If you're in a hurry, you can do a Google search and check out the cached pages (but the images come from the site so will not be shown).

Regards,
Fergus

Nov 20 '05 #9

P: n/a
There is any performance drawback on this class versus pinters that C# have?
"Armin Zingler" <az*******@freenet.de> wrote in message
news:OS**************@TK2MSFTNGP11.phx.gbl...
"Crirus" <Cr****@datagroup.ro> schrieb
I know, byt a pointer to memory was what I want to know, as in C#


The methods of System.Runtime.InteropServices.Marshal might help.
--
Armin

Nov 20 '05 #10

P: n/a
Hi Crirus,

|| LOL, I guess I'm well known allready
|| with my struggle with images :)

Lol, yes, I'm certainly aware. I'm no expert in that field but I'm
following it all with great interest. ;-)

Regards,
Fergus
Nov 20 '05 #11

P: n/a
I'm getting close ... but still missing few things :)
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:uZ**************@tk2msftngp13.phx.gbl...
Hi Crirus,

|| LOL, I guess I'm well known allready
|| with my struggle with images :)

Lol, yes, I'm certainly aware. I'm no expert in that field but I'm
following it all with great interest. ;-)

Regards,
Fergus

Nov 20 '05 #12

P: n/a
No one on Drawing newsgroup had an answer if there is a BitBlt-like method
or a workaround it in GDI+...using a mask for transparence layer.... without
direct memory access and lock
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:uZ**************@tk2msftngp13.phx.gbl...
Hi Crirus,

|| LOL, I guess I'm well known allready
|| with my struggle with images :)

Lol, yes, I'm certainly aware. I'm no expert in that field but I'm
following it all with great interest. ;-)

Regards,
Fergus

Nov 20 '05 #13

P: n/a
I'm not certain, but, I don't think there is a method in GDI+ to do this.
That is probably why you have not gotten an answer to your question there.
(yep, I'm following this too as I am working on some
Photoshop-like stuff)
james

"Crirus" <Cr****@datagroup.ro> wrote in message
news:uG**************@tk2msftngp13.phx.gbl...
No one on Drawing newsgroup had an answer if there is a BitBlt-like method
or a workaround it in GDI+...using a mask for transparence layer.... without direct memory access and lock
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:uZ**************@tk2msftngp13.phx.gbl...
Hi Crirus,

|| LOL, I guess I'm well known allready
|| with my struggle with images :)

Lol, yes, I'm certainly aware. I'm no expert in that field but I'm
following it all with great interest. ;-)

Regards,
Fergus


Nov 20 '05 #14

P: n/a
Hi,

The ImageList class can blit bitmaps with transparency with its Draw method.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Crirus" <Cr****@datagroup.ro> wrote in message
news:uG**************@tk2msftngp13.phx.gbl...
No one on Drawing newsgroup had an answer if there is a BitBlt-like method
or a workaround it in GDI+...using a mask for transparence layer.... without direct memory access and lock
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:uZ**************@tk2msftngp13.phx.gbl...
Hi Crirus,

|| LOL, I guess I'm well known allready
|| with my struggle with images :)

Lol, yes, I'm certainly aware. I'm no expert in that field but I'm
following it all with great interest. ;-)

Regards,
Fergus



Nov 20 '05 #15

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
It does depend on what you are doing in your programs, of course.
Run-of-the-mill Windows apps don't need pointers. Crirus' bitmap
manipulations? I think there's a good case there.


Computers are getting faster and faster...

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #16

P: n/a
* "Crirus" <Cr****@datagroup.ro> scripsit:
There is any performance drawback on this class versus pinters that C# have?


Why not put the unsafe code into a C# library and use this library with
your VB.NET application?

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #17

P: n/a
Hi Herfried,

Yep, and bitmaps are getting bigger and bigger ... ;-)

Regards,
Fergus

** (higher resolution for more zoom - Crirus <is> talking maps here, after
all)
Nov 20 '05 #18

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
Yep, and bitmaps are getting bigger and bigger ... ;-)


Are you sure, screen resolution and size will get bigger and bigger?

;-)

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #19

P: n/a
Hi Herfried,

I look forward to the table-top screen/graphics tablet - 100cm x 100cm,
120dpi. That's 90MB just for the desktop background image!! ;-))

Regards,
Fergus
Nov 20 '05 #20

P: n/a
* "Fergus Cooney" <fi******@tesco.net> scripsit:
I look forward to the table-top screen/graphics tablet - 100cm x 100cm,
120dpi. That's 90MB just for the desktop background image!! ;-))


ROFL

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #21

P: n/a
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb
* "Fergus Cooney" <fi******@tesco.net> scripsit:
It does depend on what you are doing in your programs, of
course. Run-of-the-mill Windows apps don't need pointers. Crirus'
bitmap manipulations? I think there's a good case there.


Computers are getting faster and faster...


Software developers who think this way are responsible for the need of
faster computers.
--
Armin

Nov 20 '05 #22

P: n/a
Cor
Hi Armin,
I fully agree. That has always been the most stupid solution I did hear.
Hardware developers making computers faster and lousy software developers
making programs slower. So the benefit is zero.
:-)
Cor

Computers are getting faster and faster...


Software developers who think this way are responsible for the need of
faster computers.

Nov 20 '05 #23

P: n/a
* "Cor" <no*@non.com> scripsit:
I fully agree. That has always been the most stupid solution I did hear.
Hardware developers making computers faster and lousy software developers
making programs slower. So the benefit is zero.


I set up Windows 3.11 on my new machine and it takes less than 1 second
to start...

I think computers are not fast enough. When Circus is asking for
pointers because of performance problems, he will have to use a
low-level programming concept. That's really bad. If computers were
faster, image processing in VB.NET would be no problem.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #24

P: n/a
* "Armin Zingler" <az*******@freenet.de> scripsit:
It does depend on what you are doing in your programs, of
course. Run-of-the-mill Windows apps don't need pointers. Crirus'
bitmap manipulations? I think there's a good case there.


Computers are getting faster and faster...


Software developers who think this way are responsible for the need of
faster computers.


ACK. Hardware isn't fast enough for high-level programming yet.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #25

P: n/a
Cor
Hi Herfried,

I follow this thread half and half, soon I need your knowledge, because I
think I am going to do something with bitmaps. (I need maybe a lot of links
and your knowledge).

When it is so far, I tell you and I am sure you will help me, but now I look
with a half eye to this thread.

First of all, I don't believe that C# has really hard memory pointers. I
think it has relative memory pointers. Hard memory pointers where on
mainframe in the very past and came back with the microcomputer. But every
builder of an OS would try to avoid them.
But I don't know enough from C# to say that while being sure, it is just a
guess.
So I am curious if my guess is right?

It always has been, with this speed thing, is that the generic modules for
doing this kind of things are ready when a format is generalised. Looking to
pictures formats now it is for me hash.

But that has been with all things with computers in past. Who ask here for a
WP format question, while in the past that was a very normal format?

And of course you still need speed for the amount of data in a bitmap, but
that has in my eyes nothing to do with pointers.

This became a long message, more for the night for you I think?

Cor


Nov 20 '05 #26

P: n/a
Good morning Cor,

What's a 'hard' pointer? And does that imply some sort of 'soft' pointer?

Regards,
Fergus
Nov 20 '05 #27

P: n/a
Dmitriy Lapshin, not that I like the ideea to add a imageList just for this
multilevel transparency I need, but can you be more specific?
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:O9**************@TK2MSFTNGP12.phx.gbl...
Hi,

The ImageList class can blit bitmaps with transparency with its Draw method.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Crirus" <Cr****@datagroup.ro> wrote in message
news:uG**************@tk2msftngp13.phx.gbl...
No one on Drawing newsgroup had an answer if there is a BitBlt-like method or a workaround it in GDI+...using a mask for transparence layer....

without
direct memory access and lock
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:uZ**************@tk2msftngp13.phx.gbl...
Hi Crirus,

|| LOL, I guess I'm well known allready
|| with my struggle with images :)

Lol, yes, I'm certainly aware. I'm no expert in that field but I'm
following it all with great interest. ;-)

Regards,
Fergus


Nov 20 '05 #28

P: n/a
The only thing I can do right now is to draw the bitmaps pixel by pixel and
calculate the alpha myself from the mask color
I have to draw about 20x14=280 images. Each image has 80 X 80 pixels
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:uZ**************@tk2msftngp13.phx.gbl...
Hi Crirus,

|| LOL, I guess I'm well known allready
|| with my struggle with images :)

Lol, yes, I'm certainly aware. I'm no expert in that field but I'm
following it all with great interest. ;-)

Regards,
Fergus

Nov 20 '05 #29

P: n/a
Cor
Hi Fergus,
Maybe that is my name for it, that I did use by instance in far past to make
a branch to memory adress zero. (null booting of the computer).
Cor
Nov 20 '05 #30

P: n/a
Hi Cor,

Lol. I know that one too! ;-)

I'm not worried about whether the term is correct - I want to know what
<you> mean by it. I'm curious as to what distinction you are making, and this
will help me answer your question about pointers in C#.

[...pause for thought...re-reads the posts...]

I think I've got it, though - you mean a specific address, such as 0000
for the reboot (wasn't there another one at 0080 for a 'soft' reboot,
perhaps). If that's a 'hard' pointer, then a 'soft' pointer would be one
relative to the process' memory space (and translated to a hard address by the
CPU and its associates).

Yes, C# uses soft pointers. But these are as valid for the process as if
they were hard. In order to use them the C# programmer has to 'fix' the object
in memory so that the Garbage Collector will not move it. The address is then
as hard as it gets for a process - direct access to the memory of the object.

For Crirus, then, that will be the bits of the bitmap. For someone else,
it may be the bytes of some structure.

Regards,
Fergus
Nov 20 '05 #31

P: n/a
Cor
Hi Fergus,

That is what I thought.

When someone says C# has the posibility to point to a memory adress, I
always think does he know what he says.

Normaly with modern operating systems you cannot do anything with that
because of the relocating in memory of processes ( I don't know if NT does
that but I asume that it happens when the garbadge is cleaned).

Thank you.

Cor
Nov 20 '05 #32

P: n/a
Hey,

there is some kind of a reward for the longest post launched? :D

Crirus

P.S. No need to answer

"Crirus" <Cr****@datagroup.ro> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Have anyone ideea if there are plans to implement pointers in VB?

Or, have the classes substituting the pointers the same performance?

Crirus

Nov 20 '05 #33

P: n/a
Hi Crirus,

But I'm going to answer anyway, lol.

We had a very long thread with over 100 (wow!!) posts in it a while back.
There was excitement and wonder at the length.

I went Googling and discovered that we were short of the record by a mere
few thousand.

Ah well. ;-))

Regards,
Fergus
Nov 20 '05 #34

P: n/a
Ohh, and I was hoping for a record ...:D
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi Crirus,

But I'm going to answer anyway, lol.

We had a very long thread with over 100 (wow!!) posts in it a while back. There was excitement and wonder at the length.

I went Googling and discovered that we were short of the record by a mere few thousand.

Ah well. ;-))

Regards,
Fergus

Nov 20 '05 #35

P: n/a
* "Cor" <no*@non.com> scripsit:
I follow this thread half and half, soon I need your knowledge, because I
think I am going to do something with bitmaps. (I need maybe a lot of links
and your knowledge).
Didn't you receive the brainconnector yet?
First of all, I don't believe that C# has really hard memory pointers. I
think it has relative memory pointers. Hard memory pointers where on
mainframe in the very past and came back with the microcomputer. But every
builder of an OS would try to avoid them.
But I don't know enough from C# to say that while being sure, it is just a
guess.
So I am curious if my guess is right?


Sorry, I never used 'unsafe' blocks with C# (as a high-level programmer
I never needed them).

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #36

P: n/a
Hi Herfried,

!! Didn't you receive the brainconnector yet?

ROFL.

!! Sorry, I never used 'unsafe' blocks with C# (as a
!! high-level programmer I never needed them).

Oooh, isn't <he> the high and mighty one, then. Wouldn't want to soil his
hands on bits and bytes, wouldn't want to go near those nasty pointer things.

Regards,
Fergus


Nov 20 '05 #37

P: n/a
Cor
Hi Fergus,

I had an other answer, stuffed it because this one is better.

We both have done a lot on memory level programming I think.

But we both have seen, that when the computers where changing, the first
programs which where useless where those with hard (or even virtual)
pointers in it.

Cor
!! Sorry, I never used 'unsafe' blocks with C# (as a
!! high-level programmer I never needed them).

Oooh, isn't <he> the high and mighty one, then. Wouldn't want to soil his hands on bits and bytes, wouldn't want to go near those nasty pointer things.

Nov 20 '05 #38

P: n/a
Cor
Hi Herfried,

I think that my brainconnector works better and better. But there is till
now no connector on bitmaps.

Cor
Nov 20 '05 #39

P: n/a
Hi Cor,

For sure, hard-coded <anything> can limit the life span. But, sadly, many
well-designed, generically coded, super flexible, etc, etc, programs have
similarly fallen to the wayside because of moving times.

RAD - Rapid Application Development :-))

RAD - Rapid Application Disuse :-((

Regards,
Fergus
Nov 20 '05 #40

P: n/a
Cor
Hi Fergus,

Why we always full agree.

:-)

Cor
Nov 20 '05 #41

P: n/a
Hi Cor,

We've seen things, you and me.. ;-))

Regards,
Fergus
Nov 20 '05 #42

This discussion thread is closed

Replies have been disabled for this discussion.