|
I have a treeview as a menu in my Mdi form. I am seting all form locations to the right of the menu. When I minimize a form it goes behide the treeview control. How do I move the minimized form over to the right so I can see it. Any help will be greatly appreciated
|
|
|
|
|
MDI Child forms are rendered inside another control on the Parent form. This control is called the MDIClient. Search the Controls collection of the MDI Parent form and you can get a reference to the Client control. Once you have the reference you can manipulate the control just like any other control you drop on a form, even move and resize it so it leave you room on the left side of the MDI Parent form for your TreeView control.
For Each c As Control In Me.Controls
If TypeOf c Is MDIClient Then
Dim mdic As MdiClient = DirectCast(c, MdiClient)
mdic.Dock = DockStyle.None
mdic.Anchor = AnchorStyle.None
mdic.Location = New Point(20, 20)
mdic.Size = New Size(200, 200)
Exit For
End If
Next
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All,
is it possible to search & find a specific MAC address of NIC card without knowing the IP address or any other details in VB .net?
B Regards
Ajith
Ajith
|
|
|
|
|
No, there isn't. If you can provide some kind of detail about the target machine, there's no way for your code find that specific machine. You're best bet would be the IP address. But, looking up the MAC address using the IP only works if the machine is on the same segment as the one looking up the MAC. If there is a router between you and the target machine, you'll end up getting the MAC address of the near-side of the router, not the machine you're trying to resolve.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi everyone, i am not sure if this is posible but i am asking anyway.
I am building an application that reads from a database and fills a dataset.
each time i click a next button in my program i am able to move to the next record..my coding works fine and everything but there is a lot of records.. i have a find function that finds any particular data in the database and thats fine too...but...
what i need is, how do i get my program to traverse through all the records by clicking and holding down the mouse pointer on my next button. that is, when i click and hold down the mouse pointer on the next button it continues showing the next record until i release the mouse pointer..
I hope this information was clear enough..please help..
Thanks in advance..
|
|
|
|
|
have you tried using the mousedown and mouseup events? put loop in the event checking a flag that is turned off by the mouseup event
----------------------------------
**mousedown event**
mbMouseIsDown=true
do while mbMouseIsDown and not eof
'get next record
'display record
application.doevents 'make sure form shows each record and windows can do some other stuff
loop
mbmouseisdown=false 'incase eof was hit
-----
**mouseup event**
mbmouseisdown=false
|
|
|
|
|
How does one make use of high quality icons in .Net?
I created my own icons which are of a high quality but when I use them in my winform they turn to moosh!
See sample here[^]
My icon files are 248 x 248 pixels, 96dpi, 32Bit Depth
you can't forget something you never knew...
"Watching Migthy Joe Young made me hate my life..................................I want a gorilla!" A. Havemann
|
|
|
|
|
It' because you are using a large icon to show as a small icon. Try resizing your icon to about 16x16 or 32x32 pixels, that should help.
If you need a good program, I would suggest Icon Sushi.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Hey guys,
I've tried looking everywhere and I can't seem to find a solution. Basically, I want to change the inside "box" of an MDI parent form (where an MDIChild can go) and round the corners there. I tried drawing a "border" around the MDIChild and forms, I also thought I could set the background colour to transparent of the MDI Parent, though this didn't work.
If someone could point me in the right direction or let me know it cannot be done, that would be great.
Thanks,
Daniel
|
|
|
|
|
Hi Daniel,
I'm not sure it is possible to achieve what it is you are trying do, but I do have a bit of past experience with MDI forms.
I originally wrote an application where I wanted to change the backround image of the MDI form. This is not possible by setting the forms "BackgroundImage" property. I found that the MDI form has a control on it that handles all the displaying of child forms. It is this control that I had to alter the background image property of.
Below is a snippet of code I used to achieve this, perhaps you can manipulate the MDI form control in a similar fashion to what I did to achieve your rounded corners:
For Each Mdi_display As Control In Me.Controls
If TypeOf (Mdi_display) Is MdiClient Then
' Set colour to white
Mdi_display.BackColor = Color.White
' Centre the image
Mdi_display.BackgroundImageLayout = ImageLayout.Center
' Set background image
Mdi_display.BackgroundImage = My.Resources.Main_background
Mdi_display.Refresh()
' All done!
Exit For
End If
Next
Regards,
Martin
|
|
|
|
|
Hi Martin,
thanks for that. Works great for a background image (which I might add in later, looks better than the grey and much nicer than doing it the way I was fiddling with before). Unfortunately, the client area still has a square border around it :/
|
|
|
|
|
Best way to send xml data from one location to another..
We need to serialize the data.
Is it necessary.
If we do that tags will got change.
|
|
|
|
|
plz guys
i need a help
how to put sql server instances running on the local area network in a combo or a list in vb.net 2003 and not in 2005.
i can put them in 2005 but in 2003 i can't
and i need it badly
plz plz plz
|
|
|
|
|
halooooooo is anybody there ??
helppppppppppppppp !!!!!!
|
|
|
|
|
Lord Hasan wrote: how to put sql server instances running on the local area network in a combo
A little Searching goes a long way.
Here is an article that showed up Searching "SQL Server Network" here at Code Project. Finding SQL Servers on the Network[^]
If your having specific issues then post those instead of a very general question, which is why no one responded to you.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hello, I have to create a small program that allows a Check box that controls a label message on aother form to show a message when the box is checked, the label is on Form1 and the radio button is on Form2.
But I dont know how to get a Check box to control something on another form, Any help would be great thank!
(Im using Visual Basic.net 2002 on Windows XP)
-- modified at 7:51 Thursday 4th January, 2007
|
|
|
|
|
In the CheckedChanged event of you check box, use an If statement to detect the check state of the check box. Then, (depending on the check state), change the label.
For example:
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
Form2.MyLabel.Text = "Checked"
Else
Form2.MyLabel.Text = "Unchecked"
End If
End Sub
Hope this helps.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Thank you for this solution!
|
|
|
|
|
Sir/Madam,
I am facing the problem in the query implementation in vb.net.Like I have an id that is present in 5 tables(like table1,table2,table3,table4,table5).I have to pick those records from table1 which are not present in tabl15.I mean an id number 1 is present in table1,table2,table3,table4 .but the id number 1 is not present in table5.My final motive is i have to pick all the id like 1.
i am using the query in the following way.
dim str as string = "Select able1.field1,table2.field1,table3.field1,table4.field1
from table1,table2,table3,table4,table5
where
(table1.id<>table5.id and table2.id <> table5.id and table3.id <> table5.id
and table4.id<> table5.id)
it is showing those records that are not present in table5 but present in the remaining tables.
But the problem is , there occured duplicacy.I mean one record is iterating 24 times i the final result.
Please help.
Thanks and Regards
Pankaj
|
|
|
|
|
Hi Guys,
Happy new year everyone!!!
Resolution I: Reduce number of all-nighters from 366 to 365
Resolution II: Reduce coffee consumption from 700lt to 700lt – ½ cup
Anywho…back to the problem. I was trying to think of a simple solution for auto-patch/upgrade engine for one of my last projects. Obviously didn't go very far.
If any one has some ideas or links to point me in the right direction I would really appreciate it.
Thanking in advance
Happy Coding
The perfect code is always in your head...it just a matter of how hard you bang your head against the wall to get it out!
|
|
|
|
|
Anyone?
The perfect code is always in your head...it just a matter of how hard you bang your head against the wall to get it out!
|
|
|
|
|
Alex Feature wrote: If any one has some ideas or links to point me in the right direction I would really appreciate it.
Wasn't Click Once deployment developed for this purpose? Hmm I think there might also be some features for auto updating as part of MSI installers.
If neither of those two options will work then take a look at this thread, while it’s a different language the concepts are still the same.
Compiled help from the LAN[^]
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hi,
Any one have an idea about counting total records in a reader.
Thanks,
|
|
|
|
|
pathak78 wrote: Any one have an idea about counting total records in a reader.
Read all the rows out counting as you go. There is no method for giving you a count ahead of time.
|
|
|
|
|
Just had another thought. You can send the query SELECT COUNT(*) FROM .... to the datbase followed by the query where you replace COUNT(*) with the columns that you actually want. That way the first result set out of the Data Reader will contain the count. Remember to put both in a transaction so that the count does not change between queries as it is possible another process could sneak in and insert or delete a row in the table you are selecting from.
|
|
|
|