|
you have 2 ways:
\\terminal id\folder/share name
\\ip address\folder/share name
you obviously need security to do the above...
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
|
If you are in a windows application, there is no cache. Read about Singleton pattern and how it is implemented.
If you are on an ASP.NET application, you can use cache("name") = YourArray . But then you are in wrong forum. Try ASP.NET forum.
|
|
|
|
|
yes i am in windows application in vb.net but i am not success in store array in catch memory plz send some code for use cache memory.
thanks
Vineet Swami
Isol
|
|
|
|
|
I'm pretty sure this is completely controlled by your computer's hardware and you cannot directly tell your computer to cache something in any programming language. Bascially cache is relatively small so your computer has some algorithms that generally move the part of your program that is in use into the cache and move it out when it is not. This works more than 90% of the time so I wouldn't worry about it too much.
There are ways to indirectly affect cache hit rates and make your program slightly faster but since you are a begginer I would recommend you learn how to use the language first and worry about making your program fast later (assuming it is not fast enough already).
|
|
|
|
|
Yes, such an optimization should be really subtle.. If speed is so important to you, use C++ instead of .NET.
|
|
|
|
|
Try looking for Enterprise Libray Caching on the Microsoft site - they have a load of ready to use blocks - probably over tbhe top for what you need, as I suspect all you are really looking for is a method of only reading the data once. Try googling for 'shared' (VB) or 'static' (C#)
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Dear All
i am trying to send email using vb.net i am using this code and on my PC it's OK but on others not,
the point is the outlook account created on that PC for a Gmail account and i need to send it using the smtp server on another account i tryed to use the property "omsg.SendUsingAccount" can any one help plz
Dim oApp As Microsoft.Office.Interop.Outlook.Application
oApp = New Microsoft.Office.Interop.Outlook.Application
Dim oMsg As Microsoft.Office.Interop.Outlook.MailItem
oMsg = CType(oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem), Microsoft.Office.Interop.Outlook.MailItem)
oMsg.Subject = "Hello!!!"
oMsg.Body = "Hello World"
oMsg.To = "zzzzzzz@zzzzz.com"
oMsg.Send()
|
|
|
|
|
I think you should looking for this.[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
thanks
but i am dealing with a smtp using exchange 2007 this is why i am using CDO1.2.1
modified on Monday, October 20, 2008 9:39 AM
|
|
|
|
|
If you're connecting to Outlook (at client side) using CDO, the client must have both Outlook and CDO installed. I would guess that the non-working PC is missing the other one.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hi,
When I use this internal function my program automatic create a folder for the use of the program. Thats fine, but it also create a subfolder with the version number. Is there a way to avoid the creation of the subfolder?
I use this code:
sFile = New IO.DirectoryInfo(Application.LocalUserAppDataPath).Parent.FullName
I use now the parent becourse I dont need that subfolder!
Jan
|
|
|
|
|
Your post is confusing. Try this method instead:
my.Computer.FileSystem.CreateDirectory(strYourDirectoryPathHere)
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
The way you suggest is create the folder yourself.
with Application.LocalUserAppDataPath the system automatic locate the correct place on the harddisk. On my PC it is:C:\Documents and Settings\UserLogin\Local Settings\Application Data
and then CompanyName\ ProductName\ ProductVersion
The variable sFile is of the type string. Later in the program I add the filename and I open that file with an xmlreader.
I know some (strange) persons who change the doc & set folder. So the program must also work for them
|
|
|
|
|
You can use Environment.GetFolderPath[^] to return the path to the Application Data folder. From there, you can create your own company and application subfolders and use that path as the root for your data. This is the same method Application.LocalUserAppDataPath uses as a base path to build the userdata\Company\Application\Version path that it returns to you.
Keep in mind that there are TWO app data paths. The one you're using returns the data path for non-roaming profile users. The Application.UserAppDataPath method returns the app data path for romaing profile users. Environment.GetFolderPath will also return those same paths, depending on which SpecialFolder enumeration value you use.
|
|
|
|
|
Thanks all.
I'll give this a try.
Jan
|
|
|
|
|
you could use:
my.Computer.FileSystem.GetDirectoryInfo(system.Windows.Forms.Application.LocalUserAppDataPath).Parent.FullName
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Good Morning!
I have a program developed in C, but the main application was made in Visual Basic. Is there any way of accessing C functions from Visual Basic?
My best regards.
|
|
|
|
|
ajorge2008 wrote: Is there any way of accessing C functions from Visual Basic?
Visual Basic or Visual Basic .NET ?
You need to export your C functions to a DLL. Use P-Invoke to access that in your .NET application.
|
|
|
|
|
Hello guys,
in my search for a solution integrating an ActiveX Object I received a code snippet for a class to convert the IPicture format first:
Private NotInheritable Class myClass
Inherits System.Windows.Forms.AxHost
Public Shared Shadows Function GetPictureFromIPicture(ByVal picture As Object) As Image
Return AxHost.GetPictureFromIPicture(picture)
End Function
End Class and I should use it like
Dim pic As Bitmap = MyClass.GetPictureFromIPicture(GflAxObj.GetPicture) The first trap I run into is that obviously VB requires "a private type to be within another type" (hope it's translated good enough from my german version that you understand what I mean). I have no idea what's meant and can't find any hints in the help files and internet...
Trying to make the class public VB tells me it would require a "sub...new" with reference to mybase.new and it's parameters. But this fails because I don't even know which parameters I might have to use.
One more: The last line in the code snippet "Dim pic as ..." refers to the ActiveXObject as "GflAxObj", but I can't see where it is defined. I'm afraid this would be one of the next traps.
Could someone please give me some guidance through this?
Thank you very much
Michael
|
|
|
|
|
First of all i'm sorry if there is already an answer to this question but I looked for approximately an hour and couldn't find one so i'm asking it.
I'm trying to create conditional logic which includes a "and or" statement but apparently it doesn't work. I was wondering if there is a way to do this or at least emulate it. The code is something like this If textbox1.text = Nothing And Checkbox1.Checked = True And Or Checkbox2.Checked = False Then... Thanks for any responses in advance.
modified 8-Sep-21 21:01pm.
|
|
|
|
|
Saying "and/or", if I understand it right, means "if any of them is true"; which means just the Or operator. I might be wrong, the Or in English language means either one of two is true but not both while the Or in Logic means either one of two is true but if both are true, it's ok.
English Or (known in programming as XOr )
flase or false => false
flase or true => true
true or false => true
true or true => false
Logical Or
false or false => false
false or true => true
true or false => true
true or true => true
Eslam Afifi
|
|
|
|
|
You cant try it .
if (textbox1.text = Nothing And Checkbox1.Checked = True And Checkbox2.Checked = False) or (textbox1.text = Nothing And Checkbox1.Checked = True or Checkbox2.Checked = False)
Regard
Anubhava Dimri
Anubhava Dimri
|
|
|
|
|
Brian Wernick wrote: The code is something like this If textbox1.text = Nothing And Checkbox1.Checked = True And Or Checkbox2.Checked = False Then...
Not sure what you want the And OR to do. You could use something like:
If (String.IsNullOrEmpty(TextBox1.Text) AndAlso CheckBox1.Checked = True ORELSE CheckBox2.Checked = False) Then
ANDALSO and ORELSE allows the code to shortcircuit if the evals fail. Instead of checking if the textbox1.text = nothing, use string.IsNullOrEmpty which will check for both a null reference or empty string value.
If in doubt how your checks will evaluate to, put a break point on the line to pause execution. You can then break out the checks on at a time into the watch or immediate window to ensure your getting the results your expecting.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Hi,
I'm new to programming and thought that VB was an easy bus to hop on....
Currently I'm working through Visual Basic 2008 Step by Step.
And indeed, taking it step by step, I'll get there.
But for now I stand still.
I want to enable a button only when an user scrolled all the way down in a textbox.
I wanted to use the VScrollProperties of the scrollbar in the TextBox.
There are upper and lower limits wich gets or sets the range of the scrollbar, but I don't see how to use them as an Event Handler.
Carol
|
|
|
|