|
You need a printdialog and a printdocument. When printdialog's dialogresult=okay use printdocument.print to call the printdocument.printpage-event. There you have to use graphics.drawstring-method to print your string.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Thank you for your help. But I have a follow up question, when I double click on the printdocument I dragged and dropped into the program it creates a subroutine. However, when I run the program and click the print button of the printdialog it doesn't trigger the event. What is the event that the print button triggers?
thanks again,
Mike
|
|
|
|
|
printdialog1.document = printdocument1<br />
if printdialog1.showdialog = dialogresult.ok then printdocument1.printpage
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Thank you again for your help. But I still don't know what event this code goes into because the printdocument1.printpage event isn't triggered and printdialogs don't appear to allow events.
thanks,
Mike
|
|
|
|
|
You put a button somewhere on your form that is usually labeled "print". Put the code in this button's click-event.
This is very basic stuff, you really should get a book, if you don't know how to do that.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Hi!
We are about to add help-functionality to our software. We are interesting in a Assistant like in Office Word. We want to interact between assistand and mainapplication. Like "Press here to open print-dialog" etc.
Anyone know about software we can use for this or anyone can give me an approach of how to code this?
Ofcourse I prefer a 3rd party solution.
Anyone can help?
|
|
|
|
|
Do you want it to be two separate applications, or all-in-one?
There are many ways to do this. You could (especially if you use two applications) write a value in a file and let the other program respond.
If you don't want to use two seperate applications you could use two forms, one with a "clippy" (the word assistant) background and transparency set.
Good luck!
|
|
|
|
|
It should be in the same application. But how to interact with the mainapplication from the assistant. As I said a link like "Press here to open printerdialog". And it should open the printdialog.
//henrik
|
|
|
|
|
i am using visual basic .net2005
please can you tell me how to get all of the file names i selected and pressed enter to play them with my application
i tried command$ and commandlineargs
but this give you just on file name
because every file sent to an instance of your application
i tried startupnextinstance
i got just on filename with every instance
but this is very slow way to get all file names
you have to wait all files to be sent
this mean 100 files=100 instance and long time
and above, this give aproblem with application
a messsege is shown(the application has aproblem and has to close)
i want away to get all of the files i selected and pressed enter to play with my application
thgether and in just one time
i think i have to use windows api
but i dont know how
and thank you...
|
|
|
|
|
|
Hi! I'm using a web service which is called through a stored proc from a windows service. Until few days back everything was working fine but suddenly I'm getting the following error.
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidCastException: Conversion from string "29/04/2008 13:45:57" to type 'Date' is not valid. at Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(Stri
Further I'm able to run the webservice through code. My regional settings has dd/MM/yyyy settings for date i.e British. And I've also checked culture for my thread that is also british. I dont know what else is needed to get it working. Please guide me in getting a solution.
Thanks in advance.
Don't Quit
|
|
|
|
|
Try forcing the date/string format to dd/MMM/yyyy. This tends to remove any ambiguity in the conversion process.
You only need 1 machine/application in the system that does not look after the culture correctly to these problems. Text month usually solves this issue
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I am in the process of trying to find out what is the best practise for generating reports from an sql database useing different tables, that would be usefull to user on the Software access the DB, how do you do it? I come from a web design background and are now having to design a reporting engine for an ancient VB 6 application i have been lumped with....
I am used to having to build each report manually in html line for line and writting the formatting out in code, using sql querys for getting the data I need. but this is hard crap work and I would like to know if I am the only one doing it this way or do you have another way of doing it using some kind of report builder like crystal reports.
Its just there must be a better and faster way to get usefull reports from a db without the hard work building every line in the report from different querys and functions that jump all over the place in your application and db.
your insiteful comments will be greatly appreciated...
|
|
|
|
|
Try to avoid Crystal Reports/BO, you will see many unanswered queries here for that horrible thing. We use Reporting Services and are very happy with it, but there are a number of solutions out there. All will require a fair learning curve but at least most are stable (unlike CR).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi All,
I am using a Component One Flex Grid.
I have data populated in it, with one fixed row in the begining.
That grid basically shows the present godown stock of the plant (dgMatStockDn).
My Requirement:
When I right click on the first fixed column of the grid, it should give me a menu having menus "Insert", "Delete", "Copy", "Paste".
Suppose if my any of the previous stocks are same. I would like to copy the whole line again.
I will right click on the grid. Click "Insert". A new row will be inserted.
I will right click on that particular row. Select "Copy".
Then I will right click on the new row, select "Paste" and the same row should get copied here also.
Tell me the logic and also on which event of the datagrid should I right this.
I hope the requirement is clear.
Thanks and Regards,
|
|
|
|
|
Dot Net Jantu wrote: Issue related to C1.Win.FlexGrid (Please answer only if u have worked on C1.FlexGrid)
This is not the place to ask about third party components. The vendor has their own forums for this sort of thing. You can find them at http://forums.componentone.com/CS/forums/[^]
|
|
|
|
|
Thank you very much.
Thanks and Regards,
|
|
|
|
|
Hi.
How can I link DBase III files in SQL Server? (Linked Server)
|
|
|
|
|
Try the SQL forum, you'll probably get a better response there. They may requires a SQL version to help. I was under the impression you could use the jet driver to get at DBase file, oh sh;t dbase III - good luck.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
How to kill Remoting client or Server Object Object ofter use Please Help Me.
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Hello,
Is it possible to get as parameter a string and accordingly to call to the function that have the same name, without using cases but with some casting or something similar?
For example
'fName value passed to the function is for example "MyFunctionToBeCalled"
private sub LoadData(fName as string)
call "casting"(fName)
end sub
private function MyFunctionToBeCalled()
'DoSomething
end function
Thank you
Shay Noy
|
|
|
|
|
You can do this with reflection, but is seems nasty to me.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thank you, I will check this.
Actually, I have in database a list of users that I am sending to them an email (everyone get a different email) according to multiple criterias. Each criterias return information and this information is returned by different functions that are in my code.
So, I have a table in my database that define for each user which functions to pull out information and then this is the reason that I need to call a function according to the string I get from the database.
This is the best way I found to accomplish this task.
Any supposition?
Thank you
Shay Noy
|
|
|
|
|
I think you need an enum that defines the different possible criteria, and one method that takes this enum and returns the data asked for
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
The problem is that the criteria are created dynamically. I have an interface that build criterias and for each criteria link to all the users that will get an email according to it. This interface is the trigger to fill my database.
If i will use enum, I will have to update my code every new criteria instead of adding new record(s) to my database.
The method you are suggesting to write, if I understood right, will include a select case of the enum items and each case will call to the according function.Why do not do this directly from the database, getting the method name (as string), use reflection (as you said) and then call to the function?
Thank you for your replies.
Shay Noy
|
|
|
|