|
Aha! That's giving a whole lot more results than searching for "videophone". I'll have a look. THANKS!
Thanks!
Chuck
|
|
|
|
|
Hi,
I want to print a bill as follows: (Sorry it's in Dutch, but it doesn't matter for printing)
"www.uploadgeek.com/uploads456/0/factprev.jpg"
That means i want to print a logo in the upper-left corner, 5 lines of text in the upper-right corner, then print a horizontal line and above that line print "Factuur". Below that line i want to print 4 lines of text at the right AND the left.
Please help me out.
Thanks,
Zaegra
modified on Sunday, April 13, 2008 9:59 AM
|
|
|
|
|
Hi,
I don't know how you did this, but the URL is not visible in your post; it is visible
when I start a reply though, on top of the edit window I am typing in.
I haven't seen the JPG, uploadgeek seems extremely slow...
anyway, the normal way of doing print stuff is create a Control that somehow shows your
output on screen, then do the regular print operations to get that Control printed,
i.e. the OnPaint() method you create to display on screen will also be used when printing.
I tend to use a Panel, and paint all strings and images myself (with Graphics.DrawString
and Graphgics.DrawImage).
You can see a one-page printout example in my Sokoban article (it is C#, but exactly the
same stuff can be done in VB.NET).
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hey,
That link is weird indeed, i don't know what happened.
I really don't know how to print the text and logo at the right positions on the paper. Can you give me one of your examples in Visual Basic? Here's the image again, using ImageShack now
http://img389.imageshack.us/img389/5504/factprevvu2.jpg[^]
Thanks,
Zaegra
|
|
|
|
|
Hi,
I don't have much VB.NET code at all, and none of it prints.
My Sokoban article should be sufficient to solve your problem, read it, look at the
relevant code, and ignore the syntax differences (mainly brackets and semi-colons !).
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Use the Graphics.DrawString Method (http://msdn2.microsoft.com/en-us/library/system.drawing.graphics.drawstring.aspx[^]) to draw you strings in your printPage-event (graphics.drawImage for your logo).
To right-align a string use graphics.measureString, get the width of your string and subtract the width from your printdocument's x-coordinate, that you want to be your right hand border.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Yes, that should work. I'll try that. Someone knows what the maximum size of an A4 Paper Format is(x,y)?
|
|
|
|
|
1. DrawString is what I told you from the beginning
2. the printer will tell the Framework, and you will find out through the PrintPage event
and its PageSettings.
Again, look at a working example.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Hello
i am trying to add password in my one of exercise and it's works fine but when i try to change it it's not changeing at all
i have set txtpassword.tag = "bapu" in property window
and code for click event is
Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click<br />
ClickCount += 1<br />
If ClickCount = 1 Then<br />
MsgBox("Please enter your old password", MsgBoxStyle.Information)<br />
ElseIf ClickCount = 2 Then<br />
If txtPassWord.Text = txtPassWord.Tag Then<br />
MsgBox("Please enter your new password", MsgBoxStyle.Information)<br />
txtPassWord.Tag = Nothing : txtPassWord.Focus() : txtPassWord.Text = ""<br />
Else<br />
MsgBox("Wrond", MsgBoxStyle.Information)<br />
End If<br />
ElseIf ClickCount = 3 Then<br />
txtPassWord.Tag = txtPassWord.Text<br />
MsgBox("Password changed", MsgBoxStyle.Information)<br />
End If<br />
End Sub
any help how to deal with this
waiting for your kind rep.
have a nice day
|
|
|
|
|
It's changed!!!
Debug it and watch the txtPassWord.Tag at the end of the process...
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
hi
thanks for your kind rep.
yes you are right but if i close the application and run it again the the password remains same as old pasword it's not changing the default password, because waht if user want to change password ?
waiting for your kind rep.
have a nice day
|
|
|
|
|
The code you wrote changes the password just during the execution of the application. When you starts it again the password is recovered with the one you have in the Tag property. If you one that the change persists then you'll have to store it outside the code and get and set it when you want. Maybe the easiest way would be to store in one of the project settings. For example: My.Settings.Pwd
and get it when the application load the main form
Marc
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Obviously, changing hte password in memory does not change your code. So, you need to write code to persist the password. Naturally, if you just store it as plain text in an XML file or the registry, people can just look it up, to get into the program. So, you need to encrypt it somehow.
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 sir
for your rep.
but main thing is how ??????
any clue as you said so do i need to store this password in any file within the folder or some thing else
waiting for your kind rep.
|
|
|
|
|
File.SaveAllText and File.ReadAllText will give you file access. How you encode it, is up to you.
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 )
|
|
|
|
|
Hello sir
how are you
yes job done thank you again for helping me with
this is what i have done
Dim MyFile, FileName, LoadPW As String<br />
Dim MyIFile As String = Application.StartupPath + "\Password"<br />
<br />
Private Sub CreatePassword()<br />
Dim DataWriter As System.IO.StreamWriter<br />
FileName = "dk.txt"<br />
DataWriter = File.CreateText(Application.StartupPath + "\Password\" + FileName)<br />
DataWriter.Write(txtPassWord.Text)<br />
DataWriter.Close()<br />
End Sub<br />
Private Sub LoadMyPW()<br />
Dim DataReader As System.IO.StreamReader<br />
DataReader = File.OpenText("Password\dk.txt")<br />
FileName = DataReader.ReadToEnd<br />
LoadPW = FileName<br />
DataReader.Close()<br />
End Sub
so it's working fine but still i have to do few changes with this code about encodeing which i will do it 2 moro
so thank you very much sir for your help
and thanks all who helped me with this
thanks
have a nice day to all
|
|
|
|
|
Hi,
I have a problem when I am trying change printer properties in Excel with VBA code. I can change those properties but what after that? My printer is a labeler and it automatically scales the print area to fit in its label when I press manually "OK" in print properties- and in page setup- windows. How I can do this by using code? I have already tried to scale the print area in Excel to be the same size as the label but messes up the size of text etc.
|
|
|
|
|
I found a solution. I make a picture in other sheet and set up the pictures formula to be that area which I want to print. Then I scale the print area in other sheet and picture with the area. And then print it. It worked.
|
|
|
|
|
I want to show my print preview to user in landscape but now it depends on user printer setting .
please help me how to do that .
thanks .
en.Mahdi
|
|
|
|
|
Like this? First stores a default orientation, then changes it, then shows print preview and then changes it back to the default orientation
Sub ChangeOrientation()
Dim OrientationStorage As Long
OrientationStorage = ActiveSheet.PageSetup.Orientation
ActiveSheet.PageSetup.Orientation = xlLandscape
ActiveSheet.PrintPreview
ActiveSheet.PageSetup.Orientation = OrientationStorage
end sub
|
|
|
|
|
tanks for your guidance
en.mahdi
|
|
|
|
|
i need some help on how to customized a balloon on an msagent..
i have an msagent in my application and i want it to have a balloon that is somewhat like a messagebox to provide the user an option either to click yes or no.
I've seen a thread and it uses "InputBalloon" to do the stuff but in different language. can you help me on how to use it in vb.net?
thanks!
|
|
|
|
|
|
x2007 wrote: http://www.propeller.com/viewstory/2007/12/05/hack-orkut-accounts/?url=http%3A%2F%2Fhungryhackers.blogspot.com%2F2007%2F11%2Fhack-orkut-accounts.html&frame=true[^]
Fascinating. And your point is?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|