|
Ok let's look at the code you gave
Private WithEvents mLV As AxMSComctlLib.AxListView
Public WithEvents imlLVSortIcons As AxMSComctlLib.AxImageList
mLV.ColumnHeaderIcons = frmMain.DefInstance.imlLVSortIcons
1) the new is required for mLV so put that back in.
2) You aren't using imlLVsortIcons is that your intention?
3) which form are you in because you mention a form frmmain?
4) is definstance of frmmain created?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Hi nlarson, Many thanks for the replies,
Here is my actual code,
Private WithEvents mLV As AxMSComctlLib.AxListView
Public Sub Constructor(ByRef LV As AxMSComctlLib.AxListView, Optional ByRef LVWrapper As cListViewWrapper = Nothing)
mLV = LV
......
mLV.ColumnHeaderIcons = frmMain.DefInstance.imlLVSortIcons
......
......
End Sub
1) i can put back the New for mLV
2) Yes, im not using imlVVSortIcons in this form, i want to use mLV
3) frmMain is the main form which contains the imlLVSortIcons image list. And the above code is in different form.
4) Yes, I have created the definstance in frmMain.
Thanks,
AR Reddy
|
|
|
|
|
is typeof(columnheadericons) = imllvsorticons?
if your getting somekind of object not set then you'll need to check each one
If lv is nothing then msgbox("it's lv")
If frmmain is nothing then msgbox("it's frmmain")
If frmmain.definstance is nothing then msgbox("it's frmmain.definstance")
otherwise ????????????
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
I am using Visual Basic Express 2005
I have a main form wich captures several images and saves them to a folder.
Then a secondary form is opened and the user can select in a listbox the image for viewing in a picturebox of the secondary form.
The problem is when secondary form is closed, the image file viewed in the picturebox remains locked (remember secondary form is closed and theorically picturebox is disposed) and only is unlocked when main form is closed.
I have tried explicitly disposing picturebox in when secondary form closed event, with no success.
Thank you
modified on Wednesday, August 6, 2008 9:00 AM
|
|
|
|
|
Besides disposing the picturebox, dispose the image as well
oPic.Image.Dispose
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
It works now. Thank you very much
|
|
|
|
|
i have 35600 records in the database , How should i display the records , so that the screen may not turn white(due to complete CPU usage).
|
|
|
|
|
1) as far as the display listbox1.suspendlayout / fill / listbox1.resumelayout may help you.
2) consider your design. what is the user going to do with 35600 records? is a "search" feature a better idea the overloading the user with a huge amount of records that most likely they won't need 90% of them at one time?
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Nilish wrote: How should i display the records , so that the screen may not turn white
Lower the number of records you display. Seriously, no one is going to want to scroll through 35,600 records. As in the other reply you got, implement some kind of search functionality.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Or implement some paging functionality. On the first population run
SELECT TOP 50 *
FROM tTable
ORDER BY UniqueKey ASC
on each "NextPage" command run
SELECT TOP 50 *
FROM tTable
WHERE UniqueKey > (last result set's MAX(UniqueKey))
ORDER BY UniqueKey ASC
Try not to do this as it is painful for the DB
SELECT TOP 50 *
FROM tTable
WHERE UniqueKey NOT IN (SELECT TOP [PageCount*50] *
FROM tTable
ORDER BY UniqueKey ASC
)
ORDER BY UniqueKey ASC
|
|
|
|
|
Yep. Maybe the OP will take your suggestions, which are very good
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have created a startup service project in vb.net..When i log off the computer the form comes..when i Close the form..The exe is Killing but again comes in the task manager..I cant kill the exe..Again it comes..
pla any one give solution
|
|
|
|
|
Is the project a Windows service or just a regular Windows Forms program? Are you trying to kill the process in code or by using the Task Manager?
|
|
|
|
|
Iam Usingwindows project and it is startup windows Prject.
I registered in registry key of the program and set the value to set the program to come in start up..
..Iam using code to kill the project but it is coming again in task manager..
Thro task manager also i killed ,it is coming again
|
|
|
|
|
If you added it to the registry to run, it's going to run.
|
|
|
|
|
Thank u for ur Reply..Is ther any way to kill the process..yes i have registred in startup in local machine..
|
|
|
|
|
Hi,
please i need to create conectors between two items just like the one in
the SQL Server diagram. I am using Vb.Net 2008 thanks
Mohammad Al Hoss
|
|
|
|
|
Hello Friends,
How to develop project. so that it occupy less memory.
I am using vb.net 2005.
Thanks in advance.
Adarsh
|
|
|
|
|
Write less code?
(Sorry, but its such a stupid question)
I expect what yuo are really looking for are best practices. Try google.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Thanks
But i am asking what to use and when.
for example If condition is better to use than Loop.
or
Use global object or local to procedure.
Please help me.
Thanks
Adarsh
|
|
|
|
|
Get a profiling tool that will help you understand what parts of your code consume the most resources. There are several that are available as 30 day trialware
|
|
|
|
|
Thanks for your help.
If you have any software name, please forward it to me.
Thanks
Adarsh
|
|
|
|
|
Google for ".NET Profiling tool". Pick some. I have tried some of the open source ones within the past year and was really confused (poor docs, not intuitive), so you may want to try one of the commercial products to get started.
|
|
|
|
|
Thanks for your reply.
I will look into the matter.
Adarsh
|
|
|
|
|
I want to genarate bar code for my project assigned to me. I don't have any idea about it, I have searched for the hints on google but didn't get any thing. Can anybody give any hint?
|
|
|
|