Hi,
In my project, I have 2 forms; both have a common panel (with combobox,
textbox, labels, methods, ...).
Is it possible to create that compoment separetly and then add it to the 2
forms?
If yes, how?
Thanks in advance; 11 1576
NM,
Just create your own inherited panel from that.
To di ut us just Add new> item> user control and than change in the code of
that the toprow "usercontrol" for the control you want to inherit in this
case panel. and go on. It is very easy to do when you know how.
I hope this helps?
Cor
Hi, In my project, I have 2 forms; both have a common panel (with combobox, textbox, labels, methods, ...). Is it possible to create that compoment separetly and then add it to the 2 forms? If yes, how?
Thanks in advance;
* "NM" <NM****@hotmail.com> scripsit: In my project, I have 2 forms; both have a common panel (with combobox, textbox, labels, methods, ...). Is it possible to create that compoment separetly and then add it to the 2 forms?
"Project" -> "Add UserConntrol...".
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Thanks Cor,
But the common panel isn't at the same position on the 2 forms and haven't
the same size on both of them;
So my forms can't inherit the panel;
"Cor Ligthert" <no**********@planet.nl> a écrit dans le message de
news:%2****************@TK2MSFTNGP11.phx.gbl... NM,
Just create your own inherited panel from that.
To di ut us just Add new> item> user control and than change in the code
of that the toprow "usercontrol" for the control you want to inherit in this case panel. and go on. It is very easy to do when you know how.
I hope this helps?
Cor
Hi, In my project, I have 2 forms; both have a common panel (with combobox, textbox, labels, methods, ...). Is it possible to create that compoment separetly and then add it to the
2 forms? If yes, how?
Thanks in advance;
The problem with the UserControl is that I have created it with one
constructor that take an object on parameter.
I get an error with VS when I was trying to use it.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> a écrit dans le
message de news:2n************@uni-berlin.de... * "NM" <NM****@hotmail.com> scripsit: In my project, I have 2 forms; both have a common panel (with combobox, textbox, labels, methods, ...). Is it possible to create that compoment separetly and then add it to the
2 forms?
"Project" -> "Add UserConntrol...".
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
* "NM" <NM****@hotmail.com> scripsit: The problem with the UserControl is that I have created it with one constructor that take an object on parameter. I get an error with VS when I was trying to use it.
Then use a property instead of passing the value to the ctor, for
example.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
I need to pass the value by reference and that's not possible with property;
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> a écrit dans le
message de news:2n************@uni-berlin.de... * "NM" <NM****@hotmail.com> scripsit: The problem with the UserControl is that I have created it with one constructor that take an object on parameter. I get an error with VS when I was trying to use it.
Then use a property instead of passing the value to the ctor, for example.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
"NM" <NM****@hotmail.com> wrote in message
news:u4*************@tk2msftngp13.phx.gbl... I need to pass the value by reference and that's not possible with
property;
Most values are actually "by reference", depending on your definition. What
is the type of your value?
Best Regards,
Andy
It's a class that I create.
I tried to modify byval by byref in the set property definition, and VS
generate an error
"Andy Becker" <x@x.com> a écrit dans le message de
news:eL**************@TK2MSFTNGP11.phx.gbl... "NM" <NM****@hotmail.com> wrote in message news:u4*************@tk2msftngp13.phx.gbl... I need to pass the value by reference and that's not possible with property;
Most values are actually "by reference", depending on your definition.
What is the type of your value?
Best Regards,
Andy
"NM" <NM****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... It's a class that I create. I tried to modify byval by byref in the set property definition, and VS generate an error
Let me back up then. How do you know you need to change to ByRef - what is
it you are not able to do using ByVal?
Best Regards,
Andy It's a class that I create. I tried to modify byval by byref in the set property definition, and VS generate an error
Let me back up then. How do you know you need to change to ByRef ?
Because I need to modify some object's attributes;
- what is it you are not able to do using ByVal?
The question is not what I'm not able to do using Byval;
It's : what I don't want to do if I use Byval?
And the answer is :
1) save memory (1 object instead of 2)
2) no need to update the original object by the copy after modifications Best Regards,
Andy
Thanks to all and best regards;
"NM" <NM****@hotmail.com> wrote in message
news:O8*************@TK2MSFTNGP12.phx.gbl... It's a class that I create. I tried to modify byval by byref in the set property definition, and
VS generate an error
Let me back up then. How do you know you need to change to ByRef ? Because I need to modify some object's attributes;
I finally located the discussion I have been looking to send you. Your
object is not a "value type", and effectively treated the same regardless of
ByVal or ByRef. http://msdn.microsoft.com/library/de...gmechanism.asp
Best Regards,
Andy This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Robert Skidmore |
last post by:
I am building an application that will fade one panel to another
panel. Both panels will have picture boxes in them (thumbnails).
This is what I have tried:
private void...
|
by: Millennium Falcon |
last post by:
Hi!
In my application, I have a panel in the middle of the form, which I'll be
using as a drawing panel. I would like to update the drawing panel each time
when it is required, without updating...
|
by: Martin Ho |
last post by:
I know this must be trivial for many of you. But I am playing with
this and can't figure it out.
I have a form, on that form is one panel which has 3 textboxes, when I
run my program and...
|
by: QT |
last post by:
Dear sirs,
I want to create panel or label field for each database records. I am using
following codes for each database row to create panel field.
'Panel
'
i = 1
|
by: Aaron Smith |
last post by:
I have a panel that I have in the paint event to draw a Raised 3d border
around it.. The problem is, if a msgbox is popped up or a tooltip is
displayed, it leaves lines on the panel. I've tried...
|
by: Rob T |
last post by:
To keep my example simple, let's say I have a windows application form with
a panel in it. For this example, I want to draw a single line in the panel,
which is larger than the size of the panel. ...
|
by: tranky |
last post by:
i hope you can help me!
It's possible create a moveable panel in vb.net?
Click with mouse over it and move it everywhere!?!?
It's possible?
thank u!
|
by: Sharon |
last post by:
I’m using the Panel control that contains a PictureBox control (for
implementing the http://www.codeproject.com/cs/miscctrl/PictureBox.asp).
The Panel is set to AutoScroll = true.
I wish to...
|
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= |
last post by:
I'm trying to figure out how to modify a panel (panel1) from a
backgroundworker thread. But can't get the panel to show the new controls
added by the backgroundwork task. Here is my code. In...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
| |