Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Save information drawn on a form


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-04-2007, 11:52 AM
Newbie
 
Join Date: Oct 2007
Posts: 7
Default Save information drawn on a form

Hi,
I have used the ImageLib library to draw a rather complex image on the form made out of a hundred small images (with transparency) and some text. From time to time I plan to cover the entire screen with a messagewindow made of a large image with text on it and wonder if anybody knows of a way to store the original information (in a bitmap?) of the form so I can restore the screen after the messagewindow is closed without redraw all the hundres small images?

I have tried to draw the messagewindow on the forelayer but this causes the screen to flicker (I don't konw how to stop the automatic refresh of the forelayer). I have also tried to use images and imagebuttons but they don't handle transparency or positioning of the text.

Sincerely,
Max Tillberg
Reply With Quote
  #2 (permalink)  
Old 11-04-2007, 12:21 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,473
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Could you use a second separate form for the message window?
Reply With Quote
  #3 (permalink)  
Old 11-04-2007, 12:33 PM
Newbie
 
Join Date: Oct 2007
Posts: 7
Default

I never thought of that, I will try it. Thanks.

Sincerely,
Max Tillberg
Reply With Quote
  #4 (permalink)  
Old 11-05-2007, 07:11 PM
Newbie
 
Join Date: Oct 2007
Posts: 7
Default

To be able to use two full screen forms I guess I have to use the following code
Code:
Sub App_Start
Form1.Show flb.New1("Form1",B4PObject(1)) flb.FullScreen(CPPC) flb.New1("Form2",B4PObject(1)) flb.FullScreen(CPPC) drawer.New1("Form1",false)
End Sub drawer.New1("Form2",false) 'After a button is pressed '...Draw the information on Form2 'And finaly Form2.Close 'after a new button is pressed
Is this the best way to work with two forms?

Sincerely,
Max Tillberg
Reply With Quote
  #5 (permalink)  
Old 11-05-2007, 07:15 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,199
Default

Not too sure but, i was under the impression that, once in fullscreen, all forms were afected by the setting...

As I sai, not sure...
Your code look correct, still I would suggest that you create 2 diferent objects for the forms, so that you can use the library in a more restrictive way...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #6 (permalink)  
Old 11-05-2007, 07:16 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,973
Default

As Cableguy wrote you should add two FormLib objects (one for each form).
Reply With Quote
  #7 (permalink)  
Old 11-05-2007, 07:40 PM
Newbie
 
Join Date: Oct 2007
Posts: 7
Default

The second form was fullscreen on the PC but not the PocketPC.

I added a second formlib and changed the code to

flb1.New1("Form1",B4PObject(1))
flb1.FullScreen(CPPC)
flb2.New1("Form2",B4PObject(1))
flb2.FullScreen(CPPC)

Should I use two drawers as well?

Sincerely,
Max Tillberg
Reply With Quote
  #8 (permalink)  
Old 11-06-2007, 05:33 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,973
Default

If you use drawers to draw on the forms then you should create one for each form.
Reply With Quote
  #9 (permalink)  
Old 11-06-2007, 08:41 PM
Newbie
 
Join Date: Oct 2007
Posts: 7
Default

Hi again,
One more question about using two full screen forms. When I run the program on a PC the program window remember it's position for each form; if I move the progam window when the message window form is open, the entire program moves to it's original position when I hide this form. Is there a way to avoid this?

Sincerely,
Max Tillberg
Reply With Quote
  #10 (permalink)  
Old 11-07-2007, 08:26 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,473
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

A form has undocumented Top and Left properties. See this link

Is there a way to keep the screen in the same location.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
FilesEx library - returns file information agraham Additional Libraries 13 07-25-2008 04:23 PM
How catch a selected treeview item information by mouse ? dan kabestan Questions & Help Needed 2 01-08-2008 06:30 PM
Reading com ports information from the registry Erel Code Samples & Tips 4 11-23-2007 01:09 PM
save filter of a table manu Questions & Help Needed 4 08-23-2007 03:46 PM
How to set the Version Information in the exe file ? XerVision Questions & Help Needed 1 08-10-2007 07:01 AM


All times are GMT. The time now is 10:20 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0