|
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
|
|
|
|
|
Hi guys, i'm new in VB9 and i don't know how i can add API into my code! Where is APIs??????
Thanks
|
|
|
|
|
DigiMyth wrote: i don't know how i can add API into my code!
I presume you are referring to the Windows API. Search Google[^] and you will find plenty of information.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Basically im searching for "API Viewer" program like VB6.
One more question, is the VB.NET the same as VB9, or its different lang???
|
|
|
|
|
DigiMyth wrote: Basically im searching for "API Viewer" program like VB6.
P/Invoke.net[^] is a good source of information.
DigiMyth wrote: is the VB.NET the same as VB9, or its different lang???
VB9 is the latest version of VB.NET. This article[^] provides further explanation.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi.stil me again..ya..so funny...i can store login time..but can't update logout time..can help..?thanks
Dim Emp_IDDataRow As DataRow<br />
Dim Encryption As String<br />
Dim i As Integer<br />
Comdataset = Com.getCOMDataset<br />
Encryption = ""<br />
Emp_IDDataRow = Comdataset.EMPLOYEE_DETAIL.FindByEmp_ID(txtID.Text)<br />
<br />
If Emp_IDDataRow IsNot Nothing Then<br />
For i = 1 To Len(txtPass.Text)<br />
Encryption = Encryption & Chr(Asc(Mid(txtPass.Text, i, 1)) + 3)<br />
Next<br />
If txtPass.Text = Emp_IDDataRow!Password.ToString Then<br />
LoginTime = Format(Date.Now, "HH:mm:ss")<br />
strID = txtID.Text<br />
LoginDate = Format(Date.Today, "dd/MM/yyyy")<br />
Me.LOGIN_OUTTableAdapter.InsertLogin(LoginTime, strID, LoginDate)<br />
MessageBox.Show("Login Successful!", "infor", MessageBoxButtons.OK, MessageBoxIcon.Information)<br />
frmMenu.Show()<br />
<br />
If Encryption = Emp_IDDataRow!password.ToString And txtID.Text.ToUpper.StartsWith("TM") Then<br />
MessageBox.Show("Welcome, " & Emp_IDDataRow!name.ToString, "Welcome", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)<br />
frmMenu.Show()<br />
ElseIf Encryption = Emp_IDDataRow!password.ToString And txtID.Text.ToUpper.StartsWith("LM") Then<br />
MessageBox.Show("Welcome, " & Emp_IDDataRow!name.ToString, "Welcome", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)<br />
frmPurchase.Show()<br />
txtID.Focus()<br />
txtPass.Focus()<br />
txtID.SelectAll()<br />
txtPass.SelectAll()<br />
End If<br />
Else<br />
MessageBox.Show("Invalid Password", "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)<br />
txtID.Focus()<br />
txtPass.Focus()<br />
txtID.SelectAll()<br />
txtPass.SelectAll()<br />
End If<br />
Else<br />
MessageBox.Show("Invalid ID!", "ERROR", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)<br />
txtID.Focus()<br />
txtPass.Focus()<br />
txtID.SelectAll()<br />
txtPass.SelectAll()<br />
End If<br />
<br />
End Sub
INSERT INTO LOGIN_OUT
(Time_login, Emp_ID, Logindate)
VALUES (?, ?, ?)
i set time login emp id and logindate as primary key
UPDATE LOGIN_OUT
SET Time_logout = ?
WHERE ('Time_login' = ?) AND ('Emp_ID' = ?) AND ('Logindate' = ?)
it add same column in Time_login but not in time_logout
|
|
|
|
|
This is nasty code.
Just do the same as you did for login, to store the logout. Surely it's going to work the same ?
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 )
|
|
|
|
|
no choice..this the code i only can think...mean the update i change to insert..?because when i login then go form 2...once i close form 2..automatically insert to time_out .in form 2 code that i wrote is
frmLogin.LOGIN_OUTTableAdapter.UpdateLogin(Format(Date.Now, "HH:mm:ss"), frmLogin.LoginTime, frmLogin.strID, frmLogin.LoginDate)
should i do the same thing with insert..?
|
|
|
|
|
I mean, you've written the code to store a date into the DB, so why not write the same sort of code here ? I know from watching the questions you ask that you've not understood my answers or done what I suggested, so I have no idea how you got the other one working, but it means you know how to insert a date, right ? I mean, if someone gave you code that works, you took the time to understand it, right ?
It doesn't matter if you're being paid for this code, or if you're a student ( except that if you're being paid, that is plain disgusting ), you should be taking the answers you get, and coming to an understanding of how they work, so you can become competent in your own right, instead of spending your life on these forums asking the same basic questions over and over.
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 )
|
|
|
|
|
no..no..i know i'm asking nasty question..i stil student...code i wrote myself...not copying from others...sometimes easy things i go think hard way to do...okok..i do the same thing as do my login
|
|
|
|
|
OK - a lot of people ask these sort of questions for their work. If you're a student, then that's cool. You just plainly are not yet at a commerical level and a lot of people seem to get jobs anyhow
By all means, if you try to use the method you're using to insert the date on the login end, and you have a specific problem, feel free to post it here, but you should look at that code first, you should be able to reuse the date insert portion to insert a date again.
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 )
|
|
|
|
|
ok thanks..very glad that you reply me all the nasty question..thanks..
|
|
|
|
|
but one problem i do the logout in formclosing...how do i do the query?
Private Sub frmMenu_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
frmLogin.LOGIN_OUTTableAdapter.UpdateLogin(Format(Date.Now, "HH:mm:ss"), frmLogin.LoginTime, frmLogin.strID, frmLogin.LoginDate)
End Sub
why when i close the form it store in login time..but not logout column...
UPDATE LOGIN_OUT
SET Time_logout = ?
WHERE ('Time_login' = ?) AND ('Emp_ID' = ?) AND ('Logindate' = ?)
modified on Saturday, April 12, 2008 8:56 AM
|
|
|
|
|
Well, for starters, are you sure the logindate and time of login you're passing in are correct ? I'd be inclined to suggest you can simplify this to where Emp_ID = ? and time_logout is null, or something to use the most recent login date. Also, the column names should not be in quotes.
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 )
|
|
|
|
|
thanks can work d...UPDATE LOGIN_OUT
SET Time_logout = ?
WHERE ([Time_login] = ?) AND ([Emp_ID]= ?) AND ([Logindate] = ?)
i do with this
|
|
|
|
|
Glad to help. For the record, your questions are not nasty. We have a lot of people asking these sort of questions when they are working, and THAT is nasty. Perhaps try saying in future that you're a student in your posts, I think you are getting stuck in the fallout from a negative feeling towards people who have taken jobs they are not ready for. If you're a student, any question is valid, and that's what we're here 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 )
|
|
|
|