|
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 .
|
|
|
|
|
your're right! sorry
- walter
|
|
|
|
|
amaneet wrote: Can I programically find out whether the particular table exist in the database or not.
Yes, however the exact query depends on the database.
For example, in SQL Server 2000 the query
SELECT * FROM INFORMATION_SCHEMA.TABLES gives you your starter for 10.
|
|
|
|
|
Hie guys. I am new to the forum but I hope it will be worthwhile to be here.
I need a project proporsal for any small system I can undertake as my college project. Others have been doing projects like Accounting systems, something to do with Intranet etc.
well I would prefer mine to be coded in VB6 if having a database the it should be SQL server database with something to do with the ineternet or intranet. please guys just send me anything. Any project that can be run in VB6.
My email is mtheprince@yahoo.com
Thanks
makedp
|
|
|
|
|
makedp wrote: I would prefer mine to be coded in VB6
My first piece of advice is not to do this in VB6. VB6 is almost completely obsolete now. It was replaced in 2002 by VB.NET (almost 5 years ago, during which time versions 1.1, 2.0 and 3.0 have been released)
|
|
|
|