|
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
|
|
|
|
|
I already told him this exact same thing a day or two ago... What's with this guy? He's repeating questions after he gets the answers.
|
|
|
|
|
Hai all
I had one problem in displaying image in the report.
The image is in image object form.
I import the fields into dataset.
all the text and numeric fields displayed correctly except image.
The image is in jpeg format.
I also set the MIME type to image/jpeg
I drag the image column from datasource expert into image control
Is there any conversion need to be done for image object
If yes, what shall i do?
Please guide me.
Thanks in advance
|
|
|
|
|
You didn't get an aswer to this because noone has a clue what your talking about. Report? What report? Are you using Crystal Reports? What's a "Datasource Expert"?
|
|
|
|
|
I was checking the difference between the dispose and nothing
like
1. dim ds as new dataset
2. ds.dispose
3. ds=nothing
can somebody please tell me what is happening in the second line and which property of dataset is being disposed ?
|
|
|
|