|
i have a splitcontainer on my mdi-parent form,
i want to use the right panel (panel2) as the mdi client area
i tried the following code:
childform.MdiParent = this;
childform.Parent = this.splitContainer1.Panel2;
childform.Show();
I can now select the client window inside the panel and drag it.
but the border of the client window still appears like it is not active.
what am i doing wrong?
|
|
|
|
|
Apparently, the MdiClient control (which contains MDI children) is docked to fill the parent window. What I have done in the past is create a regular Splitter[^] (not a SplitContainer ) and dock it to one side of the main form (left in your case), next to the panel you want to resize. That way you get a resizable panel docked to the side, with the MdiClient control covering the rest of your window.
I hope this helps!
|
|
|
|
|
thanks, but i think you missunderstood my problem, there is no problem with the docking and i can select the child window, drag it it all works.
only the active mdi child window doesnt look like it is active:
this is what i mean with a window being active or not active:
http://www.functionx.com/win32/images/active1.gif
just something with the appearance...
i can't show you a screenshot at the moment (working on a different computer now)
but thanks anyway.
|
|
|
|
|
I think your problem lies in setting the Parent property to be different than MdiParent. I have never verified it, but I assume that when you set the MdiParent property of a form, if that parent is an MDI container, the actual parent of the MDI child is the MdiClient window (see this article[^]) in the parent's client area.
When you change the parent of the MDI child, something probably is not right.
Anyway, if you could show us a screenshot, we could get a better idea of what you want to achieve.
|
|
|
|
|
i am very sorry but i was the one who didn't understand...
i tried your first response
and it works now (and it's a simple solution )
the double buffer in the example program (article) is slowing things down on my pc,
so i didnt use that one (especially when the application is maximised)
thanx
|
|
|
|
|
I am glad I could be of help
The article link was mainly to give you some information on the MdiClient control. The double buffering is not required
Have a nice day!
|
|
|
|
|
Code(C# .Net 2.0):
private System.Windows.Forms.ToolStripButton toolStripButton_Scan =new System.Windows.Forms.ToolStripButton();
this.toolStripButton_Scan.ToolTipText = "New transaction created from scan";
question:
How to change the style of the text "New transaction created from scan".
Thank you!
modified on Monday, March 31, 2008 2:33 AM
|
|
|
|
|
It doesnt have a "Font" property, so AFAIK, the Style can't be changed..
You CAN do the following though...
private void button1_Click(object sender, EventArgs e)<br />
{<br />
toolTip1.BackColor = Color.Black;<br />
toolTip1.ForeColor = Color.Yellow;<br />
toolTip1.SetToolTip(this, "Booya!");<br />
}
|
|
|
|
|
But the tooltip cannot been found in ToolStripItem.
Maybe I can get it by reflection,my purpose is to change the fontsize. how to do it ?
thank u!
|
|
|
|
|
Don't think you can do font size :/
I was doing tool-tips for an inventory in a game I was making, and the best I could do was making a semi-transparent form that appears relative to the mouse X/Y co-ords on Mouse_Over :/
Soz :/
|
|
|
|
|
Hi friends,
I am using checkbox control with in datagridview control.I want to get status of checkBox control which is placed inside the datagridView control.
How do I get Status(checked,unchecked) of checkBox control in datagridView ?
Thank& Regards
Vijay s
|
|
|
|
|
Hi Vijay,
Please know that the detault checkBoxes in DataGridView does not have any property to check whether the checkbox is in Checked/Unchecked state. However, on the basis Value property we can check the state in the following manner:
BEGIN CODE
Dim flag As Boolean = False
flag = Me.DataGridView1.Rows(3).Cells(9).Value
If flag = True Then
MsgBox("State is Checked")
Else
MsgBox("State is UnChecked")
End If
END CODE
Hope this helps .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Hi ,
I have got 2 Form .One is have got DataGrid that list my data and Other form have got Crystal Report Objects.I wanna do assign Form1's datagrid datasource to Form2 Crystal Report for show datagrid's data.
i think i need a global variable but i dunno how to do is.Can anyone show me an example or other solutions for this prb
|
|
|
|
|
I am trying to use .NET delegate to make the form responsive while doing data retrieval.
The form contains lots of controls including a tabcontrol with tabpages.
When i Click the Search Button to retrieve the data, i invoke the LoadRecord Delegate and the RetrieveRecord Method was called, but when i click the next Tab Page the form hangs. Can anyone help me with this?
Heres the codes..
frmBase
Code Snippet
Private Delegate Sub LoadRecordDelegate()
Private LoadRecord As LoadRecordDelegate
Protected Sub ExecuteRetrieveRecord()
LoadRecord = New LoadRecordDelegate(AddressOf RetrieveRecord)
LoadRecord.BeginInvoke(LoadCallBack, LoadRecord)
'Retrieving
End Sub
Protected Overridable Sub RetrieveRecord()
'Override this
End Sub
Private Sub LoadCallBack(ByVal result As IAsyncResult)
LoadRecord.EndInvoke(result)
'Done Retrieving
End Sub
frmMyForm
Code Snippet
class frmMyForm
Inherits frmBase
Protected Overrides Sub RetrieveRecord()
Me.SearchRecord(ReferenceNumber)
End Sub
Private Sub SearchRecord(RefNum as String)
'Some Codes to retrieve information based on the RefNum
'Populate the controls(textboxes,comboboxes,etc.)
End Sub
private sub BtnSearch_CLick
mybase.ExecuteRetrieveRecord
end sub
End Class
|
|
|
|
|
Hi,
seems to me you are making illegal cross-thread calls, i.e. accessing Controls by a
thread other than the one that created the Controls.
You can try this in .NET 1.x, or in later .NET versions provided you disable the
cross-thread checkking. Anyway it is the wrong way of doing things, it normally results
in a non-responsive or hanging GUI.
The right way to access Controls from an arbitrary thread is by using Control.InvokeRequired
and Control.Invoke; there is documentation and lots of examples everywhere.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hello there...
I have a windows application in C# 2.0. I have used Crystal Report for printing a bill.I have installed a dot matrix printer.
So how to set the page setup option so that it'll print till the data is there.(e.g in a shopping mall the bill is printing till the data and after that it stops printing).
Its urgent...pls help
--Krish
prfkrushna@gmail.com
|
|
|
|
|
first: all questions on the forum are urgent.
second: I do not understand all parts of your question.
You start to print, request data and than print the data?
Is that your problem?
|
|
|
|
|
Hi,
I have a datatable with 3 expression column bind to datagridview with a bindingsource but the column are not displayed in the datagridview.
when i debug, it was throwing a StronglyTypedException and the innerexception is InvalidCastException "can not convert dbnull to decimal".
Please help.
Thanks in Advance
Lookman
|
|
|
|
|
|
Please don't cross post.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi to all forums members,
How to Add click once feature for windows Class Library application?
I have a window class library application, Is it to possible to publish the class library application through click
once feature of dot net..
I have not found any options for the class library application to add auto update feature..
Or any other option any one know, pls guide me ....
Vishnu Narayan Mishra
Software Engineer
|
|
|
|
|
Vishnu Narayan Mishra wrote: pls guide me
Ok.
If Google is not working at your location then complain to your ISP
led mike
|
|
|
|
|
hey !
m having problem in vb.net (gdi+) for which if can please help me
Problem :
m drawing a rectangle using ControlPaint.DrawReversibleFrame() function. but after completing with that drawing how can i select that n resize that same rectangle ???
Thanx in advance
|
|
|
|
|
By keeping track of where you drew it and handling mouse events so you can redraw it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i have tried to do that using region and mouse events but im having error regarding region class.....
Brijal Patel.
|
|
|
|