|
thanx alot & am deeply sry for bothering you,
plz send me the sample code & i need the (Imports system *) that i can use it with images .
cause i couldn't run any code without it .
am not familliar with VB.net , but i've to learn it .
thanx anyway.
|
|
|
|
|
Code to read the IMAGE from PICTURE BOX
Imports System
Imports System.IO
Imports System.Text
'Declare a memory stream
Dim ms As MemoryStream = New MemoryStream()
'Get the image into ms from picture box (Treating it as a gif, you can chuse ur format)
picBox.Image.Save(ms, picBox.Image.RawFormat.Gif)
'Define a byte stream of length of memory stream and tranfer the ms to it
Dim bytes(CInt(ms.Length - 1)) As Byte
ms.Seek(0, SeekOrigin.Begin)
ms.Read(bytes, 0, CInt(ms.Length))
ms.Dispose()
So this code will make it sure that you have the image in a array of bytes and you can do what u want with it..
Once you read the picture back from DB as byte array you can display it as
Dim ar(dataLength) As Byte
myReader.GetBytes(0, 0, ar, 0, dataLength)
myReader.Close()
'Define a memory stream
Dim b As New MemoryStream(ar)
picBOx.Image = Image.FromStream(b)
b.Close()
Good Luck
Nishkarsh
|
|
|
|
|
really thanx alot dear ,
may i ask your help again when i need it ???
|
|
|
|
|
hi how r u ??
sry for botering u , but i need to ask 2 questions
1-how can i compress an image using VB.NET ??????
2-what is the imports system.* that i can use it with this statment:
picturebox.image=system.drawing.image.fromfile(openfiledialog.filename)
|
|
|
|
|
i need the VB.net code for the camera program which exists in the pocket pc that drive the picturing and recording applications.
it is important plz.
|
|
|
|
|
sorry i had not interacted with any camera till now... but if u get some codes like that plz do give me a sample....
|
|
|
|
|
i need something called POCKET PC OCX .
plz if u know anything about it forward it to me .
thanx anyway
|
|
|
|
|
Sorry .
I need the functions that i can start my code with.
|
|
|
|
|
Seriously, you need to learn how to use the "reply" button.
(For anyone who is interested the conversation is spread throughout the forum: first here[^] and then here[^])
|
|
|
|
|
Hmmm, if he graduates, he is a graduate to avoid since he cannot seem to do the project on his own, let alone keep replies in one thread
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
|
Ok, here you go
Start()
Work()
End()
Set Graduate = FAIL
If you want some one to write code, employ a programmer - rent a coder is a good site.
Also, at the bottom of each posting here is a link called Reply. Guess what it is for?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
In My application i want to text wheather there are more occurences of '{' than '}' or vice
versa in a rich text box.
How would I go about finding how often each of these charcters occurs?
|
|
|
|
|
Oh... I've just figured it out all by myself
Here's the code if it's useful to anyone else:
'-------------------------------------------------------------------------------
Function FindInstance(ByVal CharacterToFind As String)
Dim Counter As Integer = 0
Dim CurrentPosition As Integer = 0
Dim InstanceCounter As Integer = 0
While Counter < CodeView.TextLength
CodeView.SelectionStart = CurrentPosition
CodeView.SelectionLength = CharacterToFind.Length
If CodeView.SelectedText = CharacterToFind Then
InstanceCounter += 1
End If
CodeView.SelectionLength = 0
CurrentPosition += 1
Counter += 1
End While
Return InstanceCounter
End Function
'--------------------------------------------------------------------------------------
Where 'CodeView' is the textbox/richtextbox being searched.
|
|
|
|
|
hi
sry i didn't understand ur answer
so will u explain it by detailed code in VB.NET
i need to convert the picture into 1's and 0's (points) and write code using array function then send it via GPRS connection . and i'll use UDP packet
|
|
|
|
|
What they mean is nobody is going to write your code for you, so it looks like you will not graduate.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
waz up
what's the question ?!
|
|
|
|
|
i need to convert the image into points.
|
|
|
|
|
witch image ?
" I love deadlines. I like the whooshing sound they make as they fly by. "
|
|
|
|
|
Okay, I'll give you a pointer, assuming you know VB.net, but not much about the graphics classes.
Dim bmp As Bitmap = CType(Image.FromFile("c:\bmp.png"), Bitmap)
For x As Integer = 0 To bmp.Width - 1
For y As Integer = 0 To bmp.Height - 1
Dim pixelAlpha As Byte = bmp.GetPixel(x, y).A
Dim pixelRed As Byte = bmp.GetPixel(x, y).R
Dim pixelGreen As Byte = bmp.GetPixel(x, y).G
Dim pixelBlue As Byte = bmp.GetPixel(x, y).B
Next
Next
This should do the graphics bit - slowly, but it'll work.
On the other side, you will need to use bmp.SetPixel...
bmp.SetPixel(x, y, Color.FromArgb(pixelAlpha, pixelRed, pixelGreen, pixelBlue))
The rest, I'm afraid, is up to you.
|
|
|
|
|
thanks alot for cooperation . i'll try to complete it .
thanks again
|
|
|
|
|
i've tried this code but when i run it it gives error . i could not find the problem so will u help me .
thanx for ur help anyway.
|
|
|
|
|
i've tried this code but it gives me error when i run it. so will u help me.
Dim ImageFile As FileInfo = New FileInfo("c:\1.jpg")
Dim fs As FileStream = New FileStream(ImageFile.FullName, FileMode.Open, FileAccess.Read)
Dim ImageBytes() As Byte
ReDim ImageBytes(CInt(ImageFile.Length))
fs.Read(ImageBytes, 0, CInt(ImageFile.Length))
|
|
|
|
|
Hi to everyone,
I'm just new to Visual Basic .Net, I want to know how to create a simple DATABASE apllication, with ADD, EDIT DELETE option.
Thanks
Raff
|
|
|
|
|
There are a lot of good articles on CodeProject[^], a lot of links on Google[^], and a lot of good books[^] concerning database applications.
|
|
|
|