473,791 Members | 2,949 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C#: CodeBehind and Code Re-Use Using Inheritance in windows applications

Hi

Is there a way to seperate code of interface in windows applications
for various design purposes? Just like it can be done in ASP.NET, one
code can be inherited in different skins with different design.

Sincerely
Del

May 19 '06
10 1824
I will share with solution I find out.
Say, i have a win application form with codebehind. Now i want to share
this codebehind between different forms with same controls, but
different design.

What i did, i created two classes. One for Interface, another for
codebehind. In codebehind class defined interfaces class object and
thru this object i manipulated with interfaces controls.

Jun 10 '06 #11

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

Similar topics

2
2651
by: varun_789 | last post by:
hello friend, while developing an application, i encountered a subtle point. for a aspx page, what is the difference between src property and codebehind property ? src stands for code-behind class to compile where as
2
2484
by: Francisco Carvalho | last post by:
I have created a user control that gets loaded by a page. The user control has a codebehind, but when I change the code on the codebehind, it never runs. If on the other hand a run the same code on the .ascx file it runs with no problems. The directive(see below) was added automatically by VS.NET so I can't seam to know what the problem is. Any thoughts? Francisco
4
2418
by: Boban Dragojlovic | last post by:
I create a new webform (I always use codebehind), and I insert some server-side controls into the form (the ASPX) Later, I switch to codeview, and I notice that some (sometimes all) of the controls I created have been automatically defined for me in the #Region " Web Form Designer Generated Code " section Later, when I add more controls this no longer happens. First, I'm wondering which of my actions causes it to no longer do this;
12
1653
by: Karl Hungus | last post by:
If I use a code behind class for an aspx page, what is the best way to get data from the codebehind class into my aspx page? I know about databinding, but is there a more basic way of just referencing the variables or calling getters? thanks in advance
0
1238
by: Tigrou | last post by:
Hello, I'm searching for a solution who permit me to create an TemplateColumn in a DataGrid into codebehind... I found only solution for create it into the ASPX code... My problem is to find a solution for add ImageButton controls into this column, for now my code is: Dim colSupp As New TemplateColumn
2
3126
by: Tigrou | last post by:
Hello, I'm searching for a solution who permit me to create an TemplateColumn in a DataGrid into codebehind... I found only solution for create it into the ASPX code... My problem is to find a solution for add ImageButton controls into this column, for now my code is: Dim colSupp As New TemplateColumn
7
2222
by: Jack | last post by:
Hello, What is the difference between SRC and CODEBEHIND Tags? Example <%@ Page Language="vb" ValidateRequest="false" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb" %> or
10
1384
by: Arsalan | last post by:
Where is Codebehind usually uploaded? Suppose I have aspx pages containing codebehind in different directories for e.g myweb/aaa myweb/bbb Where do i store the compiled codebehind?
1
1529
by: Antoine | last post by:
I have a pretty quickish question about ASPX with codebehind. I have done an exhaustive search of the web so no go there. I was hoping to reach out for some help here. Anyway, I have a really nicely working javascript replace going on with multiple data items databinded to an aspx web form so that I am theoretically much simplifying the data sent back from the codebehind (literally values such as 1,2,3 that can define which webpage to go...
4
1943
by: simon | last post by:
have an image (acting like a button) currently that has onMouseOver and onMouseOut events. want to make this accessible to the codebehind with a click event. was able to right click at and choose "run as server control", when i double click it then to put code in the codebehind, there is no function there for me to fill in. i made up one called goButton_Click and handles gobutton.click that didn't work, didn't recognize the name i gave...
0
9515
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10427
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9995
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
9029
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
6776
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
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
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
3
2916
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.