473,781 Members | 2,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VFP application NOT vivsible

harshadd
176 New Member
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.

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 1138

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

Similar topics

9
3291
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
3
3150
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...
6
20087
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
20
2720
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...
6
25074
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
9
2989
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
3
2693
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...
2
4544
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:
0
5253
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.
0
9639
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, 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...
0
10143
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 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...
0
9939
tracyyun
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...
0
8964
agi2029
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...
0
6729
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();...
0
5375
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...
1
4040
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
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2870
bsmnconsultancy
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...

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.