Show file input when click button event on LotusScript? - lotus-domino

I am working with Lotus Domino. When I read the xml file I want to click on a button and it displays a form to let me select the file:
Sub Click(Source As Button)
//How to file input form display here
End Sub
There's still one more problem.I read the xml file and output data is documents:
Dim reader As New XmlNodeReader
Call reader.ReadFile(datas)
documents = reader.getNodeReaders("egov.document ")
Forall document In documents
//How to display list document for my form
End Forall
Please help me in the shortest possible time.Thanks all!!!!

To display a dialog that allows you to select a file, use the Prompt method of the NotesUIWorkspace class.
The rest of your question requires knowledge of the particular XML schema you are working with.

Related

How to link webform through vb.net code parsing data.

net and I am trying to create a project that will handle questions from a text file and save the answers to a new text file. I was searching the internet and I couldn't find an example for linking two webform through vb code so here is my problem:
I want to preprocess a text file that will be uploaded in a specific form through vb.net . That context is parsed in a string table. Now I want that table to pass over to the rest of my forms which they will handle the data in order to modify the below webform. Here is where I want to call the other forms in order.
Private Sub BtdContinue_Click(sender As Object, e As EventArgs) Handles BtdContinue.Click
If FileUpl.PostedFile IsNot Nothing Then
Dim finalTextTable(rows.Length, 4) As String
'Preprocess
'for i=0 to finalTextTable.Lenght-1
' for j=0 to 4
'Call the other web form from here in a loop if possible
End if
Here is my web form with labels and images that I want every question to change it
I also want to be able to go to the previous webform through a
previous button.
If i did understand your question correctly you are asking to redirect the data from the preprocessed text file to another form. The easiest solution i can think of is by using session variables. After you have preprocessed your text file and stored it into a dataTable you should add the following:
'Set the value of DataTable to session
Session("DataTb") = finalTextTable
'Perform your Redirect
Response.Redirect("FormB.aspx");
The above code should save the table into a session variable accessible by FormB.aspx. You can then handle the table in the second form as you wish.

MS Access 2016 report contains a hyperlink pathway. On Click event VBA to open specific hyperlink clicked

I have a report based on a search parameter form.
Is it possible to use a textbox named txtFullScanPathway included on the report as a hyperlink to open that specific pdf in an On Click Event perhaps?.
Alternatively, is there a way to have another form in datasheet based on the parameter form to open the results?
The project purpose is to allow a quick search of PDF Manifests... the user will open a report using a command button on the parameter form (This is all working now) and there may be several to go through.
The Report generated has a file pathway which has been generated by the parameter form, and that field is "FullScanPathway".
The user is trying to find a pdf based on this "manifest" and so there may be several results to look through and I was hoping to provide an "On Click" event to open the pdf that belongs to FullScanPathway...
Are there any good examples on how to accomplish this?
I have tried the Follow Hyperlink method, but do not like the security errors it throws...
Any help or ideas would be sincerely appreciated !
William
Try:
Dim wsShell As Object
Set wsShell = CreateObject("WScript.Shell")
wsShell.Run Chr(34) & Me!FullScanPathway & Chr(34)
Set wsShell = Nothing

Take a capture of form

Problem : Form is divided in two parts.
Left side for enter information's. Right side for preview those information's.
On top of form there is a button called Send.
When i click on that button it need to take a snapshot of the right side and send it to email address provided as a attachment.
Solution : Take a snapshot of right side of form and save it to Temp folder
- Send a email and attach the file from temp folder
- Delete the file ( for any case )
Is it possible to take a ss and convert it to pdf ? is that a better way ?
I found a very helpfull class on forum Class for Screen Capture
But is there any way to use method without entering position of the screen.
Example : Right side of form is at GroupBox2 .
Is there any way to take a snapshoot of the groupbox2 on form?
Is there any way to take a snapshoot of the groupbox2 on form?
and save it to Temp folder
As suggested by user3697824, use Control.DrawToBitmap() with Path.GetTempFileName:
Dim bmp As New Bitmap(GroupBox2.Width, GroupBox2.Height)
GroupBox2.DrawToBitmap(bmp, New Rectangle(New Point(0, 0), bmp.Size))
Dim FileName As String = System.IO.Path.GetTempFileName
bmp.Save(FileName) ' save it as a Bitmap
' < or >
bmp.Save(FileName, Imaging.ImageFormat.Jpeg) ' save it as a Jpeg
' *Either way, the file will have the .TMP file extension!
Debug.Print(FileName)

How to add a list of files into a combo box?

I'm currently working on an account system for a game using VB.Net. I was wondering how to make it so that a combo box displays a list of files within a specific directory. Here's what I mean:
When the user runs the application, I want them to see a combo box displaying a directory on their computer.
I've looked at all of the tutorials, but found NOTHING that worked.
NOTE: The combobox is in a dropdownlist style.
VB.NET
Dim dir = "Your Path"
For Each file As String In System.IO.Directory.GetFiles(dir)
ComboBox1.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file))
Next
C#
dynamic dir = "Your Path";
foreach (string file in System.IO.Directory.GetFiles(dir))
{
this.comboBox1.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file));
}
You can visit this post if you want more information about a similar question here
So many ways--perhaps the easiest to understand:
For Each f In My.Computer.FileSystem.GetFiles("c:\Logging\")
MyDropDownList.Items.Add(f)
Next

Visual Basic 2010 - How to append certain areas of a text document using data collected in a form

I routinely reuse code for Cisco routers / switches and some web accelerators. I usually have to open the text document, edit a few IPs, host names, license keys etc. The remaining 98% of the text document stays the same. My end goal is to develop a program in Visual Basic (or whatever anyone can recommend would accomplish this easier) that will allow me to generate a text document with their data in the right place.
I have been able to develop a GUI form, it looks exactly how I want. I have a box to enter their hostname, classification, IP address etc; now, when I press the "Generate" button at the bottom, I want a new text document on the desktop. When you open the txt, all of their data has been appended to the document in the exact places it should be and all of my original text is still there, just the specific parts have been changed.
I've got the gui, just dont know where to add my existing code and how to make the different objects change their respective parts.
Hopefully this all makes sense. Thank you in advance, I really appreciate it.
Josh
Here is a quick and dirty example of my comment, using String.Replace to replace the placeholders. See if this helps you.
Imports System.IO
Public Class Form1
Private Sub generate_Click(sender As System.Object, e As System.EventArgs) Handles generate.Click
Dim temp As String = System.IO.File.ReadAllText("C:\temp\template.txt")
temp = temp.Replace("##placeHolder1##", TextBox1.Text) _
.Replace("##placeHolder2##", TextBox2.Text) _
.Replace("##placeHolder3##", TextBox3.Text)
File.WriteAllText(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & "\custom.txt", temp)
End Sub
End Class
To answer your question about embedding the file into the application. Yes it is possible just go to Project --> Properties --> Resources click Add Resource and select Add Existing File (Just make sure that your template has a .txt file extension, you can rename it to what you want when you save the file), then when you go to your solution explorer you will see a directory called Resources with template.txt in it. right click on it and select properties then select the Build Action Property to Embedded Resource this will embed the file into the program. You will then be able to access the template like this.
Dim temp As String = My.Resources.template