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. -
Set proc to test
-
Public firsttime
-
Do firstRun
-
*do form regpivot
-
-
****************START CODE****************
-
Procedure firstRun
-
Public oform1,dstnarry
-
Use masters\dstnmast.dbf
-
std_frmset=createobject('MyFormSet')
-
std_frmset.visible=.t.
-
-
-
Endproc
-
****************FORM CODE****************
-
Define class MyformSet as formset Olepublic
-
WindowType = 1
-
Procedure init
-
* step on
-
oform1=Createobject('FORM1')
-
oform1.visible=.t.
-
Read events
-
Endproc
-
Enddefine
-
-
Define CLASS form1 AS FORM Olepublic
-
visible=.t.
-
Height = 445
-
Width = 567
-
MinWidth= 567
-
MaxHeight=445
-
MaxWidth=567
-
minHeight=445
-
maxbutton=.f.
-
minbutton=.f.
-
DoCreate = .T.
-
AutoCenter = .T.
-
BorderStyle = 1
-
Caption = "Aviation Pivot 2008 configuration."
-
MaxButton = .F.
-
MinButton = .F.
-
Name = "Form1"
-
WindowState=0
-
ShowWindows=2
-
WindowType = 0
-
PROCEDURE init
-
application.visible=.f.
-
-
ENDPROC
-
procedure destroy
-
application.visible=.t.
-
thisform.release
-
endproc
-
-
Add OBJECT txtolbfile AS ComboBox WITH ;
-
HEIGHT = 27, ;
-
LEFT = 200, ;
-
READONLY = .f., ;
-
TABINDEX = 2, ;
-
TOP = 6, ;
-
WIDTH = 70, ;
-
NAME = "txtOLBFILE", ;
-
RowSourceType = 6, ;
-
RowSource = "DSTN", ;
-
CONTROLSOURCE = "DSTN"
-
-
Add OBJECT label1 AS LABEL WITH ;
-
AUTOSIZE = .T., ;
-
CAPTION = "Please select your Origin EDP:", ;
-
HEIGHT = 17, ;
-
LEFT = 4, ;
-
TOP = 11, ;
-
WIDTH = 55, ;
-
TABINDEX = 1, ;
-
NAME = "Label1"
-
-
Add OBJECT cmdsave AS COMMANDBUTTON WITH ;
-
TOP = 411, ;
-
LEFT = 394, ;
-
HEIGHT = 27, ;
-
WIDTH = 84, ;
-
CAPTION = "\<Save", ;
-
ENABLED = .T., ;
-
TABINDEX = 6, ;
-
NAME = "cmdSAVE"
-
-
Add OBJECT cmdquit AS COMMANDBUTTON WITH ;
-
TOP = 411, ;
-
LEFT = 480, ;
-
HEIGHT = 27, ;
-
WIDTH = 84, ;
-
CAPTION = "\<Quit", ;
-
TABINDEX = 7, ;
-
NAME = "cmdQUIT"
-
-
Add OBJECT edtconstants AS EDITBOX WITH ;
-
HEIGHT = 347, ;
-
LEFT = 6, ;
-
READONLY = .T., ;
-
TABINDEX = 4, ;
-
TOP = 52, ;
-
WIDTH = 558, ;
-
NAME = "edtConstants", ;
-
FONTSIZE = 15
-
-
-
Procedure cmdsave.CLICK
-
-
Local loWSH
-
loWSH = createobject("wscript.shell")
-
If not regKeyExist("HKEY_CURRENT_CONFIG\Software\VFP\HNDmis\locname\")
-
-
loWSH.RegWrite("HKEY_CURRENT_CONFIG\Software\VFP\HNDmis\locname\", allt(oform1.txtolbfile.value) , "REG_SZ")
-
AvnKyVal=allt(oform1.txtolbfile.value)
-
Save to avn.mem all like avn*
-
Messagebox("Configuration saved...")
-
Else
-
* Messagebox("Registry value allready EXISTs")
-
Endif
-
-
-
Endproc
-
-
-
Procedure cmdquit.CLICK
-
Thisform.RELEASE
-
On error
-
CLEAR EVENTS
-
Endproc
-
-
-
-
-
Enddefine
-
****************END CODE****************
-
-
0 1125 Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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...
|
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...
|
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:
...
|
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 ...
-...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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,...
|
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...
| |