|
Here the problem is , this code will disable the form also(i.e. the minimze, maximize & restore buttons of the form); How i can resolve this issue...provided...I am not disabling the form anywhere else...
Thanks once again
|
|
|
|
|
I can't tell you what could be wrong with it since I can't duplicate the problem
I created a new project added several controls to a form
copy - pasted your code excatly and ran the form
the form doesn't get disabled so I don't think there is anything wrong with this code
as a last resort you could always add the following code at the end of the function:
me.enable=true
|
|
|
|
|
hi all,
In my vb6 application, i will use Date to get the current date and store it into my database.But sometime when i check in the database, the date will be different from what i see in my computer date. I am not sure what was happen.
Any help are welcome,Thank you.
Note:In my situation, i have 2 (A and B), which application B will map to application A's database where both of them will get the wrong date.
regards
cocoonwls
|
|
|
|
|
Check the Date format used in DB to store date and the format in which you are sending / displaying...
In VB6 you can use "format" command to format ur date before you send / display
Good luck
|
|
|
|
|
hi nisharsh_k,
Thanks for reply. May be i am not describe my question clearly.
For example, the system date is 19-06-2008, but i will get the date 11-05-08 in my database.
So, according to your suggestion, is "format" can be apply in this situation?
Thank you in advance.
regards
cocoonwls I
|
|
|
|
|
i think format will help u in this situation
As you had written...
cocoonwls wrote: For example, the system date is 19-06-2008, but i will get the date 11-05-08 in my database.
Hear ur system date format is "dd-MM-YYYY"
cocoonwls wrote: 19-06-2008
and ur DB date is "dd-MM-YY"
cocoonwls wrote: 11-05-08
this indicates that when you send date in a query it is not treated the way you expect as it is too long.... i am not sure how ur DB is looking at it (truncating or something) and storing it differently
good luck
|
|
|
|
|
Thanks your reply. I will check it again.But for this problem, it is not happen frequently,but just sometime..
|
|
|
|
|
depending on the database you use, use the format function
SQL (probabaly oracle too): Format(date, "yyyyMMdd")
Access: Format(date, "yyyy/MM/dd")
Normally the sql one should be universal for all (or most) database's
hope this helps
|
|
|
|
|
how can i convert image exists in picturebox into bitstream using array function.
|
|
|
|
|
Hi...
i do not know what exactly you mean by array function... I am taking it as you want the picture to be stored in a array of bytes...
Plz look at the sample code...
'Define a memory stream
Dim ms As MemoryStream = New MemoryStream()
'Get the image into ms from picture box
pic.Image.Save(ms, pic.Image.RawFormat.Gif)
'Define a byte stream of length of memory stream and transfer the ms to it
Dim bytesA(CInt(ms.Length - 1)) As Byte
ms.Seek(0, SeekOrigin.Begin)
ms.Read(bytesA, 0, CInt(ms.Length))
ms.Dispose()
Good luck
|
|
|
|
|
i need to convert the image into points .
|
|
|
|
|
Ok... for that you have to read every pixel of the image and store the location and color of it...
I had not tried that out... but for sure it is possible...
But why do u want to do it that ways???
If u just need the image to be recreated at destination this will solve ur purpose..
Regards
Nishkarsh
|
|
|
|
|
i had tried , but i couldn't so i asked help
i want this this way cause i thought it is the easiest one
so plz if u've any ideas forward it to me and i'll be greatful
thanks anyway.
|
|
|
|
|
sorry for late reply... i was out in the weekend...
I can tel what i am doing.... My objective was to read the image as binary data and fire a query to store it and read back to display form a DB...
If this is of any use then i will send u the sample code...
|
|
|
|
|
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
|
|
|
|
|