|
hoangsamac wrote: On FormChild1 I have a button when clicked it can open FormChild2 but FormChild2 still inside FormMDI.
OK. It would probably help to see the code that creates your second child form. You showed the code that creates the first child, which apparently works fine. And on which form does this code sit?
|
|
|
|
|
Hi,
In ParentForm:
<br />
Memuitem_clicked(sender,e)<br />
{<br />
FormChild1 f = new FormChild1();<br />
f.MDIParent = this<br />
f.show();<br />
}<br />
My first child (FormChild1) contain a button and event:
<br />
button1_clicked(sender,e)<br />
{<br />
FormChild2 f = new formChild();<br />
f.MDIParent = ???
f.show();<br />
}<br />
In VB.Net,I see can do this
hoangsamac
|
|
|
|
|
Child form creation should really be left up to the parent form, but, to make yours work:
button1_clicked(sender,e)
{
FormChild2 f = new formChild();
f.MDIParent = this.Parent;
f.show();
}
|
|
|
|
|
Thank you very much !,
I did but code is:
f.Parent=this.ParentForm;
hoangsamac
|
|
|
|
|
Bitmap[] bitmaps = new Bitmap[42];
---
single minded; short sighted; long gone;
|
|
|
|
|
Hello everyone,
I try to create an add-in C# for Visual Studio 2005. I want to create a toolbar look like Visual Assist X but I don't know how. And I want to customize right-click-menu of TextEditor in VS 2005.
I have too little ebook C# about add-in. May you introduce or send me some ebooks? Thanks lots.
You're very nice to help me. Thanks lots.
imagic
|
|
|
|
|
Add-ins are cool, but they are an advanced topic and will require lots of reading and lots of TESTING to understand. If you haven't had a lot of experience, you may have to wait a while before you will understand it. I've been doing this stuff for 25 years and I had a lot of trouble getting started, which is why my Source control program isn't released yet. What I'm saying is, this topic is wicked confusing, and you just need to jump in and sink or swim.
Take what you know so far and try making something simple, then come back here when you have some more specific questions. Sounds like you have a good start with some materials to read, and here's another article you can try to help you get started. Good luck!
http://www.c-sharpcorner.com/UploadFile/mgold/AddIns11292005015631AM/AddIns.aspx[^]
And note: by something simple I mean an add-in that puts up a toolbar that doesn't do anything, and a context menu that doesn't do anything. So many programmers want to start with more than that... always start with what I call "The Null Program" which just sets up the runtime environment and exits. It's even more basic than Hello World, and I start every new project by actually compiling and running that program... even after 25 years.
|
|
|
|
|
Jasmine2501 wrote: Add-ins are cool, but they are an advanced topic and will require lots of reading and lots of TESTING to understand. If you haven't had a lot of experience, you may have to wait a while before you will understand it. I've been doing this stuff for 25 years and I had a lot of trouble getting started, which is why my Source control program isn't released yet. What I'm saying is, this topic is wicked confusing, and you just need to jump in and sink or swim.
So true, so true.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Thanks.
I can create a simple add-in such as adding a text, calling a command intellisense, calling a command about region... I think I can customize ToolBox (just like how to customize MenuBar) , but I can't customize ToolBar by that way.
Can you help me ?
Thanks lots.
-- modified at 5:06 Monday 25th June, 2007
imagic
|
|
|
|
|
Your question is too general. You need to be more specific about what problem you are having. That's why you got flamed. We can't answer this for you in a timely manner. A good answer to your question would be many pages long. There are probably tutorials on the subject, but I assume you have read them already... you know, since you are posting a forum question.
You just need to be more specific in your question. Define your problem carefully and make a new thread. This one is dead and buried.
|
|
|
|
|
Have you ever used Visual Assist X ? When we install it, a new toolbar appears in Visual Studio .NET and some new item appear in right-click-menu . I want to do something like it.
Thanks
imagic
|
|
|
|
|
Yeah I know what you're talkin about. That tutorial doesn't really cover it... you need to look into the technical documentation and figure it out yourself, building on your knowledge of toolbars and context menus in standard forms, combine that with what you know about Add-ins, and figure it out.
This is an advanced topic and you will not find an article that simply tells you how to do it. This is where programming gets fun... embrace the problem and dive into it and figure it out as you go along. Nobody can help you do that. It is going to take hours, maybe days, of research, study and experimentation. The subject is difficult, and you are going to have to do a lot of work to figure it out. Accept that and stop asking for someone to hand-hold you through it. Dig in and get to work. I would help you if I could, but I can't move your fingers for you...
Everyone else ignored this question... you need to think about why. I answered it because I like to bitch at n00bz.
|
|
|
|
|
I have a central database in Sql server Express 2005 in my server computer. I want to connect it through my another client terminal.How can i make the connection & what configurations should i change?
Code or help apprecicated both in VB.Net and C#
Thank You!
X
|
|
|
|
|
I have a central database in Sql server Express 2005 in my server computer. I want to connect it through my another client terminal.How can i connect it & what configurations should i change?
Code or help apprecicated both in VB.Net and C#
Thank You!
X
|
|
|
|
|
as far as I know the express edition doesn't not listen to network connections by default. you might want to try this: sql manager / server network configuration / protocols / enable tcp..
|
|
|
|
|
Hello,
I wrote some UI control with C# (VS 2005).
I need to set this control on some dialog that i have - but i don't know how to do it.
Someone can help me ?
Thanks for any help.
|
|
|
|
|
Build it. The ToolBox of VS will has new user control. Drag it to your dialog.
imagic
|
|
|
|
|
I try but its not appear in the Toolbox of the VS -
Maybe i need to turn on some properties ? or something like that ?
|
|
|
|
|
Maybe this affect this -
But how can i solve this problem ?
Thanks.
|
|
|
|
|
If your custom control is written in C#, without seeing the class definition code, we're guessing at what the problem is.
Did you inherit from another control? Maybe UserControl or Control? Did you write this control from scratch? Is the class attributed properly?
|
|
|
|
|
I wrote the control from scratch,
In my control i inherit from class System.Windows.Forms.UserControl.
I think that the class attributed properly - but i not sure.
What the relevant attributed properly that i need to check ?
What is the right attributed properly ?
Thanks.
|
|
|
|
|
UserControl is normally used to build a composite control using existing controls.
Inheriting from Control is usually used to build a control from scratch.
You can also inherit from an existing control, modifying its behavior.
There is no single attribute for controls. There's a bunch of them, each used for very specific things.
For example, this is one of the properties in a control I made:
''' <summary>
''' Gets or sets whether the control will stay within its parent container's visible bounds.
''' </summary>
''' <returns>A <see cref="System.Boolean"></see> value.</returns>
<Bindable(True), DefaultValue(True), Category("Behavior"), _
Description("Gets or sets whether the control will stay within its parent container's visible bounds."), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)> _
Public Property StayWithinParentBounds() As Boolean
Get
Return m_StayWithinParent
End Get
Set(ByVal value As Boolean)
If value <> m_StayWithinParent Then
m_StayWithinParent = value
MoveControlWithinBounds()
Me.OnStayWithinParentBoundsChanged(EventArgs.Empty)
End If
End Set
End Property
|
|
|
|
|
Hi,
There is something fundamental which i donn't get it.
I created a new Win Forms project in dotNet 2.0.
I added Keys and Values to the settings.
When I use ConfigurationManager.AppSettings, it returns empty collection?!
I can get the values through the use of Properties.Settings - Strongly
types.
But how do i get the collection itself?
Why the is empty ConfigurationManager.AppSettings?
Thanks
Goldwind
|
|
|
|
|
What error it says?
Whether the root of the path is wrong or what error it says when you use ConfigurationManager.AppSettings.
Let me know it in Detail.
Regards,
Satips.
|
|
|
|
|
No error. Just an empty collection.
The app.config had paired values but it didnt refer to it.
I just addressed : ConfigurationManager.AppSettings
didnt use open.. method.
Goldwind
|
|
|
|