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.vis ible=.f. is in forms init.
If application.vis ible = .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 1138 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 from the "cache" hardly takes any time
A basic pattern used to get the data from disk, or from cache is this
data = getDataFromCache("mydata"
if data = "" the
data = getDataFromDisk(
storeDataInCache(data, "mydata"
end i
|
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 there. There is
performance degradation.
The usual performance of the application on MP machine is better than
that of uni processor machine. But the performance of MP degrades when
it comes to the multi-threaded part of the application. I am...
|
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 quite a few
words in this post but the questions are actually quite similar and
should be fairly quick to answer ...
(1) What is Happening with the Threads
|
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 contrast to one of
them always being 'modal' (e.g., if you are moving over a picture the 'Info'
form will update the (x,y) screen location in realtime even if not the
selected form. Also note that this example implies the various forms can
communicate...
|
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:
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.42
| |
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 ...
- preload the .net 2 framework (windows startup or whatever)
- splash a screen ... application loading ... please wait ... type of
|
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 application
with a GUI interface as well (let's call it BASE). I don't have access
to the code of this application. This application has hooks through
which other applications can be called. I have defined a hook in this
application which bring up...
|
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 for VSTO & ClickOnce documentation
and did not find anything. I've noticed that there is an option to
publish the project, but when I do that and then run the application from
Web it throws us security errors like:
|
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 to install using the
setup.exe. Title is "Cannot Start Application" and it says:
====================
Cannot download the application. The application is missing required
files. Contact application vendor for assistance.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |