Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi.

Here is an example of something I want to create graphically:

http://img113.imageshack.us/img113/1576/table6ol.jpg

 

Now I think I can handle the content (i.e. get a datagrid and populate it :P) but want im after is information on how I would create the item. It needs to have the little button in the right to collapse and expand the 'mini-form', it needs to have the heading (table name) and it needs to be drag-able.

 

Another criteria is this has to be able to go into a form... specifically PART of a form (so im not sure if i can inherit from the windows form class as i only know of normal forms and mdi forms, not something inbetween!).

 

So how do I go about doing soemthing like this? Ive created user controls before, but only ones made up of a cluster of common controls -> never something that looks this unique.

 

Anyone got any pointers... I obviously dont expect someone to create the code etc, but just a point in the right direction... maybe some links or small code examples etc.

 

Thanks in advance.

Posted

I know it's kind of half-assed, but it's just an example you could do something along these lines.

 

   Public bMouseDown As Boolean = False

   Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
       Me.Text = e.X & "," & e.Y
       If bMouseDown = True Then
           DataGrid1.Left = e.X
           DataGrid1.Top = e.Y
       End If
       

   End Sub

   Private Sub DataGrid1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.Click
       bMouseDown = Not bMouseDown
   End Sub

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Posted

Hi,

Er could you explain what that is actually for? The picture I gave is kind of like a form within part of a form (well thats the plan... a mdi form with a listview on the left and in the right panel MANY of these little forms).

 

I'm not quite sure what your code does, but what i need is pointers as to how i would create this look... I was thinking it was a form with the onpaint overridden and some how a button placed up in the right hand corner, but as I said - not sure how to do that kind of funky stuff!

 

Regards.

Posted
Hi,

Er could you explain what that is actually for? The picture I gave is kind of like a form within part of a form (well thats the plan... a mdi form with a listview on the left and in the right panel MANY of these little forms).

 

I'm not quite sure what your code does, but what i need is pointers as to how i would create this look... I was thinking it was a form with the onpaint overridden and some how a button placed up in the right hand corner, but as I said - not sure how to do that kind of funky stuff!

 

Regards.

 

Take a look at the attached. It should give you a start.

Collapsible Window.zip

Here's what I'm up to.
Posted

Wow! Not sure if thats a piece of code you have found, or knocked up your self but thank you! Thats very similar to what I need :)

Just will spend a bit more time defining its looks etc, but a great base. Thank you :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...