Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: LCD Simulator

  1. #1
    Low Bitrate Thelgord's Avatar
    Join Date
    Jan 2007
    Location
    Wahiawa, HI
    Posts
    67

    LCD Simulator

    I got the idea from here.

    So I decided to write my own. Still isn't finished, but the hardest parts are complete, just the tedious parts remain. So far I can render text in stringvar up to 30 characters (I will work on that limitation later), but so far only the lower case letters a-m are supported. I should be finished with the text rendering by monday. So far only one font size(9px x 13px), and no built in animation, but you can code your own just by changing control.text property. I should also have the color pallet adjustable by then.

    The main reason I did this is that I need one for a front end I am working on for a friend, and I really couldn't see spending $30-80 on something like this.

    Is anyone interested in testing this out? It will probably be ready around wendsday or so.


    CarPuter
    ----------------------------
    Planning....[||||||||||]60%
    Parts.......[||||||||||]20%
    Construction[||||||||||]0%
    Software....[||||||||||]0%


  2. #2
    Low Bitrate MOnline's Avatar
    Join Date
    Apr 2007
    Location
    Holland, Poeldijk (Near The Hague)
    Posts
    81
    I would definitly like to try it out. I have created a simple one a while ago but it just didn't work good enough. It was far to processor intensive.

    With kind regards,

    FG van Zeelst

    PS. It might be usefull to specify what programming language you are using .

  3. #3
    Low Bitrate Thelgord's Avatar
    Join Date
    Jan 2007
    Location
    Wahiawa, HI
    Posts
    67
    I am having the same problem. It looks alright, but the text updates are not fast enough and if you get a string of text more than 20 characters it visably slows down a lot and CPU usage jumps way to high while it's running.

    I am using VB.net btw

    I think I need to learn DirectX. My first try was to use a series of images but that created way to much HD access, but it did run a lot faster and you lost the ability chage it's colors.

    Perhaps I can make a series of icons and embed them into the control but again, you would only get the color scheme that was there. ::


    CarPuter
    ----------------------------
    Planning....[||||||||||]60%
    Parts.......[||||||||||]20%
    Construction[||||||||||]0%
    Software....[||||||||||]0%


  4. #4
    Low Bitrate MOnline's Avatar
    Join Date
    Apr 2007
    Location
    Holland, Poeldijk (Near The Hague)
    Posts
    81
    Yeah indeed speed is always a problem. Just did a search of pscode and found a piece of code that could help you. I am not that good using vb more a c++ but check it out I think it could help you.

    With Kind Regards,

    FG van Zeelst
    Attached Files Attached Files

  5. #5
    Low Bitrate Thelgord's Avatar
    Join Date
    Jan 2007
    Location
    Wahiawa, HI
    Posts
    67
    Wow thanks much

    It helps a lot


    CarPuter
    ----------------------------
    Planning....[||||||||||]60%
    Parts.......[||||||||||]20%
    Construction[||||||||||]0%
    Software....[||||||||||]0%


  6. #6
    Low Bitrate MOnline's Avatar
    Join Date
    Apr 2007
    Location
    Holland, Poeldijk (Near The Hague)
    Posts
    81
    No problem, cant wait to see how it turns out.

  7. #7
    Low Bitrate Thelgord's Avatar
    Join Date
    Jan 2007
    Location
    Wahiawa, HI
    Posts
    67
    What I have learned so far:

    The source you proved was in VB6(Maybe vb5, the comments are unclear on this) so I can't directly compile it as I no longer have vb6. However I know vb6 well enough to be able to follow the code.

    The author built a custom wrapper for the gdi.dll. This is now called GDI+ and is included with the DirectX SDK. Under .Net its accessed "normally" by creating a gaphics object (vb.net: Dim g as Graphics)

    I am already using that method but apperently not to its fullest potential. In VB.Net there are 3 basics types of graphics. 1) Is what is held in the PictureBox control 2) The Image control (Dim i as New Image) and 3) The Graphics control.

    The problem is the data they use are not easily trasferable between the types. The path I took was to use "Image" controls and then use "Graphics" to manipulate them (change pixel colors). This was a disaster. With an 11x16 picture you have 176 pixels, and thus upto 176 seperate instructions. With a possability of 30 (A string of 30 characters)such images you have a max of 5280 commands to preform every time you want the text to change. That doesn't include what windows is doing in the background.

    What they did in the source you provided to bypass just about everything and access the gdi.dll directly, giving them much more control on what happend and when. I don't know how well it worked, but it had to be faster.

    Rather than set it up as images, they manipulated the way a font (or even a picture) was drawn on to (from what I can tell) the form, or at last whatever they used for a container. I didn't spend to much time at the code for the form except to find out what subs/function to look at.

    While they could learn something about documenting code, all in all, its very a nice piece of work. Thanks again for sharing


    CarPuter
    ----------------------------
    Planning....[||||||||||]60%
    Parts.......[||||||||||]20%
    Construction[||||||||||]0%
    Software....[||||||||||]0%


  8. #8
    Low Bitrate MOnline's Avatar
    Join Date
    Apr 2007
    Location
    Holland, Poeldijk (Near The Hague)
    Posts
    81
    Hi,

    Thanks for explaining. Sorry I did not see it was a vb6 code. Have them both on my pc and was pretty tired when i wrote the message (had a rough day ).

    But still as far as I can see it was usefull to you. Try searching http://www.pscode.com/ maybe there is a better example. It was just a quick search .

    With kind regards,

    FG van Zeelst

  9. #9
    Low Bitrate Thelgord's Avatar
    Join Date
    Jan 2007
    Location
    Wahiawa, HI
    Posts
    67
    Thanks again


    CarPuter
    ----------------------------
    Planning....[||||||||||]60%
    Parts.......[||||||||||]20%
    Construction[||||||||||]0%
    Software....[||||||||||]0%


  10. #10
    Low Bitrate MOnline's Avatar
    Join Date
    Apr 2007
    Location
    Holland, Poeldijk (Near The Hague)
    Posts
    81
    He Thelgord how is the project comming. Can't wait to see the result .

    With kind regards,

    FG van Zeelst

Page 1 of 2 12 LastLast

Similar Threads

  1. Lcd grounding issue, can't get rid of flickering
    By diskey in forum LCD/Display
    Replies: 4
    Last Post: 05-23-2006, 04:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •