LCDInfo.com http://forum.lcdinfo.com/ |
|
Programming a T6963C (Visual Basic) http://forum.lcdinfo.com/viewtopic.php?f=9&t=127 |
Page 3 of 11 |
Author: | Henri [ Thu Feb 20, 2003 23:47 ] |
Post subject: | |
I believe that reading the data pixel at a time is the slowest part in that. At least it was in C++ Builder. Do you know if there is any way to get straight access to the data ? Are you sure that there is a delay or if the writing is just so slow ? |
Author: | Marc [ Fri Feb 21, 2003 0:42 ] |
Post subject: | |
Is the writing that is slow. At this time, the function reads the pixels from a picturebox, i think that this is the problem slow writing. I will try to implement a function that reads bytes from an array, but I don't know how to "transform" the pixel in a byte. I hope you can help me. Thanks. |
Author: | Emil [ Fri Feb 21, 2003 5:55 ] |
Post subject: | |
Hi Marc Quote: but I don't know how to "transform" the pixel in a byte. I hope you can help me
Sorry for my poor english, i'am German I hope i can help you. Please check this Code: Public Function PixelToHex(cntrl As Control, xoff As Long, yoff As Long, Width As Long, Height As Long) As String Dim B() As Byte Dim hdc As Long Dim xi As Long Dim exp As Long Dim x As Long Dim Y As Long Dim cnt As Long Dim pix As Long Dim hx$ Dim hexx$ ' die Breite, width, wird hier in Pixel angegeben, nicht in Byte. ReDim B(Width * Height) hdc = cntrl.hdc cnt = 0 For Y = 0 To Height - 1 For x = 0 To Width - 1 Step 8 cnt = cnt + 1 For xi = 0 To 7 'pix = GetPixel(hdc, xoff + x + xi, yoff + y) pix = cntrl.Point(xoff + x + xi, yoff + Y) If pix = 0 Then exp = 7 - xi B(cnt) = B(cnt) Or 2 ^ exp End If Next xi Next x Next Y 'Bis hierhin in Byte 'Nun nach Hex Konvertieren For x = 1 To cnt hx$ = Hex$(B(x)) If Len(hx$) = 1 Then hx$ = "0" + hx$ End If hexx$ = hexx$ + hx$ Next x PixelToHex = hexx$ End Function I hope that is what you will Run the code with fellow Function Code: Dim H$
H$ = PixelToHex(Picture1, 0, 0, 240, 128) You can translate it for your work! when you not will use "HEX" Greetings Emil PS: I hope you can help me out with your MODUL of T6963C |
Author: | Emil Weiss [ Fri Feb 21, 2003 5:58 ] |
Post subject: | |
delete |
Author: | Marc [ Fri Feb 21, 2003 11:34 ] |
Post subject: | |
A lot of thanks Emil This night i will try your code, and tomorrow i will post the results, thank you very much. Bye ! |
Author: | Guest [ Fri Feb 21, 2003 12:00 ] |
Post subject: | |
Hi Marc Marc wrote: A lot of thanks Emil
This night i will try your code, and tomorrow i will post the results, thank you very much. Bye ! Please can send me, when finished and it work that Modul from your project? Greetings Emil |
Author: | Marc [ Fri Feb 21, 2003 13:29 ] |
Post subject: | |
Ok! When I have it, i will post it. But what do you want ??? The function that you have send is in Visual Basic yet. I don't understand what do you want, tell me it, and i will post it this night. Thanks |
Author: | Guest [ Fri Feb 21, 2003 19:47 ] |
Post subject: | |
HI Marc I'am working on a Prog in german.. for T6963C Yes.. please send my the routines for VB with the *.bas Modul Greetings Emil |
Author: | Emil Weiss [ Fri Feb 21, 2003 19:52 ] |
Post subject: | |
delete |
Author: | Marc [ Fri Feb 21, 2003 20:38 ] |
Post subject: | |
Emil what module do you want ?? For Visual Basic 6 or Visual Basic .NET ¿? This night or tomorrow , i will send you the module ok ¿? Nice screenshots, what do the project ¿? What make ¿? Bye! |
Author: | Emil Weiss [ Fri Feb 21, 2003 21:50 ] |
Post subject: | |
delete |
Author: | Marc [ Fri Feb 21, 2003 22:09 ] |
Post subject: | |
Ok, but tell me, the module for Visual Basic 6 or Visual Basic .NET ¿?!¿!? |
Author: | Emil Weiss [ Fri Feb 21, 2003 22:27 ] |
Post subject: | |
delete |
Author: | Miikka [ Fri Feb 21, 2003 22:38 ] |
Post subject: | |
Emil Weiss wrote: Hi Marc
Please module for Visual Basic 6 verry poor my english Sorry.. Greetings Emil Hi! Me too Visual Basic 6 module Thanks! |
Author: | Marc [ Fri Feb 21, 2003 22:46 ] |
Post subject: | |
Please what function you use to draw bytes (of pixels) ?¿? Thanks |
Page 3 of 11 | All times are UTC + 2 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |