|
hi
im kinda newbie with VB
and while trying to change a font property for an object
i get an errorfor example
<br />
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click<br />
TextBox1.Font.Size = 12<br />
End Sub<br />
i'm getting the error that "Property 'size' is 'ReadOnly'
how can it be changed??
10x
-- modified at 21:02 Sunday 25th December, 2005
|
|
|
|
|
You have to make a new Font:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim oldFont As Font = TextBox1.Font
'Make a new font (12.0! is the size)
'Here i did it with the font family and style of the old one
'So only the size get's changed
Dim newFont As New Font(oldFont.Family, 12.0!, oldFont.Style)
'Give the textbox the new font
TextBox1.Font = newFont
'Dispose of the old font for memory
oldFont.Dispose()
End Sub
HTH!
Merry Christmas!
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
10x
i'll try this 1
Merry Christmas!
|
|
|
|
|
i want to open commondialog control with additional button called "Control Source" for activating the sourcesafe for getting files from source safe
still havent found a way
can someone help?
|
|
|
|
|
This[^] article on MSDN might be of same interest to you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello!
Any idea how can I detect the logical driver name where the OS has been installed on the hard drive?
VB.NET?
Bedri
|
|
|
|
|
Again, WMI. You're looking for Win32_SystemDriver objects.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am in urgent need of media player for pda develped using .net 2003 and compact framework 1.1. if anybody can do it. I ll be grateful
chimranashraf@yahoo.com
|
|
|
|
|
Either Google for it or have someone write it for you at RentACoder.com. Noone here is going to write it for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Any idea how can I detect the devices that are attached to USB ports?
VB.NET
Thanks!
|
|
|
|
|
The .NET Framework doesn't have anything that will do this for you.
You either have to have an understanding of how Windows interacts with devices and write the enumeration code yourself, P/Invoking the required functions.
Or, use WMI to to enumerate through the devices. You're looking for objects of the WMI class Win32_USBControlerDevice. Google that class name for examples.
The method you choose depends on the what you want to do after you enumerate the devices.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I save a treeview state to come back to this state later, not retrieving its values from db again.
-- modified at 11:17 Saturday 24th December, 2005
|
|
|
|
|
Look at the three articles written by Tom John here on CP about treeview controls. His first on persisting treeviews should answer your question.
Do or not do. There is no try.
|
|
|
|
|
George,
Thanks a lot for your help. These articles were really very usefull.
|
|
|
|
|
Dear friends,
Is there any way to hook the web browser(like internet Explorer, mozilla and Netscape)and sniff the web mails that were sent and web pages visited.
It will be great help if somebody can help me out in this regard.
language : VB6
OS : Win2k or winXP
Thanks in advance
with regards
Dinakara K
CAIR, Bangalore
|
|
|
|
|
How can collect the tables using MS-Access with Oledb connection in VB.Net
Johnson
-- modified at 5:03 Saturday 24th December, 2005
|
|
|
|
|
Hellow,
Any one can help.......
Johnson
|
|
|
|
|
Can someone tell me how to loop through a string array using a FOR..NEXT or DO UNTIL loop?
Public Sub Update(ByVal Product_Category As String, ByVal Percentage As Decimal, ByVal ParamArray Location_Codes() As String)
End sub
The above is my subroutine and I want to loop through the ParamArray Location_Codes(). So that I can then run some additional code for each item in that array.
Kinda like this:
For each XXXX in Location_codes()
Make some decisions
Next
Can this be done?
Thanks
|
|
|
|
|
You can loop through using the Chars method:
Dim thisstring As String = "abc"
For i As Integer = 0 To thisstring.Length
MsgBox(thisstring.Chars(i))
Next
In VB 2005, you can omit the ".Chars":
For i As Integer = 0 To thisstring.Length
MsgBox(thisstring(i))
Next
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
|
|
|
|
|
Ack - that should be "thisstring.Length - 1" of course.
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter
Clear VB: Cleans up outdated VB.NET code
|
|
|
|
|
Public Sub Update(ByVal Product_Category As String, ByVal Percentage As Decimal, ByVal ParamArray Location_Codes() As String)<br />
<br />
For Each code As String In Location_codes()<br />
'Make some decisions<br />
Next<br />
<br />
End sub
You may have to do some error checking first, to see if Location_Codes is not nothing or empty.
Merry Christmas!
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick
|
|
|
|
|
Hello!
I have a problem in my application that occurs after screen resolution changes. It crops the background image of the form. So the form's background image looks cropped after change from (800 x 640) to (1024 to 768). I have developed application for (1024 x 768) screen format.
Any idea how can I solve the problem!
Thanks!
Bedri
bckurd@e-kolay.net
|
|
|
|
|
I'm assuming .NET 1.1...
You'll have to resize the image your using for the background yourself. You can do this by drawing the background image yourself in the OnPaint event of the form. Use the ClientSize property of the form to determine the correct size. This will also work if the user grabs a side or corner of the form and resizes it to something smaller than the screen dimensions.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi everybody,
I use database oracle8i, and use System.Data.OracleClient to connect db, but when i insert, updat data, It can't save unicode font.
Do you what is problem? how to fix it?
Thanks!
xyz
|
|
|
|
|
What does a Font have to do with saving data in a database?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|