|
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 ?
|
|
|
|
|
The second line calls the dispose method and frees resources. The last one, does not.
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 )
|
|
|
|
|
|
For example, a Bitmap is an unmanaged resource, and calling Dispose on the bitmap, frees it. Otherwise, it will exist until the framework cleans it 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 am very sorry for asking one thing again and again.
Can i continue with the dataset example?
like
dim ds as new dataset
ds.dispose
now which resources of dataset are getting freed?
|
|
|
|
|
Hi christian ,
i have got the answer.
Thank You.
|
|
|
|
|
Hi there,
i have a long operation in the form that continues for 12-15 minutes.
Currently the progressbar is in the same form.
Now my question is
1.Can i show the progress bar in seperate form that show the progress of the operation.(i know the starting and ending point)
2.Does SHOW/SHOWDIALOG has anything to do with this(showing the operation in one form and the progress bar in another form)?
|
|
|
|
|
Nilish wrote: Can i show the progress bar in seperate form that show the progress of the operation.(i know the starting and ending point)
Yes, just reference the form that contains progress bar. For example:
Instead of: ProgressBar1.Value = 50
Use: ValueForm.ProgressBar1.Value = 50
Nilish wrote: 2.Does SHOW/SHOWDIALOG has anything to do with this(showing the operation in one form and the progress bar in another form)?
No, nothing at all.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
But , i am facing the problem.
Problem is , i want to open the form(which contains the progess bar) at the button click.
Now the code which is under that button , first that code gets executed , then it completely open the form that contains the progress bar.
Curently i am using the show method.
I want to see both the form where the operation is occuring and the form where there is progressbar on the former form button click.
If i use the showdialog method , then the code which is written after
the show dialog method will not execute until i close the progress bar form.
|
|
|
|
|
The best method is to move your long running code to a seperate thread and have it report a value for progress. Check out the BackgroundWorker component for examples.
Now, in your existing code, after you Show the form, you have to call Application.DoEvents() so your UI thread has a chance to process the paint messages that will show the form. On top of that, you're also going to have to call DoEvents() after every time you update the progress bar so it can also repaint itself.
|
|
|
|
|
I have my connection string in my app config, however the app config is never generated that I can see...I have checked in my
C:\Documents and Settings\[user name]\Application Data
C:\Documents and Settings\[user name]\Local Settings\Application Data
etc without finding it...This is a setting that will changed depending on the location of the install, but for some reason it is not being generated...the only setting in the app config is this connection string.
Any Ideas?
Thanks in advance
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
The app.config file ends up being called filename.exe.config and is placed in the bin\Release or bin\Debug folder when you build the app.
|
|
|
|
|
For some reason or another when I add some other setting to the config...it shows up at one of the following locations:
C:\Documents and Settings\[user name]\Application Data
C:\Documents and Settings\[user name]\Local Settings\Application Data
however, the connection string setting still is not in the config file, only the other setting is.
I know when I used VS 2003 with .Net 1.1 the config was always in the bin, but this seems to be the case with VS 2005 and .Net 2.0...am I missing something? Is there a setting to specify where the config will be stored that could have somehow been changed?
As a norm, it is stored at the following location:
C:\Documents and Settings\Jose\Application Data\JPI\ZipsCommon.dll_Url_mqtlwffalwh0kpo1fmc3rersrkmtxfev\1.0.0.0\user.config
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Wait a minute. At BUILD time, the config file is stored in the bin\Release or bin\Debug folder.
Are you talking about at deploymnet time with ClickOnce?
There is no option to tell the build process where to put the file at build time.
|
|
|
|
|
The file is usually stored in one of the following locations at deployment:
C:\Documents and Settings\[user name]\Application Data
C:\Documents and Settings\[user name]\Local Settings\Application Data
The problem is that the Connection String does not show up in the config file, only other settings will show up. I wasnt sure if this is because it is scoped at "Application" instead of "User" maybe?
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|