473,385 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VFP application NOT vivsible

harshadd
176 100+
See the below VFP 6.0 code, save this code as test.prg
Ctrate a project and add this code as program into the project.
Problem: why I am not able to see the form window when i run this code from VFP or after building an EXE out of that.?
Form is set as modless (WindowsType=0)
Formset is set as Modal (WindowsType=1)
Showindow = 2 for form
Application.visible=.f. is in forms init.
If application.visible = .t. then I see foxprow window. which i do not want.

Expand|Select|Wrap|Line Numbers
  1. Set proc to test
  2. Public firsttime
  3. Do firstRun
  4. *do form regpivot
  5.  
  6. ****************START CODE****************
  7. Procedure firstRun
  8.     Public oform1,dstnarry
  9.     Use masters\dstnmast.dbf
  10.     std_frmset=createobject('MyFormSet')
  11.     std_frmset.visible=.t.
  12.  
  13.  
  14. Endproc
  15. ****************FORM CODE****************
  16. Define class MyformSet as formset Olepublic
  17.     WindowType = 1
  18.     Procedure init
  19.     * step on
  20.         oform1=Createobject('FORM1') 
  21.         oform1.visible=.t.
  22.         Read events
  23.     Endproc
  24. Enddefine
  25.  
  26. Define CLASS form1 AS FORM Olepublic
  27.     visible=.t.
  28.     Height = 445
  29.     Width = 567
  30.     MinWidth= 567
  31.     MaxHeight=445
  32.     MaxWidth=567
  33.     minHeight=445
  34.     maxbutton=.f.
  35.     minbutton=.f.
  36.     DoCreate = .T.
  37.     AutoCenter = .T.
  38.     BorderStyle = 1
  39.     Caption = "Aviation Pivot 2008 configuration."
  40.     MaxButton = .F.
  41.     MinButton = .F.
  42.     Name = "Form1"
  43.     WindowState=0
  44.     ShowWindows=2
  45.     WindowType = 0
  46.     PROCEDURE init
  47.         application.visible=.f.
  48.  
  49.     ENDPROC
  50.     procedure destroy
  51.         application.visible=.t.
  52.         thisform.release
  53.     endproc
  54.  
  55.     Add OBJECT txtolbfile AS ComboBox WITH ;
  56.         HEIGHT = 27, ;
  57.         LEFT = 200, ;
  58.         READONLY = .f., ;
  59.         TABINDEX = 2, ;
  60.         TOP = 6, ;
  61.         WIDTH = 70, ;
  62.         NAME = "txtOLBFILE", ;
  63.         RowSourceType = 6, ;
  64.         RowSource = "DSTN", ;
  65.         CONTROLSOURCE = "DSTN"
  66.  
  67.     Add OBJECT label1 AS LABEL WITH ;
  68.         AUTOSIZE = .T., ;
  69.         CAPTION = "Please select your Origin EDP:", ;
  70.         HEIGHT = 17, ;
  71.         LEFT = 4, ;
  72.         TOP = 11, ;
  73.         WIDTH = 55, ;
  74.         TABINDEX = 1, ;
  75.         NAME = "Label1"
  76.  
  77.     Add OBJECT cmdsave AS COMMANDBUTTON WITH ;
  78.         TOP = 411, ;
  79.         LEFT = 394, ;
  80.         HEIGHT = 27, ;
  81.         WIDTH = 84, ;
  82.         CAPTION = "\<Save", ;
  83.         ENABLED = .T., ;
  84.         TABINDEX = 6, ;
  85.         NAME = "cmdSAVE"
  86.  
  87.     Add OBJECT cmdquit AS COMMANDBUTTON WITH ;
  88.         TOP = 411, ;
  89.         LEFT = 480, ;
  90.         HEIGHT = 27, ;
  91.         WIDTH = 84, ;
  92.         CAPTION = "\<Quit", ;
  93.         TABINDEX = 7, ;
  94.         NAME = "cmdQUIT"
  95.  
  96.     Add OBJECT edtconstants AS EDITBOX WITH ;
  97.         HEIGHT = 347, ;
  98.         LEFT = 6, ;
  99.         READONLY = .T., ;
  100.         TABINDEX = 4, ;
  101.         TOP = 52, ;
  102.         WIDTH = 558, ;
  103.         NAME = "edtConstants", ;
  104.         FONTSIZE = 15
  105.  
  106.  
  107.     Procedure cmdsave.CLICK
  108.  
  109.         Local loWSH
  110.         loWSH = createobject("wscript.shell")
  111.         If not regKeyExist("HKEY_CURRENT_CONFIG\Software\VFP\HNDmis\locname\")
  112.  
  113.             loWSH.RegWrite("HKEY_CURRENT_CONFIG\Software\VFP\HNDmis\locname\", allt(oform1.txtolbfile.value) , "REG_SZ")
  114.             AvnKyVal=allt(oform1.txtolbfile.value)
  115.             Save to avn.mem all like avn*
  116.             Messagebox("Configuration saved...")
  117.         Else
  118.             *                Messagebox("Registry value allready EXISTs")
  119.         Endif
  120.  
  121.  
  122.     Endproc
  123.  
  124.  
  125.     Procedure cmdquit.CLICK
  126.         Thisform.RELEASE
  127.         On error
  128.         CLEAR EVENTS 
  129.     Endproc
  130.  
  131.  
  132.  
  133.  
  134. Enddefine
  135. ****************END CODE****************
  136.  
  137.  
Oct 7 '08 #1
0 1125

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: J. Baute | last post by:
I'm caching data in the Application object to speed up certain pages on a website The main reason is that the retrieval of this data takes quite a while (a few seconds) and fetching the same data...
3
by: Amit Dedhia | last post by:
Hi I am developing a Dot net application (involving image processing) on a uni processor. It works well on my machine. I then take all my code on a multi processor, build and run the application...
6
by: orekin | last post by:
Hi There I have been trying to come to grips with Application.Run(), Application.Exit() and the Message Pump and I would really appreciate some feedback on the following questions .. There are...
20
by: Peter Oliphant | last post by:
How does one launch multiple forms in an application? Using Photoshop as an example, this application seems to be composed of many 'disjoint' forms. Yet, they all seem somewhat 'active' in...
6
by: Josef Brunner | last post by:
Hi, I published my application (VS 2005) and am now trying to install it when I get this error message. It worked before...even on a different machine. Here is the detailed description: ...
9
by: jeff | last post by:
Hi All. I realize that when my Deployed winforms application starts, Windows needs to load the .net 2 framework before control is given to my application.... Is there anyway to either ... -...
3
by: asadikhan | last post by:
Hi, I have written a windows application with a GUI (let's call it MENU). I own the code for this application and have access to it. We have another application that is a third-part windows...
2
by: Michael Kalika | last post by:
Hi, We have developed a VSTO 2005 Excel application and we would like to leverage ClickOnce deployment mechanism for distribution of this application. How can we do that? I was digging in MSDN...
0
by: Tifer | last post by:
Hello, I am building my first .Net Application. The first couple of Publish and Installs I did went fine. But after a couple of builds, I get a modal dialogue box error every time upon trying...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.