|
Ya i know this thing but in this we create close and other title bar button too. I mean Title has default controls but color title bar color change as we do in Windows Xp we can change title bar font, color etc in the properties box.
May be i never got your point i send you an url you visit this and then tell me.
http://www.skincrafter.com[^]
Muhamad Waqas Butt
waqasb4all@yahoo.com
|
|
|
|
|
I have checked the site well if you found any free control for this type of design do let me know
my mail is rbashir@alm-soft.com
thanks and best of luck
|
|
|
|
|
Let say we have a class 'car' and it has an attribute 'color'. We can easly create 2 instance of car and set their color as:
Dim car1 as New Car
Dim car2 as New Car
car1.color = "red"
car2.color = "blue"
However if we need to create many instances of car then this method is limited. I want to write a procedure which can receives the name of instance and the color as parameters and then creates the instance and set the color.
Private Sub xyz(insName As string, colName as String)
dim insName as New Car
insName.color = colName
End Sub
|
|
|
|
|
Dim insName As New Car will not work.
Typically what you do in this scenario is create a collection of Car objects and then retrieve the instance you want by a key string value.
Dim colCars As New Collection
Private Sub CreateNewCar(ByVal colName As String, ByVal Key As String)
Dim oCar As New Car
oCar.Color = colName
colCars.Add(oCar, Key)
End Sub
Then retrieve an instance by
Dim oCar As Car
oCar = colCars(Key)
etc.
|
|
|
|
|
Use a parameterized constructor:
Public Class Car<br />
<br />
Private Color as String<br />
<br />
Public Sub New()<br />
'default constructor<br />
End Sub<br />
<br />
Public Sub New(colName as String)<br />
'parameterized constructor<br />
Me.Color = colName<br />
End Sub<br />
<br />
End Class
Do a Google search on Constructors for more information.
|
|
|
|
|
Hi guys,
Can someone help me? I need to open a temporary text file and put some numbers in it for another app to read.
This third-party app will delete my temporary file upon reading it.
The trick is, how do I stop him from deleting my file until I finish writing the complete number? Is there anyway I can "lock" until i use FileClose() command?
Please adivise...
Thanks...
|
|
|
|
|
The FileOpen() method should set the OpenShare parameter to OpenShare.LockReadWrite by default so other processes cannot delete the file before the FileClose().
From .NET help:
Public Sub FileOpen( _<br />
ByVal FileNumber As Integer, _<br />
ByVal FileName As String, _<br />
ByVal Mode As OpenMode, _<br />
Optional ByVal Access As OpenAccess = OpenAccess.Default, _<br />
Optional ByVal Share As OpenShare = OpenShare.Default, _<br />
Optional ByVal RecordLength As Integer = -1 _<br />
)
e.g.
<br />
FileOpen(1, "TESTFILE", OpenMode.Output, OpenAccess.Write, _<br />
OpenShare.LockReadWrite)
Are you opening and closing the file only once, or after each number is written?
...Steve
|
|
|
|
|
hi i need motion detection program in visual basic 6
i need program motion detection from webcam and
motion detection from my tv card
|
|
|
|
|
Sorry, we don't just give a completed apps away here.
The mission here at CP is to help you with code you write.
Try Google if you're looking for complete apps -> "vb6 motion detection"[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
This is going to sound stupid to you, but iv'e only just started programming (a few hours ago, just playing around, no books)
anyway,
I'm trying to change the enabled property of a textbox when there is input,
I'm using the following, and the enabled property of the button is set to false at design time.
<code>Private Sub btnlogin_EnabledChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnlogin.EnabledChanged
If txtpassword.Text = "" Then
btnlogin.Enabled = False
Else
btnlogin.Enabled = True
End If</code>
Please help me
Thanks
|
|
|
|
|
Hi,
Guess you should use the use the textchanged on the textbox setting the enable property on the btnlogin instead of using the enabledchanged on the button, as this would require the button property to change before the code is executed
Cheers
DJ
Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...
|
|
|
|
|
"I'm trying to change the enabled property of a textbox when there is input"...???
Private Sub txtpassword_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
If txtpassword.Text = "" Then
btnlogin.Enabled = False
Else
btnlogin.Enabled = True
End If
End Sub
|
|
|
|
|
Thanks. That worked great
|
|
|
|
|
Hi,
I am looking for some way that you can drag and drop a columnheader and create a group based on that. I know there is a lot of third party software doing this, but they more or less all look the same, so I am wondering whether this is somekind of standard feature provided by the grid or that it is realy simple to code. Normally I would find something about this in the articles section as it is a quite common feature, but i couldn't find anything there. Any suggestions?
Cheers
DJ
Think, try, think, think, try, think, think, think, try, ASK, think, try, advance on step and start over...
|
|
|
|
|
hello anyONE,
Can any body tell me how to set parameter value from vb.net code of cr9, the value exist in a text box named txtName
FIRE
|
|
|
|
|
|
how to make a variable that in every hour it makes + 1 in this variable?? ex: now it is 5 pm and in my var there is a number 6. that when 6.pm comes it makes + 1 to var so that it will be num 7. how can i make this??
|
|
|
|
|
Use timer control to do that
1-add timer component
2-set enabled to true
3-set interval to hour 1000 ms=second
in tick event increment the variable
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
i = i + 1
Me.Text = i.ToString()
End Sub
MCAD
|
|
|
|
|
Hi
I need to remove the icon of AN OTHER APPLICATION from the system tray. Is it possible?
Thanks
|
|
|
|
|
Nope. You can't get to it because your app doesn't own it. Besides, you'll only cause the other application to crash. The only way to remove the icon is to shutdown the other app.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello there
I have one thread running parallel to main application. the problem is it takes 100% CPU Usage and I want to assign it say 10 % of the CPU so that in any case system should not go slow.
Can any one guide me how to allocate % CPU Resource to any particular thread. or doing same thing with any application ike MyApplication.exe will take only 10% of the CPU Resource.
|
|
|
|
|
|
|
Hi,
Have you found a solution ?
In Folding@Home you can set max cpu usage in %, but no one has been able to tell me how this is done in vb.net.
|
|
|
|
|