|
OK, by the time your comparison code ends, the screen will have changed.
Read my C# image processing articles for how to access the bits of a bitmap directly. From thre, writing code to compare two bitmaps is trival, and it will be heaps faster. Just write a C# dll that you call from VB.NET.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sorry, i don't use C#, is there no simple way in VB.NET to compare images and: Is there a way to let a window always be on top even in a game which runs in full-screen mode? Because that will solve the problem too.
--Zaegra--
|
|
|
|
|
Zaegra wrote: Sorry, i don't use C#, is there no simple way in VB.NET to compare images
From what I understand, Christian was saying you don't have to use C#. The code to do the comparison happens to be in C#. You can call this from your VB.NET project.
Also, it is a bit finalistic to say "I don't use C#". On a day-to-day basis I don't use VB.NET, but since there are over 45000 similarities between VB.NET and C# and only a few dozen differences it is easy to pick up one if you know the other.
|
|
|
|
|
Zaegra wrote: is there no simple way in VB.NET to compare images
No, there isn't anything in the .NET Framework pre-written for you to do this.
The code to compare two images has to be written in C# is you want the speed. The reason for this is because C# supports pointers in unsafe code blocks while VB.NET doesn't support pointer at all. You can write the library to do image comparisons in C#, then use the resulting .DLL in your VB.NET project.
Zaegra wrote: Is there a way to let a window always be on top even in a game which runs in full-screen mode?
If the game uses DirectX, no there isn't. The game isn't rendered in the same frame buffer as the Windows Desktop. Your window WILL be on top of all other windows, but will still not be visible at all under the DirectX render window, if running in full-screen.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Zaegra wrote: is there no simple way in VB.NET to compare images
What the other guys said, plus, what you wrote above is the only way in VB.NET, and it's slow.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I currently using Visual Studio.Net 2005, I want to create database for SQL but I don't have tool, so please anyone give me address to download it.
................
|
|
|
|
|
|
go and buy a cd for Ms SQL server 2000/2005
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
This means one of two things:
1 - I can't work out how to use google
2 - I'm asking for help in stealing software
If 1, it's pretty simple. If 2, we're not going to help you. SQL Express is free, and easy to find online. SS2005 is not free, and you need to buy it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
I am working with a project where there is a need of report generation.
I had developed the report in crystal reports.
All the data is view properly but the only problem is images.
Images i am accepting the data through richtextbox.rtf into the data base and displaying the data back to crystal report using the data object with setting the property o display rtf data.
But it only loads the text data from the database but not the images between the text.
Any help would be great...
Thankx
Jats
|
|
|
|
|
You might want to ask this question with BusinessObjects support. I don't know if CrystalReports supports inline images in RTF fields.
[EDIT]
Well, my Google-Fu has failed me but briefly. CrystalReports doesn't support any image tags in RTF data. You can find more on it here[^].
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
This is the code:
1.Dim mm As ArrayList = New ArrayList
2.Dim i As Integer
3. For i = 0 To intTotParam - 1
mm.Add(arrInputFileData(arrPosition(i)))
Next
4. Dim ss As String() = mm.Item(0)
5. MessageBox.Show(ss(0))
I am getting the error "Specified cast is not valid" at line 4.
Actually i need to sort the arraylist and find the largest element.
Retrieving the strings that has been added in the arraylists is of primary importance in my project and needed at many places.
Please help me out
|
|
|
|
|
You can't convert an object to a string just like that.
Try converting it to string format first.
|
|
|
|
|
can you give me the code
for converting the object to string format
and displaying in message box
|
|
|
|
|
This is why arraylist totally sucks. You can't use VB.NET 2.0 ?
object has a ToString() method, that's the best way to convert to string.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I tried the following
Dim ob as object
for each ob in tempArray
dim m as string
m=ob
next
if ob had ToString Method it should have shown...but it only has to
GetType method.
Seems there is no way to retrieve strings from the arraylists
|
|
|
|
|
Try Cstr(ob)
Mubashir
Software Architect
Storan Technologies Inc, USA
Every job is a self portrait of the person who did it.
|
|
|
|
|
EVERYTHING in .NET has a ToString() method. It's guarenteed.
srikanth_nair wrote: Seems there is no way to retrieve strings from the arraylists
Rubbish. If it's a string, you can cast it to string. The issue is, the ArrayList is nasty, it stores objects, ToString would not crash, no matter what the object is.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
srikanth_nair wrote: Dim ss As String() = mm.Item(0)
It doesn't work because you tried to convert an object (you didn't say what was stored in arrPosition()), stored in element 0, to an Array of Strings as specified by your String() declaration.
I believe it should have been:
Dim ss As String = mm.Item(0).ToString()
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
How do you validate users input against access database using select statement on vb.net.
LG Pikiso
DME
SDM
+27733100331
|
|
|
|
|
It depends how the data is structured.
|
|
|
|
|
hello,
i have 2 images, both loaded into pictreboxes. Now, i want to compare the pixels using System.Drawing.Bitmap.GetPixel, but i don't know how to do this i tried several things like a for.. next but that didnt work so can someone please give me a code snippet on how to compare 2 images using the GetPixel method??
Thanks in advance, Zaegra
--Zaegra--
|
|
|
|
|
You need a nested loop to compare the x and y directions. You need to post your code for us to understand where you're failing in what is a pretty straightforward task.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have encorporated Window media Player in my Vb.net Project. I am getting the different different Urls and want to play through my media player. But I am not able to play these Urls through media player.Please help me .
I am storing the url in string like str
and then giving the command
windowmedia1.url=str
but it is not playing anything
namita
|
|
|
|
|
I don't use MediaPlayer at all, but it would appear that you have to set the URL property, then call the Play method of the CtrlControls collection.
myPlayer.URL = "some URL..."
myPlayer.Ctlcontrols.play()
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|