Hi folks,
Don't know how to get info about the second dialog which appears after
clicking a button of the first dialog.
following situation:
Dim saveMode As Boolean
Dim saveFileDialog1 As New SaveFileDialog()
' if I clicking the ok button, set value true, pdfreport will be created
If (saveFileDialog1.ShowDialog() = DialogResult.OK) Then
saveMode = True
Else
saveMode = False
End If
for the first time running this it works fine. The next time I start and
click the ok button a new dialog appears with a message "File already
exists, Override Yes/No". After clicking yes the programm runs on at the
else mode, so the saveMode var is set to false.
How can I ask for return values of the second dialog? Any idea?
Joerg
--
Email: Jo****************@IndustrieHansa.de ex***********************@volkswagen.de 16 9079
Hi Joerg,
I did look very long, but I only see one showdialog.
Is there something missing in your message or am I seeing something not (not
impossible)?.
Cor Dim saveMode As Boolean Dim saveFileDialog1 As New SaveFileDialog()
' if I clicking the ok button, set value true, pdfreport will be created
If (saveFileDialog1.ShowDialog() = DialogResult.OK) Then saveMode = True Else saveMode = False End If
Hello Cor,
the second dialog I mean appears automatically by system (dialog - "File
already exists ... Override Yes/no")
Joerg
"Cor" <no*@non.com> schrieb im Newsbeitrag
news:O$**************@TK2MSFTNGP09.phx.gbl... Hi Joerg,
I did look very long, but I only see one showdialog.
Is there something missing in your message or am I seeing something not
(not impossible)?.
Cor
Dim saveMode As Boolean Dim saveFileDialog1 As New SaveFileDialog()
' if I clicking the ok button, set value true, pdfreport will be created
If (saveFileDialog1.ShowDialog() = DialogResult.OK) Then saveMode = True Else saveMode = False End If
Hi Joerg,
Do you if you restart the program the same effect when you select an already
existing file?
I did never test this, but I am thinking about something that the pdf file
is not yet closed, so it cannot be overwritten.
Cor
* "Joerg Trumpfheller" <ex***********************@volkswagen.de> scripsit: Don't know how to get info about the second dialog which appears after clicking a button of the first dialog.
following situation:
Dim saveMode As Boolean Dim saveFileDialog1 As New SaveFileDialog()
' if I clicking the ok button, set value true, pdfreport will be created
How do you create the PDF report?
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
<http://www.plig.net/nnq/nquote.html>
Hi,
I have referenced a PdfCreatorLibrary (PdfCreatorLib.dll - Version
1.0.1284.20348 - Copyright(c) Serdar Dirican) and this creates the report
Joerg
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb im Newsbeitrag
news:bp*************@ID-208219.news.uni-berlin.de... * "Joerg Trumpfheller" <ex***********************@volkswagen.de> scripsit: Don't know how to get info about the second dialog which appears after clicking a button of the first dialog.
following situation:
Dim saveMode As Boolean Dim saveFileDialog1 As New SaveFileDialog()
' if I clicking the ok button, set value true, pdfreport will be created
How do you create the PDF report?
-- Herfried K. Wagner MVP · VB Classic, VB.NET <http://www.mvps.org/dotnet>
<http://www.plig.net/nnq/nquote.html>
I think I will do it that way:
Before opening the saveasdialog I ask
if System.IO.File.Exists(file to create).
If is so system.io.file.delete(..)
This works, but not the normal way I think.
Joerg
* "Joerg Trumpfheller" <ex***********************@volkswagen.de> scripsit: I have referenced a PdfCreatorLibrary (PdfCreatorLib.dll - Version 1.0.1284.20348 - Copyright(c) Serdar Dirican) and this creates the report
Maybe the messagebox is shown by this library?
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
<http://www.plig.net/nnq/nquote.html>
Hi Joerg,
When you know what file to delete, you also know what file to write, than
you don't need the filesave dialog at all I think, something strange..
Cor Before opening the saveasdialog I ask if System.IO.File.Exists(file to create). If is so system.io.file.delete(..) This works, but not the normal way I think.
hi cor,
customers sometimes have to decide, if they use subfolders for save.
Therefore the savefiledialog.
Joerg
"Cor" <no*@non.com> schrieb im Newsbeitrag
news:uq***************@TK2MSFTNGP10.phx.gbl... Hi Joerg, When you know what file to delete, you also know what file to write, than you don't need the filesave dialog at all I think, something strange..
Hi Joerg,
Customers are always king, but when you first delete the file and then give
them the change to save another one.
Or did I misunderstood you?
Cor
Hy Cor,
anyway I don't know how to manage my first described problem. I think it
also wil happen to a standard savefiledialog, if the file you want to save
already exists. In excel this is an error with a errornumber and I can react
for this. With this example I don't know what to do. Some more ideas?
Joerg
"Cor" <no*@non.com> schrieb im Newsbeitrag
news:e2**************@TK2MSFTNGP11.phx.gbl... Hi Joerg,
Customers are always king, but when you first delete the file and then
give them the change to save another one.
Or did I misunderstood you?
Cor
"Joerg Trumpfheller" <jr************@compuserve.de> wrote... anyway I don't know how to manage my first described problem.
I think something else is up... the dialog code you posted works fine. Did
you happen to trace the code, the results of the test work as far as I can
see.
Tom
Hi Joerg,
Did you check what Herfried was writting, I found it a good idea.
Cor
Thanks Joerg,
Till now I did never use a module, but I am glad you did show it to us.
(A reason more to avoid it)
Thanks,
Cor
Hy people,
I was looking for some more msgs describing the same problem. It is
described in detail under the subject savefiledialog. In the MSDN -
Konowledge base is an article under http://support.microsoft.com/default...b;en-us;327213
So all answers I get did ot solve the problem. Clicking Ok and the file
exists returns a dialogresult.cancel no matter if you they yes or no for
overwrite.
Thanks for help
--
Best wishes
Joerg
"Joerg Trumpfheller" <ex***********************@volkswagen.de> schrieb im
Newsbeitrag news:bp*********@doiweb4.volkswagen.de... Hi folks,
Don't know how to get info about the second dialog which appears after clicking a button of the first dialog.
following situation:
Dim saveMode As Boolean Dim saveFileDialog1 As New SaveFileDialog()
' if I clicking the ok button, set value true, pdfreport will be created
If (saveFileDialog1.ShowDialog() = DialogResult.OK) Then saveMode = True Else saveMode = False End If
for the first time running this it works fine. The next time I start and click the ok button a new dialog appears with a message "File already exists, Override Yes/No". After clicking yes the programm runs on at the else mode, so the saveMode var is set to false.
How can I ask for return values of the second dialog? Any idea?
Joerg -- Email: Jo****************@IndustrieHansa.de ex***********************@volkswagen.de
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Richard L Rosenheim |
last post by:
I would like to detect when a form is invoked as the result of a ShowDialog
call.
Anyone have any ideas or suggestions on how to do that?
TIA,
Richard Rosenheim
|
by: carmen |
last post by:
I need to pass a parameter to a class while calling Showdialog method, is
this possible?
Thanks,
Carmen
|
by: dbuchanan |
last post by:
Hello,
My application has a series of forms that open using ShowDialog() on
top of their parent as the user drills down to enter increasingly more
detail regarding data. I want to hide the...
|
by: **Developer** |
last post by:
I have a little more info about this problem I can't seem to solve!
I know it'll take a minute to study the lising but if you like to sove
puzzles there is one there.
I have a Form (FV&C)...
|
by: osmarjunior |
last post by:
I have a sequence of commands like this:
Form1 frm = new Form1();
frm.LoadData();
Boolean confirm = (frm.ShowDialog() == DialogResult.OK);
The LoadData method loads information from...
|
by: NickP |
last post by:
Hi there,
I was wondering if there was any way to stop the hiding of a dialog from
returning from the ShowDialog function?
i.e. If you create your own dialog and put some code in that hides it...
|
by: Freddy Coal |
last post by:
Hi, I make a a program with two Form, I call Form2 as showdialog()
I Would like receive data when Form2 is closed, how make that?. How return
data when the form is closing or closed?.
Thanks...
|
by: shark |
last post by:
Hi,
Does Form.ShowDialog() start new thread ?
If yes how is solved cross-thread operations?
Thx
|
by: Joe Duchtel |
last post by:
Hello -
I have the following code to detemine a file name when my application
is saving a file. The problem is that if the file already exists and
I select the Yes button in the "Do you want to...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |