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

A multiform ComboBox question

Hi everybody
I have a windows project with many forms (Not MDI). Depending upon what the user is doing, system shows a different form "ShowDialog()" where user must do something and click OK. Almost all the forms has a ComboBox which loads the same data on Form_Load. I am writing the same code in every form's Form_Load method. I just wanted to ask if there is an intelligent way of doing this ? I mean if it is possible to write the code only at one place ?

Thanks in advance
Raja

Nov 20 '05 #1
2 1384
In article <ur**************@tk2msftngp13.phx.gbl>, Ing. Rajesh Kumar wrote:
This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C41E72.F13A6EA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi everybody
I have a windows project with many forms (Not MDI). Depending upon what =
the user is doing, system shows a different form "ShowDialog()" where =
user must do something and click OK. Almost all the forms has a ComboBox =
which loads the same data on Form_Load. I am writing the same code in =
every form's Form_Load method. I just wanted to ask if there is an =
intelligent way of doing this ? I mean if it is possible to write the =
code only at one place ?

Thanks in advance
Raja


You can write the common code in one form, and all the others can
inherit from it...

--
Tom Shelton [MVP]
Nov 20 '05 #2
In article <ur**************@tk2msftngp13.phx.gbl>, Ing. Rajesh Kumar wrote:
This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C41E72.F13A6EA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi everybody
I have a windows project with many forms (Not MDI). Depending upon what =
the user is doing, system shows a different form "ShowDialog()" where =
user must do something and click OK. Almost all the forms has a ComboBox =
which loads the same data on Form_Load. I am writing the same code in =
every form's Form_Load method. I just wanted to ask if there is an =
intelligent way of doing this ? I mean if it is possible to write the =
code only at one place ?

Thanks in advance
Raja


You can write the common code in one form, and all the others can
inherit from it...

--
Tom Shelton [MVP]
Nov 20 '05 #3

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

Similar topics

10
by: Mr. B | last post by:
I've been seeking the solution to this. But can't figure it out (sounds simple enough). When you Populat a ComboBox, you can select the initial displayed items on startup simply by setting the...
6
by: Georges Heinesch | last post by:
An easy ComboBox question. ;) I would like to create a ComboBox, which permits to cycle through 3 subforms. These 3 subforms are entered in the ComboBox as Value List. The subforms should only...
3
by: Jason A. Thompson | last post by:
Dear Access Gurus, I have a database which I hoped to use to administer questionnaires, or rather that someone who knows nothing about Access could use to administer them. Each q'aire item is on...
7
by: Nicolae Fieraru | last post by:
Hi All, I am trying to change the rowsource of a combobox when I click on it. I played with many events, associated with the form and the combobox, but still haven't figured out what is the way...
4
by: David Sworder | last post by:
Hi, I have a ComboBox that contains 1,400 sorted items . Here's the list: abba apple ... cabba caccaa capple
4
by: Beeeeeeeeeeeeves | last post by:
I have an ownerdrawn combo box which I am drawing with an image and some text, this is all working beautifully apart from the difference in the Brush I have to draw the background and the text with...
0
by: Hiroyuki Tanaka | last post by:
Hi All, I am trying to develop an application for a touch screen using buttons for the numeric pad with Completion ComboBoxes. At the moment I am having a problem sending the button presses to...
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
0
by: Ing. Rajesh Kumar | last post by:
Hi everybody I have a windows project with many forms (Not MDI). Depending upon what the user is doing, system shows a different form "ShowDialog()" where user must do something and click OK. Almost...
6
by: Sakharam Phapale | last post by:
Hi All, How to fill one ComboBox from other ComboBox control? 1) Only setting the reference does the trick but doesn't show items in control. If you see in immediate window, it shows...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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
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.