|
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
|
|
|
|
|
Guys,
Does anyone here can help me to create a utility program in vb6 that will prevent certain exe program from running? Can anyone give me code snippets.
Thanks!
Chito
|
|
|
|
|
That's physically not possible. How would you hope it would work ? If it were possible, VB6 isn't going to do 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 )
|
|
|
|
|
You can't do what you want because you'd have to hook Windows Loader to do it. This is "black-art" type stuff that has very little to no documentation on how to do it. Any examples of hooking API functions are going to be in C++ and do things that VB6 is no capable of producing a .DLL or .EXE for.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi all. I have a listview with images and my application must be able to rotate one image. I need a method to rotate 90 degrees rigth (i.e.).
Is that possible?
Regards,
Diego F.
|
|
|
|
|
Try using this:
Load the image from the listview in a picturebox.
Then:
PictureBox1.Image.RotateFlip(RotateFlipType.Rotate90FlipNone)
And then load it back into the listview.
I think that might do the trick.
--Zaegra--
|
|
|
|
|
I'm tryint that but it doesn't work
If DADLV1.SelectedItems.Count > 0 Then
Dim pb As New PictureBox
Dim indice As Integer = DADLV1.SelectedItems(0).ImageIndex
pb.Image = ImageList1.Images(indice)
pb.Image.RotateFlip(RotateFlipType.Rotate180FlipXY)
DADLV1.Refresh()
End If
Regards,
Diego F.
|
|
|
|
|
Why would you do this ?
ImageList1.Images(indice).RotateFlip(RotateFlipType.Rotate180FlipXY)
is all you need, unless it returns an image, then you may need
ImageList1.Images(indice) = ImageList1.Images(indice).RotateFlip(RotateFlipType.Rotate180FlipXY)
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 )
|
|
|
|
|
Yes, i didn't think of that but that method is way better.
--Zaegra--
|
|
|
|
|
I tried that line, but no rotation is done.
ImageList1 is the imagelist that keeps the images shown in the listview
DADLV1 is the listview
I tried also that:
Dim indice As Integer = DADLV1.SelectedItems(0).ImageIndex DADLV1.SelectedItems(0).ImageList.Images(indice).RotateFlip(RotateFlipType.Rotate180FlipXY)
But nothing occurs.
It seems quite simple. I don't know why it doesn't work.
Regards,
Diego F.
|
|
|
|
|
you are rotating the image in "pb" but not placing back in "DADLV1"
so "DADLV1" is still having the unrotated image.
Regards
KP
|
|
|
|
|
It still doesn't work.
Maybe I'm trying to rotate the wrong thing
Regards,
Diego F.
|
|
|
|
|
I could do it with that code:
Dim indice As Integer = DADLV1.SelectedItems(0).ImageIndex
Dim im As System.Drawing.Image = ImageList1.Images(indice)
im.RotateFlip(RotateFlipType.Rotate90FlipNone)
ImageList1.Images(indice) = im
DADLV1.Refresh()
But now the problem is that images have different vertical and horizontal size and the rotation just work in a perfect square as I see, so it doesn't rotate the whole image.
Regards,
Diego F.
|
|
|
|
|
I still keep trying.
Must all images in a listview have the same size? My images have the proportions of a standard document and I would like rotated images look landscape instead of vertical. I don't know if that's possible.
Other solution is to assign square size to all images, but then images adapt the new size and the proportions are wrong.
Regards,
Diego F.
|
|
|
|
|
hi..
how to create a .exe file in vb.net
its very urgent
thanks & regards
|
|
|
|