|
hi.........
i want response very quickly if any one knows the ans for this query respond quickly....
i have two menus one is file menu and another is data menu
in file------>sub menu is load....there i used openfiledialog to select a particular file from the disk
and in data------->sub menu is run....there i used combo box in that i want the selected file which i already selected in load ..
is it possible .......using vb.net
thanks & regards.
-- modified at 1:52 Thursday 17th May, 2007
|
|
|
|
|
Please
1 - use meaningful headers. Hi..... doesn't cut it
2 - don't ask twice. Respond to one of the answers in your first post if you want to clarify or ask more
Now that you've described it, you just need to store the the filenames that have been selected before. It's a type of MRU, as far as I can see. Of course it is possible. Just decide where you want to store old file paths ( config file, registry, etc )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I was running an exe .
Now my question is , Can i programatically check whether the exe has been executed completely.
Does the framework class
System.Diagnosis.process has anything to do with the remedy of this problem?
|
|
|
|
|
well,you could enclose it in a try ..... catch and get the message of the exception and find out,if there is no exception message,then the file would have been executed 'completely'
|
|
|
|
|
is there ant alternative way out ?
once the program enters into the catch block.it takes time to complete the execution.thus increases the access time.
|
|
|
|
|
if you use a generic exception such as "Exception" it will take a lot of time,to reduce that time you have to choose a more specific exception.The more generic your exception,the more longer the processing time.So its a compromise between Accuracy and Speed.
|
|
|
|
|
i actually do not know how to check whether the particular exe has been executed completely.
|
|
|
|
|
What do you mean by "execute completely"?? Are you asking if the child process terminates? Are you looking for an exit code? A file waiting to be written?? What?
|
|
|
|
|
Is there a way to determine when i'm in runmode in vb6. I don't want to subclass a window when it is in design mode.
|
|
|
|
|
There's a way to determine when the program is running in the VB IDE context.
Are you asking for this?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
yes (i think). I have a usercontrol and in there i subclassed one of the constituent controls, but I only want this subclassing if i'm running and not while it is sited on a container in the design mode.
|
|
|
|
|
lee23 wrote: I have a usercontrol
Do you mean an ActiveX control?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
It's been a very long time since I've used VB6. But, I can't seem to recall if there was a property to tell if you're running in design mode or not. I don't think there is, but I could be wrong.
|
|
|
|
|
' code from Brad Buchanan
Public IsIDE As Boolean
Private Sub Form_Load()
IsIDE = False
'This line is only executed if
'running in the IDE and then
'returns True
Debug.Assert CheckIDE
'Use the IsIDE flag anywhere
If IsIDE Then
MsgBox ("Running under IDE")
Else
MsgBox ("Running as EXE")
End If
End Sub
Private Function CheckIDE() As Boolean
'This function will never be executed in an EXE
IsIDE = True 'set global flag
'Set CheckIDE or the Debug.Assert will Break
CheckIDE = True
End Function
|
|
|
|
|
I've tried this already and it doesn't do what i want. I want to know when my activex control is in run mode or design mode b/c i only want to do the subclassing when it is in run mode.
|
|
|
|
|
Sorry, I misunderstood.
Public gbDesignTime As Boolean<br />
<br />
Private Sub SetMode<br />
On Error Resume Next<br />
gbDesignTime = Not (Ambient.UserMode)<br />
If (Err.Number <> 0) Then gbDesignTime = False<br />
<br />
On Error GoTo 0<br />
Debug.Print "Design time = " & gbDesignTime<br />
End Sub
|
|
|
|
|
hi.......
how to link two menus items using vb.net
thanks & regards.
|
|
|
|
|
Link them to what ? In what way ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
let the first menu item be item1 and the second be item2,then,write this in the click event sub of the first item
item2.performClick()
This way item1 is linked to item2,ie,if you click on item1 it will perform the click event code of item . Is this what you wanted to know?or is it something else?
|
|
|
|
|
Ya might want to find out what he means by "link 2 menu items" before you go throwing around example code. Like Christian asked the OP already, what does "link" mean?? I can think of half a dozen different meanings, seperate from what you posted.
He might now be thinking this is the answer to his question, when in fact he meant something completely different. Now, he could be wondering why it doesn't work the way he thought it should!
|
|
|
|
|
class class1
protected overrides sub Finalize()
mybase.Finalize
End Sub
end class
If Garbase collector cannot determine automatically the object which is no longer being used -- then what is the advantage of using the finalize function in each class -- which is defined above.
i meant the finalize function gets called automatically when i close the startup form.
currently i am manually releasing the memory of a paticular object at form closing .
-- modified at 1:05 Wednesday 16th May, 2007
|
|
|
|
|
The framework WILL call finalize, you just can't tell when. The best approach is to impliment IDisposable and to clean up your resources in Finalise, only if Dispose was not called.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
provide an expmple.
Thank You Christian.
|
|
|
|
|
Impliment IDisposable and you'll have a Dispose method. Call it to clean up.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i have got the article for idisposable
at
http://www.codeproject.com/useritems/idisposable.asp[^]
i will study it and one more thing
1.that means Garbage collector get called automatically when the startup page closes. rather, the particular form automatically invokes the garbage collector everytime, whenever the object is no longer used.
Is that true?
-- modified at 2:17 Wednesday 16th May, 2007
|
|
|
|