why don't you try MDI Extender :)
./Joule
Charles Parks <[EMAIL PROTECTED]> wrote:
Charles Parks <[EMAIL PROTECTED]> wrote:
Thanks,
I didn't see my typo I meant String but somehow got Single.
-----Original Message-----
From: Kenneth Gilbert [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 12:22 PM
To: [EMAIL PROTECTED]
Subject: RE: PSC Setting a sub procedure
The error is raised because you are supplying a string value to
subMdiLayout() when it expects a data type of Single. You will have to
make some changes to your procedure so that you can supply the correct
data type to the expected parameters, and you may need to change your
SELECT... CASE statement.
Below is just comments on what I thought was causing your problem:
***
' KG: This line will raise an error, my best guess being type mismatch.
subMdiLayout("Cascade")
Sub subMdiLayout(ByVal PubMdiLayout As Single)
'KG: I don't think this select case will ever work. The
Single 'DataType can never store the strings "Cascade" and
"TileHorizontal"
Select Case PubMdiLayout
Case "Cascade" ' <--- KG: Error?
Me.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade)
Case "TileHorizontal" ' <--- KG: Error?
Me.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal)
End Select
End Sub
***
Maybe you can try something similar to the below test to get t his to
work? In the code below, the parameter for subMdiLayout() was changed
so that the MdiLayout you supply to the procedure, it will act on it
immediately. I hope this helps you get the answer you are looking for.
' KG: Test setting our MDI layout to Tile Horizontal
subMdiLayout(System.Windows.Forms.MdiLayout.TileHorizontal)
' KG: Test setting our MDI layout to Cascade
subMdiLayout(System.Windows.Forms.MdiLayout.Cascade)
Sub subMdiLayout(ByVal value As MdiLayout)
' KG: Make our MDI Layout based on the supplied value
' which is Cascade or TileHorizontal in our test
Me.LayoutMdi(value)
End Sub
-----Original Message-----
From: Charles Parks [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 14, 2004 11:38 AM
To: undisclosed-recipients
Subject: PSC Setting a sub procedure
In VB.Net,
I have this procedure in a click event
subMdiLayout("Cascade")
subMdiLayout does this:
Sub subMdiLayout(ByVal PubMdiLayout As Single)
Select Case PubMdiLayout
Case "Cascade"
Me.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade)
Case "TileHorizontal"
Me.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal)
End Select
End Sub
For some reasone subMdiLayout("Cascade") produces an error.
What is the correct way to do this?
To unsubscribe, send an email to:
[EMAIL PROTECTED]
Yahoo! Groups Links
To unsubscribe, sen d an email to:
[EMAIL PROTECTED]
Yahoo! Groups Links
To unsubscribe, send an email to:
[EMAIL PROTECTED]
get a job, get an education, and learn to save and invest wisely any one can do it :)
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
To unsubscribe, send an email to:
[EMAIL PROTECTED]
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/PlanetSourceCode/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
