Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / FoxPro / Setup / October 2004

Tip: Looking for answers? Try searching our database.

cannot display a menu in a tools bar when i build the program

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mun - 19 Oct 2004 02:03 GMT
Dear all,
before i build the program, i create a new menu that will do customer form ,
supplier form and others. when i want to build a exe file , the menu didn't
show on the top of the toolbar, but all the form involved show in a
application frame and the default windows toolbar show on top of the screen.
so how can i invisble all the default windows toolbar and show my menubar on
the top of the screen where can allow me to choose my form?
thanks!

regards,
mun
Stefan Wuebbe - 19 Oct 2004 07:25 GMT
Hi Mun,

> Dear all,
> before i build the program, i create a new menu that will do customer form ,
> supplier form and others. when i want to build a exe file , the menu didn't
> show on the top of the toolbar,

You'll need to run the MPR file, e.g. somewhere early in your "main.prg"
   Do myMenu.mpr

> but all the form involved show in a application frame

If you don't want to see the  _Screen  object at runtime, you can turn
it off. Include a "config.fpw" file (ASCII) with your project with a line
   screen=off
(no quotes)

   
> and the default windows toolbar show on top of the screen.
> so how can i invisble all the default windows toolbar and show my menubar on
> the top of the screen where can allow me to choose my form?
> thanks!

You won't get the IDE toolbars in a stand-alone "yourproject.EXE"
And also not if you don't use the current development foxuser.dbf
In the "config.fpw" mentioned above you can add another line
   resource=off
(no quotation marks again)
Otherwise you'd need a start-up method turning them off
   If Wexist('standard')
       Hide Window 'standard')
   Endif
   && and so on for each IDE toolbar name

hth
-Stefan
mun - 19 Oct 2004 09:59 GMT
dear stefan wuebbe,
i already add the "screen=off" and resource=off" in the config.fpw file, but
it still same as previously! is it i add wrongly, actually i not very
understand because i the beginner of using visual fox pro, so can u explain
more detail? thanks! waiting for your reply!

> Hi Mun,
>
[quoted text clipped - 32 lines]
> hth
> -Stefan
Stefan Wuebbe - 19 Oct 2004 10:19 GMT
Two possible causes might be syntax - although yours looks good..
i.e. the file content should look like
   screen=off
   resource=off

And the config.fpw must be available at runtime. That is you can
add it to your project and right-click it to mark it as "included".
Or ship it separately. If the latter, it must be in the current directory,
your app's root folder usually (unless you use the -C command line
switch, see help).
You can check the current config file at runtime using Sys(2019)

hth
-Stefan

> dear stefan wuebbe,
> i already add the "screen=off" and resource=off" in the config.fpw file, but
[quoted text clipped - 38 lines]
>> hth
>> -Stefan
mun - 19 Oct 2004 10:47 GMT
Dear Stefan Wuebbe,
Thanks for your reply, i follow what you teach me! but still same as
previously!
can u suggest any idea for me? waiting for your reply! thanks!

regards,
shokmin
Stefan Wuebbe - 19 Oct 2004 11:34 GMT
Hm, not sure how to continue...
The steps discussed earlier actually do work, so I'd guess you'll get
it solved. What does Sys(2019) return?, for example when you put
it somewhere in your code, say add a test button to a form and in its
.Click() run a line like
   Messagebox( Sys(2019) )

However, while the config.fpw line might be your best option, you
can also access the _screen object later in your code.
Different syntax though
   _screen.Visible = .F.

In both cases you'll need at least one TopLevel form
(set form.ShowWindow property to 2 in the property sheet in the
IDE at design time)
Subsequent forms can be In-Top-Level as well
(form.ShowWindow=1)

hth
-Stefan

> Dear Stefan Wuebbe,
> Thanks for your reply, i follow what you teach me! but still same as
[quoted text clipped - 3 lines]
> regards,
> shokmin
Stefan Wuebbe - 19 Oct 2004 11:52 GMT
Another gotcha might be that when you create a new ASCII file
using Windows' Notepad and try to save it as "config.fpw",
you'll get an "config.fpw.txt" file instead, which will not be read
by the Vfp runtime (unless you point to it using the -C command
line switch)

Or maybe descriptions in other words than my broken English can
help - you can scan the NG archives at
http://groups.google.com/advanced_group_search
Try these threads for example
http://groups.google.com/groups?as_q=config.fpw%20screen%20off&safe=images&as_ug
roup=*fox*&lr=&hl=en


hth
-Srefan

> Dear Stefan Wuebbe,
> Thanks for your reply, i follow what you teach me! but still same as
[quoted text clipped - 3 lines]
> regards,
> shokmin
mun - 19 Oct 2004 10:13 GMT
Dear Stefan Wuebbe,
actually, the MPR file, is it a menu file(.mnx)? u told me add the "Do
myMenu.mpr" in the code of "main.prg", but i dun know whether the .mpr is
same as .mnx file?eg: my menu file is "mnutest.mnx" and the program file is
"testing_app.prg" which is auto generate when i create a project by using the
wizard. so i add the "Do mnutest.mpr" at the early of the code in
testing_app.prg file, so is it the testing_app.prg same as the main.prg file
which u told me?

waiting for your reply!thanks!

regards,
mun
Stefan Wuebbe - 19 Oct 2004 10:54 GMT
> Dear Stefan Wuebbe,
> actually, the MPR file, is it a menu file(.mnx)? u told me add the "Do
[quoted text clipped - 4 lines]
> testing_app.prg file, so is it the testing_app.prg same as the main.prg file
> which u told me?

When your menu is called "mnutest", then mnutest.MPR is the one
containing your actual menu code.

I don't use the Application Wizard though ...
What I called "main.prg" is the one which is displayed in bold font
in your project manager, that is the "main" file of the project, IOW
the entry point of your custom code at runtime.

As for the Wizard's main.prg structure, it can be quite confusing to
read. Hm, actually I do not remember at all how it looks <cough>

Can you try adding some break points to see which part runs right
before the READ EVENTS command?

hth
-Stefan
mun - 20 Oct 2004 04:05 GMT
Stefan,
very thanks for your reply and teaching! The problem is settled already! i
think my file got something wrong! so, i redo all the form and it work!

so, i build the file as exe file and try to run from another pc which is
windows XP Home and Windows 98, but a error message come out said that
"Cannot locate library file support", so i copy "vfp6r.dll", "vfp6renu.dll"
and "msvcrt.dll" to that 2 pc. for windows xp ,it work; but for windows 98, i
cannot see the .dll file from my pc, so i cannot copy the .dll files to the
pc (windows 98). i copy the file though network (LAN).

so, i copy the .all file from my pc to the diskette, when i open the
diskette from pc(win 98), the .dll file cannot see, but for window xp , the
files can see! can u told why this problem occurs and how to solve it?

waiting for your reply! Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.