|
Thank you Mr. Kreskowiak for your guide.
Alex.
|
|
|
|
|
HI...
How to save and restore values in multi textbox,Datetime picker,combo box when the form close using vb.net !?
I found the source code for saving values of single textbox in external file generated by the form.
Unfortunately because I’m newbie in vb.net I couldn’t make it work with multi textboxes??
----------------------------------------------------
the code for single textbox:
Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
If IO.File.Exists(Application.StartupPath & "\save") = True Then Kill(Application.StartupPath & "\save")
Dim Read As String = textbox1.Text
FileOpen(1, Application.StartupPath & "\save", OpenMode.Binary)
FilePut(1, Read, -1)
FileClose()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IO.File.Exists(Application.StartupPath & "\save") Then Exit Sub
Dim Read As String = Space(FileLen(Application.StartupPath & "\save"))
FileOpen(1, Application.StartupPath & "\save", OpenMode.Binary)
FileGet(1, Read, -1)
FileClose()
textbox1.Text= Read
End Sub
---------------------------------------------------------------
My Q.How to save the values if we have many textbox or many datetime picker when the form close??
Regards...
|
|
|
|
|
I used application settings to store things like the path to where my reports are stored. My development file structure is different from my production file structure.
Here is a snippet of code for loading a string ...
Me.tbox_rptPath.Text = My.Settings.rptPath.ToString
You will find these settings by clicking on your "My Project" in your solution explorer, then click on the tab called, "Settings". Define whatever property you desire to store the selected values in the combo boxes, etc.
My property is called, "rptPath" in the above example.
|
|
|
|
|
Thanks for Reply...
I was looking for simple way coding for saving values !!
|
|
|
|
|
I need to develop a process to import a Lotus 123 spreadsheet into SQL Server. Has anybody out there ever used .NET to work with Lotus 123 files? I haven't been able to find a way to access the files through a datasource. Does anybody know how to start?
Thanks
|
|
|
|
|
|
Thank JZ, but will that work for Lotus 1-2-3 spreadsheets or is that only for the Lotus Note email database?
|
|
|
|
|
Oooh, I'm not sure. I think I've only done the database with it.
|
|
|
|
|
According to Microsoft's KB[^] article, there should be a Lotus 1-2-3 ODBC driver available via a 3rd party (such as directly from IBM or whoever owns Lotus).
|
|
|
|
|
Having no experience with Lotus at all myself, I found a few apps on the web that can convert a Lotus 123 spreadsheet to xml.
Perhaps you could look into first doing a conversion to xml, from which you can then easily import into any database.
I personally have done the same with excel files.
for what it is worth...
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
Thanks to everybody who answered my question. After doing some research, and not coming up with much, I decided to convert the Lotus 1-2-3 file to an excel spreadsheet as a first step. It's a manual process now, but I'm pretty sure I can automate it. I opted for excel because then I can use a reference to Microsoft Excel 9.0 Object Library and easily work with workbooks, worksheets, ranges, etc. It makes the rest of my work easier. Maybe not the optimal solution, but it seemed more practical than engineering to work with Lotus given the time schedule.
Thanks!
|
|
|
|
|
I'm Parsing ATOM Feeds using File.ReadAllText and RegEx isolate item nodes. Some Atom feeds work just fine, others return "no content" (even though I've verified through a reader that "item" content exists).
It appears that the feed is blocking the content ...I'm having a synaptic mis-fire isolating the problem. I can't locate any documentation on this issue.
Someone point me in the right direction?
...T
|
|
|
|
|
i use VisualBasic 6 Enterprise and want to configure the visual source safe
i have installed all the latest service pack releases untill service pack 6
but i keep on getting this error
Corrupt 'um.dat' file
Please help me...i need to share some source files with my manager
Thanks
|
|
|
|
|
Hi,
To resolve this problem, build a new Um.dat file. Note that when you build a new Um.dat file, you must add all of the users again.
1. To build a new Um.dat file, follow these steps: 1. Create a temporary folder named C:\Sstemp.
2. Click Start, click Run, type cmd, and then click OK.
3. Go to the VSS\Win32 folder in the command prompt window, and then type the following command:
mkss c:\sstemp
4. In the VSS\Win32 folder at the command prompt, type the following command:
ddconv c:\sstemp
5. In the VSS\Win32 folder at the command prompt, type the following command:
ddupd c:\sstemp
6. Copy the Um.dat file from the C:\SStemp\Data folder to the Visual SourceSafe data directory.
7. Rename the Rights.dat file in the Visual SourceSafe data directory as Rights2.dat.
8. At a command prompt, run the analyze -f command against the database.
9. Add all of the Visual SourceSafe users again.
10. Reassign rights to the Visual SourceSafe users.
This should fix the issue : ).
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
|
Can anyone tell me how to get CLSID of my application and product id of my deployment project?
|
|
|
|
|
Hi,
You can get the CLSID of your program using VB.Net in the following manner:
BEGIN CODE
' Use Server 'localhost'. It can be a remote host!
Dim theServer As String = "localhost"
' Use programID 'HKEY_CLASSES_ROOT\DirectoryControl.DirectoryList.1'.
Dim myProgID As String = "DirectoryControl.DirectoryList.1"
' Make a call to the method to get the Type information of
' the given ProgID.
Dim myType1 As Type = Type.GetTypeFromProgID(myProgID, theServer, True)
Console.WriteLine(("GUID for ProgramID " + myProgID + " is: " + myType1.GUID.ToString()))
END CODE
However, if you are using VB 6.0 then you may use the following code snippet:
BEGIN CODE
In a VB6.0 project I had the following codes to get CLSID string from a ProgID:
' define some API functions and a structure data type for GUID
Function CLSIDFromProgID(ByRef szProgID As String) As String
' First, an API Win32CLSIDFromProgID Call
Win32CLSIDFromProgID(StrPtr(szProgID), udtCLSID)
' then, convert CLSID structure type to a long pointer to CLSID
' finally use API CopyMemory to get CLSID string
End Function
Hope this helps .
END CODE
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Thanks for your help John Adams...
|
|
|
|
|
Hi All,
I am using Vb.net 3.5
suppose I am using "nsoftware.IPWorksSSL.dll", Which is Store in application Directory.
In my code I am writing such as..
at MdiForm.Designer.vb
Me.Xmpp1 = New nsoftware.IPWorksSSL.Xmpps(Me.components)
When The dll file is missing from the application Directory it give me a error message
"The 'nsoftware.IPWorksSSL.dll' file is not defined"
So, How can I Check in my code that the dll file is exist or not.
Please, Help me..
Good By
|
|
|
|
|
Try System.IO.File.Exists at the application's entry point before any use of the dll.
Eslam Afifi
|
|
|
|
|
But Where can I write the Code.
because,It is Unable to build the application.
I am using a control of that dll and if the dll is missing it give me error at the design time
|
|
|
|
|
So the problem is not about checking the dll at the start of the application. Make sure you referenced the file and it is at it's location. Try re-referencing it again. Maybe if you provide more details i'll be able to help. Try browsing the assembly in the Object Browser and see if it works.
Eslam Afifi
|
|
|
|
|
No actually not,
I am creating my application and debug with that dll and it is worked find.
but when I am using .exe file, at that time if that dll is missing then a message will display.
"The Application has encountered a problem and needs to close. We are sorry for the inconvenience "
|
|
|
|
|
Where is your .exe file? Does the dll exist in the same directory? If it doesn't, go to the Solution Explorer -> References and set the Copy Local property of the reference to true. See if this work?
Eslam Afifi
|
|
|
|
|
use following code given below :
if system.io.fileExists(application.startuppath & "\" & "your dll file name") then
print a msg that it exists
else
print a msg that dll file not found.
Hope this will be useful for you.
|
|
|
|