473,395 Members | 1,919 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,395 software developers and data experts.

Now Do I Emulate Foxpro Functionality In C#?

Hello:

I am trying to do in C#, what I have done for years in Visual Foxpro.
I am trying to set up base form classes, so that I can inherit
behavior in child classes. Specificallly, I am trying to build a
navigation form base class, ie, a form with a SAVE and a CANCEL
commandbutton on it. The problem is, when I instantiate the form (The
SAVECANCEL form), I cannot see the commandbuttons:

What am I missing?

Thanks!

Steven

using System;
using System.Windows.Forms;
using C.Base.Controls;
using System.Drawing;

namespace C.Base.Forms
{
/// <summary>
/// Base Form Object For This Application.
/// </summary>
public class CBaseForm : System.Windows.Forms.Form
{
public CBaseForm()
{
this.Width = 600;
this.Height = 400;
this.BackColor = Color.LightBlue;

}
}
public class CSaveCancelForm : System.Windows.Forms.Form
{
public CSaveCancelForm()
{

CBaseCmdButton cmdSave = new

C.Base.Controls.CBaseCmdButton();
cmdSave.Left = 5;
cmdSave.Top = 5;
cmdSave.Text = "Save";
cmdSave.Visible = true;
CBaseCmdButton cmdCancel = new

C.Base.Controls.CBaseCmdButton();
cmdCancel.Left = 75;
cmdCancel.Top = 100;
cmdCancel.Text = "Cancel";
cmdCancel.Visible = true;
}
}
}

Nov 16 '05 #1
1 1962

<Steven C> wrote in message
news:q1********************************@4ax.com...
Hello:

I am trying to do in C#, what I have done for years in Visual Foxpro.
I am trying to set up base form classes, so that I can inherit
behavior in child classes. Specificallly, I am trying to build a
navigation form base class, ie, a form with a SAVE and a CANCEL
commandbutton on it. The problem is, when I instantiate the form (The
SAVECANCEL form), I cannot see the commandbuttons:

What am I missing?

Thanks!

Steven

using System;
using System.Windows.Forms;
using C.Base.Controls;
using System.Drawing;

namespace C.Base.Forms
{
/// <summary>
/// Base Form Object For This Application.
/// </summary>
public class CBaseForm : System.Windows.Forms.Form
{
public CBaseForm()
{
this.Width = 600;
this.Height = 400;
this.BackColor = Color.LightBlue;

}
}
public class CSaveCancelForm : System.Windows.Forms.Form
{
public CSaveCancelForm()
{

CBaseCmdButton cmdSave = new

C.Base.Controls.CBaseCmdButton();
cmdSave.Left = 5;
cmdSave.Top = 5;
cmdSave.Text = "Save";
cmdSave.Visible = true;
CBaseCmdButton cmdCancel = new

C.Base.Controls.CBaseCmdButton();
cmdCancel.Left = 75;
cmdCancel.Top = 100;
cmdCancel.Text = "Cancel";
cmdCancel.Visible = true;
}
}
}

Best I can tell you aren't actually adding the controls to the form. call
Add on the forms Controls property and add them.
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Simon Bailey | last post by:
I am a newcomer to databases and am not sure which DBMS to use. I have a very simplified knowledge of databases overall. I would very much appreciate a (simplifed) message explaining the advantages...
2
by: Salad | last post by:
OS = WinXP & Win98. Access = A97 & AXP Q1) Where can I find the VFP ODBC driver at Microsoft. I have been working developing an app in Access that will link to some DOS FoxPro tables. I...
1
by: David Sorber via AccessMonster.com | last post by:
Hello, I've got two questions. Im writing an Access 2000 database to collect data from multiple Visual Foxpro Databases, total some figures, save the data into a table for archiving purposes, and...
1
by: Steven C | last post by:
Hello: I am trying to do in C#, what I have done for years in Visual Foxpro. I am trying to set up base form classes, so that I can inherit behavior in child classes. Specificallly, I am trying...
2
by: Edb | last post by:
Hi Everyone, I need to build an ASP.Net project that wraps around a FoxPro Database. It appears that I need to create an ODBC Connection to .dbf files. Some of them have relations to each...
3
by: Amar | last post by:
I have a abc.PRG file in visual foxpro 8.0. I can run this file using visual foxpro environment and it creates a table X.dbf in the same folder where this program file is and populates some data...
2
by: DKode | last post by:
Hello, I am creating a data layer that will handle SQL(SQLClient) and Visual Foxpro (OleDb). The way I am thinking about creating it is create a base class that handles setting of...
14
by: johnsobd | last post by:
I am accessing an existing Foxpro database, of which I have no control over. I have been successful in accessing all the tables except for one. This one table I can access the first 9 fields in...
2
by: Toco | last post by:
Hello. I have app written in C# that we are testing. The executable is shared on our network. The method we are testing is a call to a foxpro table. The call is made to query the table, then...
7
by: z71mdridin | last post by:
I have an asp.net website that uses Form authentication to authenticate users. I need to provide users with a report based on FoxPro data that resides on a remote server. When I attempt to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
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...
0
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,...

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.