|
Give me an example if u can
................
|
|
|
|
|
if u know the functions , u can do it pretty easily.
|
|
|
|
|
Sorry to disturb you again, the connection string with the server name it will define whether found network or not?
................
|
|
|
|
|
Hi,
I have a drive called "Games".
How can i get that label in vb.net? (volume label?)
Thanks in regard,
--Zaegra--
|
|
|
|
|
For Each str As System.IO.DriveInfo In DriveInfo.GetDrives()<br />
MessageBox.Show(str.VolumeLabel)<br />
Next
|
|
|
|
|
Set a reference to Microsoft Scripting Runtime (COM)
Add
Imports Script
Then:
Dim fso as New FileSystemObject
Dim drv as Drive
drv=fso.GetDrive("C")
MessageBox.Show ("Volume: " & drv.VolumeName)
Vuyiswa
|
|
|
|
|
Thanks
|
|
|
|
|
Hi,
I have a drive called "Games". How can I get this in vb.net? I have tried the following:
Dim attr As FileAttribute = Microsoft.VisualBasic.GetAttr("D:\")
Dim str as string = attr.ToString()
labProg.text = attr
It does not work
Does anyone know how to get the label of a drive?
Thanks in regard,
--Zaegra--
|
|
|
|
|
|
Hi there
i have two forms named form1 and form2 two class files named class1.vb , class2.vb
now in class1 the code is as follows
class class1
protected overrides sub Finalize()
mybase.Finalize
End Sub
end class
class2 code is as follows
class class2
protected overrides sub Finalize()
mybase.Finalize
End Sub
end class
In form1 i am writing the following code
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dim d1 as new form2
d1.show
End Sub
End Class
In form2 i am writing the following code
Public Class Form2
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
dim d1 as new class1
End Sub
End Class
The startup page is form1
At form1 loads i am getting form2 automatically.
now i am closing the form2 .
Now
at the form2 closing event i am writing the following code.
GC.Collect
even this is not realeasing the class2 object memory.
Why is this happening?
I know ............
The Finalize method does not run when the object goes out of
scope. At that point, the object is simply not used any more but
the program doesn't destroy it.
Instead the program just ignores it until it starts to run out of
memory and it needs to perform garbage collection. Then it scans
all of the objects that the program has been using and
determines which ones are no longer in use. Only then does it
call the object's Finalize method
|
|
|
|
|
Nilish wrote: GC.Collect
NEVER do that. You have no reason to, you're just fighting the system and slowing it down.
Nilish wrote: protected overrides sub Finalize()
mybase.Finalize
End Sub
This code is obviously worthless, unless you have it just to set a breakpoint.
Forms are also special. The system likes to just hide them rather than dispose of them. Again, the framework is pursuing strategies to maximise performance, which is why you should just let it do it's thing.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
My (simplified) explaination on .NET Memory mangement should be another one for that FAQ...
|
|
|
|
|
Nilish wrote: even this is not realeasing the class2 object memory.
Why is this happening?
This depends on where you're getting your memory information from. If it's Task Manager, you're making the typical newbie mistake.
Managed Code (.NET CLR) applications run in a virtual machine, just like Java does. The application makes memory allocations and gets them filled by the CLR Memory Manager, which maintains a Managed Heap. This heap is reserved by the CLR, even though your application isn't using the entire heap, it's still allocated to a process as far as Windows, and Task Manager, is concerned.
When your code allocates on object, the request goes to the CLR Memory Manager. If there is sufficient free memory in the Managed Heap, the object is allocated out of that Heap. If not, the Memory Managed requests a block of memory from Windows and adds it to the Heap, THEN allocated your object out of the newly expanded Managed Heap.
If Windows wants some memory back, it just tells the CLR Memory Managed and it'll free up whatever it can that isn't being used.
This is what you're seeing in Task Manager. You're not seeing the actual memory your application is using. You're seeing what the CLR has reserved for your application.
If you want to see the actual memory use, you'll have to use Performance Monitor and the .NET CLR memory counters to the real numbers.
|
|
|
|
|
i want to know source code to convert the wav File to MP3 File in vb.net. Thank you for your kindness!!
fujiwara
|
|
|
|
|
|
Does anyone know of a way to make a modal dialog that will lock the system until the dialog has been dismised?
Thanks for any help
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
|
What Im looking for is to make a dialog that will lock the entire system, however the keyboard and mouse must still function to interact with the dialog...it will be used on a touch screen system.
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Thats my question... help me guys..
|
|
|
|
|
Right click on your project, choose add/new item. Choose a user control from the list of possibilities and type a name.
If you want to go beyond that step, you need to be more specific ( or, more likely, type your question in to google ).
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
dear christian...
what you said is not unknown to me... i want to go beyond that.. can you give me some articles about it.. what is the advantage in using these type of controls..??
The name is Sandeep
|
|
|
|
|
Xandip wrote: i want to go beyond that
Then ask a question that makes this clear
Xandip wrote: can you give me some articles about it
google can. This site is bursting with them
Xandip wrote: what is the advantage in using these type of controls..??
Encapsulation and code reuse. I can create a control and use it in many places.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
I currently using VB.NET 2005, i want to make application that can run through to another computer in network group, please give an example.
Thanks
Socheate
................
|
|
|
|
|
Your question makes no sense. Do you want to communicate between two apps ? Do you want one PC to do processing for another PC ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|