|
Dear i need to make a utility which unzip the zip files please help me...
Feroze
|
|
|
|
|
Hi Feroze,
there is an implementation in java.util.zip.
xingla
|
|
|
|
|
Hi Friends,
Please give me the answer of my question :
My question is :
What is the difference between Leave and LostFocus events of textbox in vb.net? When I move the focus of textbox1 to textbox2 then the error will occur. Please see following code. Run it and give me the positive reply. It's urgent....
Program Code 1 of Lostfocus Event. But It gives error and not properly run :-
Public Class Form1
Private Sub TextBox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.LostFocus
If TextBox1.Text = "" Then
MsgBox("enter valid values in textbox1")
End If
End Sub
Private Sub TextBox2_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.LostFocus
If TextBox2.Text = "" Then
MsgBox("enter valid values in textbox2")
End If
End Sub
End Class
Program Code 2 of Leave Event. And it is properly run :-
Public Class Form1
Private Sub TextBox1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Leave
If TextBox1.Text = "" Then
MsgBox("enter valid values in textbox1")
End If
End Sub
Private Sub TextBox2_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.Leave
If TextBox2.Text = "" Then
MsgBox("enter valid values in textbox2")
End If
End Sub
End Class
Give me the difference between these two event after studying it.
Please Help Me......
I am waiting for your answer!!!!!!!!!!!!
Thanks,
Bye.
Khushvadan Trivedi
Khushvadan Trivedi
|
|
|
|
|
Major Difference is in the order of occurance
Mouse and Keyboard Event fires Leave and LostFocus Event differently
Mouse first has lostfocus and then Leave
Whereas Keyboard fires Leave event first and then LostFocus
Primarily LostFocus is Mouse Event
Point To Note : Microsoft has recommended not to use LostFocus Event and you may not find LostFocus event in future versions
so please dont get with lostfocus anywhere in your code
Navneet Hegde
Program2Develop and Develop2Program
|
|
|
|
|
Hi.. i'm Deden
I want a question how to tuning TV tuner from msVidctl.dll
My program not running in XP SP2. i don't how about. please give me infomation
this sample my tv tuner program :
Dim objTuneRequest As IChannelTuneRequest
Dim mobjTSContainer As New SystemTuningSpaces
Dim objAnalogTuneSpace As New AnalogTVTuningSpace
Set objTuneRequest = mobjTSContainer("MyTV").CreateTuneRequest
If Not mblnRunned Then
VidControl.View objTuneRequest
On Error GoTo failed
objAnalogTuneSpace.UniqueName = "Antenna"
objAnalogTuneSpace.FriendlyName = "Local Analog Antenna"
objAnalogTuneSpace.CountryCode = 62
objAnalogTuneSpace.InputType = TunerInputAntenna
objAnalogTuneSpace.NetworkType = "{B820D87E-E0E3-478f-8A38-4E13F7B3DF42}"
VidControl.Run
mblnRunned = True
End If
objAnalogTuneSpace.FrequencyMapping = "687250000"
objTuneRequest.Channel =50
VidControl.View objTuneRequest
lbCh.Caption = "Channel : " & i
Exit Sub
VidControl.Build
failed:
Resume
Best regard
Deden
|
|
|
|
|
I want to add a resource in the resource file during runtime.
Hw can i do that in VS2005
|
|
|
|
|
Hi.
I have my printing method working well, but i need some advice as to how i can get the last page number so i can draw (drawstring) something only on last page.
for example. i have total pages of 3. i want to be able to make sure that when page 3 is drawing that i could also add another drawstring only for that page.
i hope i've been able to relay what i need to accomplish.
Many Thanks
Robbo
|
|
|
|
|
vbbeg wrote: I havent had a reply and thought i'd repost here to perhaps remind you..
He is under no obligation to help you. No one is.
vbbeg wrote: i respect and appreciate that you would be very busy assisting many others like myself.
Then why try and contact him like this. To me, this type of post is an attempt at inducing guilt in order to get a response.
vbbeg wrote: you asked me to post my code to assist with margins issues between print preview and hard copy.
Then why don't you post it as a reply to the post he made asking you to do this.
|
|
|
|
|
vbbeg wrote: I have already posted it as a reply to the post he made and had no reply as of yet.
And that allows you to spam the forums? Learn some patience.
The people who answer questions here do so becuase they want to help. They don't want to be guilt-tripped into helping (and this thread is a classic example) they just want to help. If the situation is urgent then I suggest that you take out a support incident with Microsoft. I'm sure they'll help you with your problem for a small fee. But if you post here then, or on any other free forum, then the individual's free time is usually the primay dictating factor to whether you get help or not.
|
|
|
|
|
Hi,
previously i worked on VB. i know onerror, onerror goto label, and onerror Resume next statements.
now i want to learn VB.net.
i am little bit confused( ) with this Try-catch blocks mechanism.
TRy
code
----
----
----
catch exceptionmanager.Publish(ex)-----? means we are displaying error message to USER? is it user defined message or system generated message?
Finally..........> in finally block what we have to write?
please can anyone tell me this mechanism. which site is good to refer this concept??
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Rahithi wrote: means we are displaying error message to USER?
If you like, but rarely. It usually means you anticipated a specific type of error. Your syntax is wrong. Catch can catch Exception, but it should really catch specific exceptions such as
catch(FileNotFoundException ex) -- this is C# syntax, it probably gets twisted a little for VB
So, you'd catch this if you knew there was a chance it would be thrown, and you know how to deal with it, for example, by showing a message, or creating a config file that is missing.
Rahithi wrote: n finally block what we have to write?
Any code that you want executed if an exception is thrown or not, such as code to close a database connection or clean up resources.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Try this:
Try<br />
'Code...etc<br />
Catch ex as exception<br />
messagebox.show(ex.message)<br />
end try
you can change it to try finally statment or whatever.
Posted by The ANZAC
|
|
|
|
|
TRY
in this block you write ur code and also the messages you would like to be displayed to the users.
when some exception is fired then it goes to the catch block.
Catch
in this you write what has to be done when particular exception is fired.
for example while saving if exception is fired then you can rollback the transaction.
Finally
and in this block what ever you will write will be executed no matter what happens.
Mohinder Singh
|
|
|
|
|
This is the format I use
Try
'Code that can cause problems
Catch ex As System.Exception
'ex.Message - Give you the error message
'ex.StackTrace - Gives you more details on the error, like what line number caused it.
' These are great for trouble shooting your app at design time
Finally
'Cleanup code that runs no matter what happens, even if App shuts down
End Try
My Question to add to this subjet would be : How do you Identify a particular Exception? (ex: File Not Found)
In the old "On Error..." statment it reported an error message and error number, the number could then be used in a IF or SELECT CASE statment. In the new TRY...CATCH the only way I have found was to check for the message witch can be a very long string.
Hope this helps you.....and me!!!!
Rob
|
|
|
|
|
Thanks Christian Graus, The ANZAC , vengaqua, and roo426. now I got to know what is this Try-catch techonolgy. I googled for this but they are explaining using some samples those are really very standard (i should say very hard for a newbie). I am new to this technology; I was confused when I saw their code.
I am learning a lot using this codeproject site.
Thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I'm having a hell of a time trying to figure out how to connect to an MS Access database on a server on the local LAN. I'm using OLE and I can get it to connect if A) The database is on the local machine, or B) The database is in a shared folder on the remote machine and the folder is mapped to the system running the program. I would very much like to not have to have the folder mapped. Having to share the folder isn't too big of a problem.
Can anyone help me? I've been googling and asking around for 2-3 days now. I would very much like to be able to stick with OLE since switching would possibly mean re-writing all my database related code on 4-5 forms.
|
|
|
|
|
Your only other option is to use the UNC path to the file in your connection string. Essentially the same path that the drive latter is mapped to.
\\server\share\folder\folder\database.mdb
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
The server name is a1531sbits
The folder the database is in is in a folder named Databases in C:\
The folder has a share name of Databases$ with Permissions set to give everyone full access (This will change later and only certain users will have that ability)
The database name is users
I've tried the following as the file path in the connection string:
\\a1531sbits\Databases$\users.mdb
I've also tried
\\a1531sbits\Databases\users.mdb
Neither work. What am I doing wrong?
|
|
|
|
|
There are two sets of permissions. The Share permissions and the NTFS folder permissions. If you need people to use an Access database, both of these sets of permissions must allow Read, Write, FileCreate, Erase. Basically, full rights. You cannot have just Read permissions for some user who use the app because an Access database won't work at all without full rights to the folder the database is in.
Are your Windows machines setup in a Workgroup or Domain config? Basically, you to understand Windows networking. That's not something that can be taught in a forum environment.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Yeah, I understand networking, wouldn't have my Net+ if I didn't. The computers I'm testing on here at home are set up in a workgroup, but the systems the program and database are going to be running in when I'm done are going to be in a domain.
|
|
|
|
|
I went and changed the security settings on the folder and tried again, but it didn't work. I got this error message (after removing my Try..Catch statements)
"An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.windows.forms.dll
Additional information: No error information available: DB_SEC_E_AUTH_FAILED(0x80040E4D)."
|
|
|
|
|
Did you password protect your Access database or enable workgroup security in it?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I did a while ago, but I wasn't able to get connection strings to work with it so I removed them.
|
|
|
|
|
fatali8 wrote: so I removed them.
Something got missed because that's where the security failure is comming from.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
No, I got them all. I figured out what happened. For some reason my connection to the server got messed up somehow.. I could Remote Desktop to it, but I couldn't map any shared drives/folders and I couldn't access any of my previously mapped drives. I've had it happen before, and I'm pretty sure it has something to do with the fact that when I turn off my PC I Hibernate it, mainly because I have work open and don't want to wait for them to all open up again. As well as that, I missed a part in my connection string that had username and password information from when I was trying to connect to a DB with a DB password. That kind of mistake makes you want to say "idiot" doesn't it? lol.
Anyway, now after a restart I got it to work. Thanks for all the help. I got more help from you than I did in all of the other 4-5 forums I've asked in combined. From now on I'll just come here when I need to ask a question. Again, thanks.
|
|
|
|