|
Can you post this in English, so that more people can get the problem and try suggesting a solution?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
hi all
i have two froms, frmnew and the other one is frmupdate.
frmnew is set the very first form to open when the application run.
both forms contains a menu bars having two buttons on them.
one button for exit the application and the other button allows the other form to open(.show).
the code is something like
Me.Close()<br />
Me.Dispose()<br />
Application.DoEvents()<br />
frmupdatemodified.Show()
the last line frmupdatemodified.Show() shows the error cannot-access-a-disposed-object.
what is going wrong please tell to solve the problem.
thanks in advance
help everyone
|
|
|
|
|
frmupdatemodified has already been closed and disposed. When you dispose of it, set it to nothing, and then you can check if you need to reinitialise it.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
hi christian thanks for reply
i check it out, i am not disposing the frmupdate, and if i miss something can u tell me how can i figure it out.
i tried this also but it doesn't work
Me.Close()<br />
Me.Dispose()<br />
Application.DoEvents()<br />
frmupdatemodified.Dispose()<br />
frmupdatemodified = Nothing<br />
frmupdatemodified.Show()
can you tell me how it can be done
thanks
help everyone
NO ONE LIVES FOREVER
|
|
|
|
|
eyes2007 wrote: i check it out, i am not disposing the frmupdate, and if i miss something can u tell me how can i figure it out.
i tried this also but it doesn't work
Me.Close()<br />
Me.Dispose()<br />
Application.DoEvents()<br />
frmupdatemodified.Dispose()<br />
frmupdatemodified = Nothing<br />
frmupdatemodified.Show()
You have only tried part of Christian's suggestion... you need to re-instantiate the form if you need to re-use it. At the .Show(), the object fromupdatemodified doesn't exist.
Another point - the Me in the above sample... is it the form where you created the frmupdatemodified form object? In that case, since you have already called Me.Dispose, any objects created will also cease to exist.
|
|
|
|
|
Hallow can anybody help me
In my project we are maintaining separate folder for individual users for their attachments registeration.
The problem is when admin delete the user we are deleting the folder created for that user’s attachment. It is working properly but after deleting the folder our session is automatically expired and redirected to session out page how, why and where am not able to fix the session.
I actually don’t want session to get cleared what is the problem in my code I don’t know my code is as bellow.
<br />
Dim ServerPathDel As String = ConfigurationManager.AppSettings("MapPath") & "Uploads\" & Session("@UserId") & "\ "<br />
If Directory.Exists(ServerPathDel) Then Directory.Delete(ServerPathDel, True)<br />
Thanks Shivashankar.C
The Value Has Its Value Only Its Value Is Valied
modified on Tuesday, March 25, 2008 8:05 AM
|
|
|
|
|
Hi
In my asp vb.net project on root i create one folder named menu in that menu i create two folder named ACC,
Branch ther i put respective .js file. In the root i create Master folder and stored my pages BUt the menu does not displayed properly and also if i click on menu it dont work. but the pages which are stored on root are working
very fine .
<
<title>Supplier_Mst
<% if Session("designation")="Branch" then %>
<% End if%>
<% if Session("designation")="Admin" then %>
<% End if%>
<% if Session("designation")="PMT" then %>
<% End if%>
<% if Session("designation")="Accountant" then %>
<% End if%>
>
code added in html is given below
img folder is there on root.
Pl advice me how to solve this problem.
Regards
Sonia
|
|
|
|
|
soniasan wrote: i put respective .js file
So, you meant to post this in the ASP.NET forum then ? Actually, it's probably a web dev question, not an ASP.NET one. It sure is not a VB question.
It looks to me like you're using some sort of javascript menu. As we have no idea which menu you're using, how do you expect us to help you ? Certainly, the code you're posting doesn't tell us anything.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
just a guess but you might want to try removing the
../
from the start of your src attributes..
... and I presume the < and > tags surrounding your code are just accidents...
Otherwise I have no idea.
|
|
|
|
|
hi
how can i find in the code if another form is open or not??
Regards
Nishkarsh
|
|
|
|
|
What do you mean by form ? Form defined in your app ? Another app altogether ? A specific form in another app altogether ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi...
by form i mean another form in the same application...(not MDI)
My application hase more then one form which i keep on hiding and showing...
|
|
|
|
|
Hi,
if you hide and show forms, you must have a reference to it, so look at myForm.Visible
Luc Pattyn [Forum Guidelines] [My Articles]
this months 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
|
|
|
|
|
i want a code for smart card in VB. the smart card is of campus card type like for library card, canteen card, ID card, attendence card...
So, the main problem is abt. interface bet. pc & reader.So if anybody have any idea abt. it or any code.plz provide...
cc@don
|
|
|
|
|
Do your own homework!
|
|
|
|
|
For such a sweet looking person, you have a real nasty streak in you. Do keep it up.
|
|
|
|
|
Hi,
I Have form in which I have 3 tabs.
The tabs should tougle based on the button click.
But if I press Ctrl+Tab or Ctrl+Shift+Tab, it still toggles.
How do I stop this using coding in Dot Net.
Regards,
Jantu.
Thanks and Regards,
|
|
|
|
|
in the keydown event of the tab control test for that key combination and if found. e.handled=true
|
|
|
|
|
What have you tried ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Christian Graus wrote: What have you tried ?
Apparently nothing. Another deleted post...
|
|
|
|
|
I am currently developing a VB 6.0 application. I also happen to have another VB 6.0 application already complete which I want users to be able to select at log on. How can I join these two applications without changing much of the code of the complete application? The two applications happen to share the same names for a number of objects. Please help.
|
|
|
|
|
You really can't. Why are you still using VB6 ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Dreamer2007 wrote: How can I join these two applications without changing much of the code of the complete application?
You can't without merging the code together and making necessary changes. Why VB6? It is a dead language now.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi guys
i want to perform some operation based on the types of my objects which i send as
parameter,
but i want to get the type of this object at runtime using reflection and using select case but i am unable to do that , if else work fine but i want select case , thanks
like
'it works fine'
If t.GetType Is GetType(ExpenceVoucher) Then
Insert_ExpemseClaim(exp)
End If
'the following code gives compile time error'
Select Case exp
Case exp.GetType Is GetType(ExpenceVoucher)
End Select
any help, thanks in advance
hello
|
|
|
|
|
ghumman63 wrote: but i want to get the type of this object at runtime using reflection and using select case but i am unable to do that , if else work fine but i want select case
If you're thinking of doing this, you don't need to do it. This is a situation where you'd use an overloaded method.
ghumman63 wrote: 'the following code gives compile time error'
Select Case exp
Case exp.GetType Is GetType(ExpenceVoucher)
End Select
Select Case won't do this. You have to get the types BEFORE using them in the Select Case statements.
|
|
|
|