|
When I minimize a child form in VB.Net it always goes to the bottom left corner. when I try to reference it from the parent and move it to the right some it just sits there, it seems like there is a property holding it. When minimized I can take my mouse and move the minimized form and it will then open and minimized to that location. Any help will be appriciated.
|
|
|
|
|
try ChildForm.SetBounds(300, 300, 0, 0)
|
|
|
|
|
that is only changing the form when it is restored, not the minimized title bar part.
|
|
|
|
|
i couldn't find a way to do what you asked about so by using this technique you can "simulate a minimize" by setting the size to 0,0 which will allow you to control the location.
in the form's resize event check if the windowstate = minimize and if it is, set the window state to normal then use the setbound to shrink it and to place it where you want. (just an idea)
|
|
|
|
|
Can anyone tell me how to use a command button to change the font of the writing on a form and another button to change the colour of the font on the form?
Using: Visual Basic.net 2002
Thank you!
-- modified at 12:48 Monday 8th January, 2007
|
|
|
|
|
1) your obviously are going to be dealing with the click events of both buttons
2) are you hard coding the font or do you want the "wizards" to pop-up and let them choose?
|
|
|
|
|
I would like the wizards to pop up and to let them choose as long i can change both font and colour
|
|
|
|
|
Ex:
'font
Me.Font = New System.Drawing.Font("GeoSlab703 Lt BT", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
'color
Me.ForeColor = System.Drawing.Color.Red
use the 'font dialog' control and 'color dialog' control from the toolbox to allow the user to choose...
|
|
|
|
|
|
help..plz help me how to read/eject USB flash drive serial number..plzz
tenkz a lot..its a big help..
gladz
|
|
|
|
|
you could try WMI to get the serial, i don't know how to eject it though...
|
|
|
|
|
Hi all,
I'm trying to write shoot date on the images from exif datas. I'm using Graphic.DrawString but it's not working. Weird thing is, when debugging it writes but when running not! My code is very simple;
Dim f As New Font(FontFamily.GenericSerif, 8.5F, FontStyle.Regular, GraphicsUnit.Point)
Dim graph As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(_img)
graph.DrawString(exifListBox.SelectedItem.ToString(), f, Brushes.Black, CSng(_img.Width) - 100.0F, CSng(_img.Height) - 30.0F)
Why it is not working when running?? Anybody has an idea?? Thanks...
Savas Cilve
|
|
|
|
|
Did you call Dispose() on the Graphics object (graph in your code) when you were done drawing with it?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Yeah I did it after your response but nothing changed
|
|
|
|
|
You might want to include the code around this code. There's something else wrong we can't see because there's not enough code to show us what else is going on.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
There is nothing around this code. But I solved this issue with adding
pictureBox.Image = _img
just after the graph.DrawString(...)
I guess my description of the issue let people think wrong
Thanks so much for your interest..
Savas Cilve
|
|
|
|
|
Yeah, if you show the picture or put it in a PictureBox, THEN make changes to the image, the changes won't be seen until you assign the picture to the PB again or redraw the screen image of the bitmap.
Changes to the bitmap image are NOT automatically updated in the controls that are showing them.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
|
|
BinaryFormatter.Serialize works well but BinaryFormatter.Deserialize throws an Exception
"The Assembly ProjectManagement, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null can not be found."
The Assambly lays in the same Directory like the DLL that is Serializing.
What can I do?
mfg
|
|
|
|
|
The listbox has a member "indexfrompoint" that returns the index of the item at specific coordinates. Is there a reverse function that gives the coordinates of an item with a given index?
|
|
|
|
|
of course it's a rectangle:
Public Function GetItemRectangle ( _
index As Integer _
) As Rectangle
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Sir/Madam,
Can I programically find out whether the particular table exist in the database or not.
Thanks abd Regards
|
|
|
|
|
you can do this by querying the DataSet's table-Collection with the method Contains.
e.g:
Dim ds As New DataSet
...
If ds.Tables.Contains("YourTableName") Then
...
End If
- walter
|
|
|
|
|
He said database, not DataSet .
|
|
|
|