|
You should post this as a new thread.
Hijacking another thread is considered rude.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi Honey.rpk, D@nish, and Henry,
The roosters have been crowing loud since before 5am here, but nested UserControl hosting at design-time is not what's keeping me up, I assure you
Let me clear this up :
1. I'm using VS 2010 beta.
2. Creating a new Win Forms project in VS 2010 beta does not auto-include a reference to the System.Design dll which, I guess, the other .Design classes depend on. Was this also the case in VS 2008 ?
3. If you make sure you have a reference set to the System.Design dll, and you have declared :
using System.Design;
using System.Windows.Forms.Design;
you can use Henry's technique which is also shown in Matthew McDonald's aforementioned book on page 926.
4. If you don't have a reference in your project to System.Design.dll, you can still use the technique I included in C# which D@nish also pointed you to in an article doing the same thing in VB. I'm surprised this technique works without a reference to System.Design dll being set !
5. Nesting :
a. forget it : an instance of userControl #2 with ParentControlDesigner attribute placed inside userControl #1 with same attribute : followed by placing usercontrol #1 on a form at design-time ... after a build ... is NOT going to let the instance of UserControl #2 capture other controls.
b. if you can't forget it : there is a way (ugly, it is) :
1. build your separate usercontrols 1,2
2. adorn each of them with the ParentControlDesigner attribute
3. at design time on a Form :
a. place an instance of usercontrol #1 on the form
b. place an instance of usercontrol #2 on the form and drag it so is "captured" usercontrol #1
c. you will now find both usercontrols are capable of capturing controls.
d. disclaimer : not tested with derived controls inheriting from containers like Panel
Disclaimer : for all I know there are other more elegant methods to achieve such weirdness; but a good question is : "what design advantages come from such design-time nested usercontrols or derived controls ?"
If anything, I can see such "beasts" as a liability, but, who knows, maybe there is some scenario where such "critters" are just right for the zoo.
best, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
Here's my problem: The panel won't accept the other controls dropped on it.
At design time, if I drag the user control onto a Windows form, then drop other controls on the user control, the dropped controls become children of the Windows form, and not the user control. When I drop them, they disappear, but if I drag the user control out of the way, the other controls are on the Windows form, exactly where I dropped them.
I tried changing the user control's designer to the Parent Control Designer,like this:
-----------------------------------------------------------
using System.ComponentModel.Design;
....
[Designer("System.Windows.Forms.Design.ParentControlDesigner,System.Design",
typeof(IDesigner))]
public partial class FSGroupPanel : UserControl
{
...
}
-------------------------------------------------------------
That helped some, but not a lot. Now, when I drop another control on the
user control at design time, it still disappears. However, if I then drag the user control around on the Windows form, the other control appears in the user control during the drag, at the place where I dropped it. However, the dropped control disappears when I stop dragging the user control, and the dropped control doesn't appear at run time at all.
<b><u>Here is my question:::::::</u></b>
I want a solution to make the disappeared dropped control visible?
|
|
|
|
|
this is my source that i created
Private Sub FontToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontToolStripMenuItem.Click
FontDialog1.ShowDialog()
RichTextBox1.Font = FontDialog1.Font
End Sub
Private Sub ColorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ColorToolStripMenuItem.Click
ColorDialog1.ShowDialog()
RichTextBox1.ForeColor = ColorDialog1.Color
End Sub
---------------------------------
when i wanna change color and font in richtextbox,all of text in textbox is changed.how to make
source code that change color and font in text that we highlight
bah10z
bah10z
|
|
|
|
|
Hi,
a RichTextBox has a lot of properties whose names start with "Selection", those operate on the currently selected content. Read the MSDN documentation for all the details.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
In brief,We have to make a custom control which consists of the following features:
1.On button click,one of the panels should be minimized.
2.The custom properties should be changed.
3.Other controls that are dragged on to this custom control should move along with that custom control.
4.The other controls placed below this custom control should shift upwards and downwards along with the maximize and minimize of the custom control.
In the above features,we got succeeded in developing the custom control with the first two properties but we are facing some problems in case of next two even we tried to write an event.
So,plz help me in solving this.
|
|
|
|
|
Handle the Drag events for the panel to place controls in it. Anchor and dock them properly to panel.
Show what you tried and tell where are you stuck. No one here is going to write code for you, atleast not for free.
|
|
|
|
|
I want to remove driver named "SAA7134 driver" by the way of using "devcon" command,how to do?
the dirver list as follow:
Inter(r) 82801BA/BAM AC'97 Audio Controller
SAA7134 driver
SAA7134 driver
SAA7134 driver
SAA7134 driver
|
|
|
|
|
Typing DEVCON help or DEVCON /? returns the help screen
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I have try, But i still don't understand! can you tell me how to do!thanks!
|
|
|
|
|
hi frens,please give me a clue.
|
|
|
|
|
Button class and Controls.Add . Is this much clue enough?
|
|
|
|
|
|
You really really need a book.
|
|
|
|
|
"Bit by bit". I'm sorry for being rude, but this is like asking "how do you build a car?" Although it is possible to formulate a decent answer, the question is too darn broad to cover all details.
Do you want some open-source solution that you can adapt to your needs? Do you need guidance on the programming itself? Or are you just looking for some easy examples?
If you're feeling totally lost, consider installing DotNetNuke
I are troll
|
|
|
|
|
Eddy Vluggen wrote: I are troll Smile
I think you may be feeding a troll on this one, a deliberatly stupid question asked in the most provocative terms.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I'll stop feeding then
I are troll
|
|
|
|
|
Hello all,
I have designed my own custom control with two panels one below the other. and a button and label on the top panel. Now i added that tool to my tool box successfully.But now if i want to drag a control for example button in to the 2nd panel present in my tool and i want to make that button as a child of that same tool but not as a seperate control,so that if we move the control the button should move along with the tool. but its not happenning. just the button is overlapping on the panel but not inserting in to the panel .
how can i do that. please help me fast its important for me.
Thanks & Regards
|
|
|
|
|
swathi.vng wrote: please help me fast its important for me
Just for you.
The panel is in the user control. So, you cannot add a control to it unless it is being exposed to the outer world through some means. I would suggest to expose a method that would add controls to youe Panel. This method can be called in the parent form to add controls.
|
|
|
|
|
Hi,
It's not totally clear to me if you are speaking of letting the second panel in your usercontrol act as an active design surface (i.e., one that can "capture" controls) at design-time or at run-time. I am assuming you mean design time.
On a similar topic : Leppie sent me this link[^], but I am using VS 2010 beta now and "ControlDesigner" does not even appear in the namespace "System.Windows.Forms.Design" as of right now. So I don't know if that's relevant to your issue or not.
The best coverage of design-time issues I have found is in Chapters 13 and 26 of Matthew McDonald's book "Pro Windows Forms 2.0."
best, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
Yes, I am trying to convey the same. Thanks for helping me i want to make the second panel as active at deesign time so that it can capture other controls.
|
|
|
|
|
But the problem is when i am trying to implement the code given by you. It is showing that 'ControlDesigner' class needs some namespace or assembly but when i search for that i got that it is included in using Sysytem.web.UI;
when i am trying to include the same i found that sysytem.web doesn't contain a method UI.
can u please help me regarding this with a clear info..
Thanks and regards..
|
|
|
|
|
Hi Swathi.vng,
The response I just sent to Honey.rpk may be of interest to you :
http://www.codeproject.com/Messages/3099814/Re-How-to-make-a-control-as-a-child-to-user-control-but-not-for-a-form-modified.aspx[^]
I'm still not clear what's happening with VS 2010 beta and the ControlDesigner library not showing up, and I've reported that to MS.
best, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
I confuse with AfxMessageBox and MessageBox,can anybody explain it.thanks!
|
|
|
|
|
MessageBox is a part of the .NET framework and behaves as described in the documentation[^]. The AfxMessageBox isn't part of the .NET framework; it's written by someone else. If you want to know specifics on the AfxMessageBox then you should contact the author thereof
I are troll
|
|
|
|