![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I have a windows app version for the PC that connects to my PPC.
I move the app on my pc screen to a different location than the center. If I select a new screen, the other window is unhidden and shows at the old location. Is there a way to set the location of the app so that the unhidden screens will not show in different places. |
|
||||
|
In the desktop, you can shoose diferent form sizes to your app, so you you size your form to the current screen resolution, it will cover the entire screen...But this maybe is not what you want...still I've noticed that a reduced size form if "maximized" is putted to the 0,0 position on the screen (Top Left)...
Edit : I missed Agraham's post!!
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
|||
|
I have applied the example to my code with some modifications.
I noticed the unavoidable screen jump and am trying to avoid it. My situation: I love the PPC size for the PC Screen. Also I have 18 screens on my app. So here is a rundown of what I am doing and most of it is working out well. Still having issues with the screen jump. 1.Start App 2. I Initialize all the screens (via a sub-routine) so that I can get the Top and Left Properties and because they initially start in the same location. 3.At the top of each show I make a call to a function which reads in the Previous screen (via a global variable) and New screen. It takes the string names using the Control and sets the New Top/Left to equal the Previous. And then the new string is set as the Previous. Step 3 works perfectly. The only problem that I am having is the startup when I have all the screen jumps. I will try setting all the controls on the screen to be not visible and then resetting them later. It's just to a layman the screen jumps may not come off well. What do you think about my process? It was the most efficient one that I could come up with. But the #1 may not be a good idea? Does it screw up /slow down anything to open all the forms? Thanks for the starter Agraham and thanks for B4PPC Erel. And thanks for taking the time to look at my post CableGuy. |
|
||||
|
The screen jump occurs because when a screen is first shown its Top and Left properties are set to a default and the screen is displayed there before the Top and Left properties are available to be altered.
If your step2 is doing what I suspect, that is looping round the screens before they are shown and setting their Top and Left properties, then this will not work as at this stage the screens do not exist although B4PPC does not throw an error. A screen only exists once it is shown for the first time, only then are the properties available. Step 3 sounds fine and from what you say apparently works. I have a couple of thoughts for a workaround that I will post if they work but that will be tomorrow now as food calls! |
|
||||
|
18 Screens?!
Wow, thats a lot of screens... are they design created or runtime created screens? As agraham states, a screen only exists after 1st presentation, so I would suggest this aproach.. on fresh run, shown all forms in reverse order, thsi should only take a few ms.... By doing this you make all forms existing so they can be propertie changed... Then when showing a form other than main form (form1 by default), re-set the position of the form you want to show.... this eliminates the "jumping" efect, and the first few ms should be almost un-noticeable....
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
|
|||
|
What I meant by initializing all the forms is exactly what Cableguy suggested,
I initialize all the screens by .show for each one. This works except I am getting blips of each screen. I am working on putting all the functionalities in panels and not making visible until later. I will see how this works. I noticed that the screens with little to no major controls ran through without a trace. |
|
||||
|
The only thing I can think of is to do the following.
First make a small app. that can act as a splash screen with an initialisation message that closes itself after a delay Code:
Sub Globals End Sub Sub App_Start Form1.Show ' form has please wait message or similar x = timeadd(now,0,0,3) do doevents ' important! lets the screen finish drawing itself loop until now > x appclose End Sub Code:
Sub App_Start
Form1.Show ' must show here or the first show will be in front of splash screen
shell("splash.exe")
' need a slight delay here to let splash screen load
x = timeadd(now,0,0,1)
do
doevents
loop until now > x
' now show all forms, may need a doevents to let them be drawn in turn or may not
End Sub
There is still a single disturbance on the screen as the main app displays first then the splash screen loads on top off it. Perhaps you could tune the delays and messages so that it looks a deliberate thing. The main screen displays one startup message, waits for the user to read it then shells the splash screen which displays another related message while the main app loads all its' forms. |
|
||||
|
I've played a while with splash screens, and they are, almost always, very simple to code....
I like agraham's idea, specially if you can came up with some litle animation on your splash screen, like a "loading app" bar.... Just an Idea... @Agraham, You don't cease to amaze me...I've never would have thought on shelling a startup app to cover the forms initialization...Great work..
__________________
Paulo Gomes Porto, Portugal PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD PPC: Qtek9000, 1GB SD DLL Version Listing |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Screen Capture App | sahoopes | Share Your Creations | 3 | 04-17-2008 08:05 AM |
| How to clear the screen ? | gjoisa | Questions & Help Needed | 1 | 03-11-2008 05:50 PM |
| Cableguy's location | dzt | Chit Chat | 14 | 10-14-2007 09:22 PM |
| File Location and Setting Paths | XerVision | Questions & Help Needed | 2 | 06-25-2007 10:51 PM |
| Default Installation Location | conniemalan | Basic4ppc Wishlist | 1 | 05-15-2007 02:54 PM |