|
What have you done so far?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
How do connect my classes to my GUI form...especially graphics & multimedia classes PLZ Help...
|
|
|
|
|
You may ask your question in a different way so we DO understand what you mean...
|
|
|
|
|
Explain it properly what you want no one can understand your question
|
|
|
|
|
I am using following API function to open folder browse window. I want to show only selected drives not all the drives. Can anyone help me to achieve this task as I am not a .net programmer.
Thanks
Public Function BrowseForFolder(ByVal sTitle As String, ByVal sRootPath As String) As String
Const WINDOW_HANDLE As Long = 0
Const NO_OPTIONS As Long = 0
Const BIF_NEWDIALOGSTYLE As Long = 64
Const BIF_EDITBOX As Long = 16
Dim fctResult As String
Dim objShell As New Shell32.Shell()
Dim objFolder As Shell32.Folder
Dim objFolder2 As Shell32.Folder2
Dim objFolderItem As Shell32.FolderItem
fctResult = ""
objFolder = objShell.BrowseForFolder(WINDOW_HANDLE, sTitle, NO_OPTIONS Or BIF_NEWDIALOGSTYLE, sRootPath)
If Not objFolder Is Nothing Then
objFolder2 = CType(objFolder, Shell32.Folder2)
objFolderItem = objFolder2.Self
fctResult = objFolderItem.Path
End If
objFolderItem = Nothing
objFolder2 = Nothing
objFolder = Nothing
objShell = Nothing
Return fctResult
End Function
|
|
|
|
|
I'm not quite sure what you mean by "show only selected drives not all the drives", but you may want to start by changing to .Net's FolderBrowserDialog[^] component. With the FolderBrowserDialog you won't have to fool with the APIs.
If you are wanting to restrict what drives they can choose, you could either show a MsgBox if they pick a disallowed drive and ask that they choose again, or check out the Folder Browser component for .NET[^] article. You can probably edit it to not display drives that you want to be hidden.
|
|
|
|
|
Many thanks for your reply. I mean I don't want user to save documents in C or D drive but they are allowed to save on network drives.
|
|
|
|
|
|
currently i m using asp.net with vb (1.1 framework)
how to get the client machine date and time. always the SERVER date&Time is displaying for me...
help me..
thanks in advance - KARAN
|
|
|
|
|
|
You can use JavaScript[^] since it runs on the client side.
|
|
|
|
|
The subject says it all really, how can I return the number of items in a print queue for a certain printer?
Any suggestions?
Thanks in advance
James
|
|
|
|
|
You can use the GetPrinter API call getting a PRINTER_INFO_2[^] structure and the cJobs property is the count of jobs in the queue.
The EnumJobs [^]API will give you details of each print job in the queue.
The PrintQueueWatch component source code[^] has these and many more printer related API declarations in it...
|
|
|
|
|
Ahh great, that's given me a load to work with - cheers!
|
|
|
|
|
When I run my VB.net WindowsApplication
I can see that (in the Process tab of Windows Task manager) the mem usage keeps on increasing.
Can someone tell me how to stop this or if we can retain the memory that was used up and no longer needed by the application.
Ashfaq Maniar, Software Developer.
Ashfaq Maniar, Software Developer.
|
|
|
|
|
Erhm, there's this 'thing' called the Garbage Collector, this will clean up objects which are no longer in use. If thise 'collected' objects use loads of memory, that memory will be freed, and is available again. The garbage collector is very sophisticated and i'm pretty much sure it works fine for most applications. However, as programmer, you need to 'tell' the garbage collector which objects aren't used anymore. This way you will 'help' the garbage collector finding objects to free from memory.
All objects derived from the IDisposable interface, have this method called Dispose(). Dispose() will clean up all resources the object uses. If you're done using an object, call the Dispose() method so the garbage collector can do it's work. In C# the using statement helps you to not forget to call the dispose method. The example below instantiates a new object, but because i'm doing this with the using statement, the object will automatically dispose at the last bracket
<br />
using (ObjectType myObject = new ObjectType())<br />
{<br />
myObject.DoSomething();<br />
}<br />
This code is by the way the same as :
<br />
ObjectType myObject = new ObjectType();<br />
myObject.DoSomething();<br />
myObject.Dispose();<br />
You also need to find out which of your own classes are suitable to implement the IDisposable interface to they can also dispose themselves.
The garbage collector runs pretty much automaticly and you shouldn't interfere, however if you really feel like freeing memory is useful at a certain point, you can call the garbage collectors Collect() method :
<br />
GC.Collect();<br />
The collect however is pretty time-consuming and neat programmers don't need to use the Collect(). There may be exceptions to that however...
|
|
|
|
|
I am using VB.net
When ever a class is not usable i type
class1 = nothing
But the main problem is .... when a form is open and when you click anywhere on the form...the consumed memory still goes up and comes down only when the user closes the application.
Ashfaq Maniar, Software Developer.
|
|
|
|
|
On one of the machines I use, I have the VB Express installed.
(I know, I know...it was quick and nasty and used for the odd small thing)
I tried to do something that wrote to an XL sheet.
Is it me or does VB Express not support writing directly to XL?
Am I not declaring properly in a reduced syntax environment perhaps?
Am I being incredibly dim and missing something rather fundamental?
Please clarify and enlighten, my ignorance is annoying me!
------------------------------------
"I want you to imagine I have a blaster in my hand" - Zaphod Beeblebrox.
"You DO have a blaster in your hand" - Freighter Pilot
"Yeah, so you don't have to tax your imagination too hard" - Zaphod Beeblebrox
|
|
|
|
|
Hi ,
I need a Single DES or Triple Des or AES code in Dot Net...
Regards,
Narayanan.S
|
|
|
|
|
I googled and found tons of code.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
|
in which version you want this code.
VS 2005 and later has directly support for any type of encryption algorithm like AES, DES, RSA etc.
|
|
|
|
|
Thanks For ur Reply...
I have seen that code , but i could`t undestand the logic behind that Algorithms ... I got lot of documents Regarding that algorithm, but
I could`t undersatnd how they r using the keys for Encryption & decryption and all....
Regards,
Narayanan.S
|
|
|
|
|
Please let me know .. if you want the sample code for the same ...
and regarding which type of encryption algorithm
|
|
|
|
|
Hi, I need help connecting an access file with my project I am working on in Visual Studio 2008 (I also have Visual Studio 2005).
I know how to connect to SQL databases but access is totally new to me. My friend told me that just add it through the "Add data source wizard" and then drag the columns you need from the "Data Sources" side bar.
I did that the connection was established and I the navigation bar was also created automatically, when I ran the program, it was showing the records from my access file, I was able to add or delete records but the changes I made to the database are just temporary and are not saved in the database (THIS IS WHERE I NEED HELP)
Please answer this question, I am stuck because of this problem, and please answer it as descriptively as possible because I am new to coding and don't know much.
I don't know ADODB or anything else like that but am willing to try anything just want to be able to access, edit and update any access file from within my program.
Thanks for your help in advance.
|
|
|
|