|
Or perhaps mousehover would work if I knew how to reset it once it fired once (without having to move the mouse outside of and then back into the DGV).
|
|
|
|
|
If I get what you're talking about doing, there isn't an event like you're talking about.
What you'd have to do is handle the DGV's CellMouseHover and probably CellMouseLeave events to interrogate the cell the mouse is over and set the ToolTip's Text property as the mouse moves.
|
|
|
|
|
OK, well that made the whole thing painfully obvious -- just set the tooltip on the cellmouseenter event. DOH!
Thanks
|
|
|
|
|
You can make updatable tooltips by making use of the following steps using Javascript.
For the first time, On mouse over event you can create a "DIV" control using "createElement" method with the respective text. Then, you can update the content of the "DIV" element innertext on mouse out event(you can hide this "DIV").
While creating the control make the "Control ID" uniform across all the cells, so that you don't need to recreate the control every time.
If it's already there you can just make the display property to 'block' or else create the control newly.
Hope this helps you.
Regards,
Vengat P
|
|
|
|
|
This won't work in a Windows Forms app, just web...
|
|
|
|
|
I'm writing a little app to save the clipboard to a file and then mail a link to it to selected recipients. For the saved file to be accessible by the recipients, I verify that the parent folder is shared.
However, if the share is on a local drive, I have to convert the full path to something like:
DriveID:\SomePath1\SharedFolderName\SomePath2\FileName.ext
and then to:
\\HostDNSname\ShareName\SomePath2\FileName.ext
where ShareName is the provider name for:
DriveID:\SomePath1\SharedFolderName
and SharedFolderName is the 'deepest' level share - i.e., it accounts for the possibility of SomePath1 including higher level shared folders.
I'm using the Win32_LogicalDisk ManagementClass and Win32_Share ManagementClass to obtain the info I need, but have not found an easy way to do the path conversion.
Before I dig into the implementation, I thought I'd check to see whether anyone has attempted this and whether they found an easy way to do this.
Comments would be appreciated...
emilG
"Dealing with failure is easy: Work hard to improve.
Success is also easy to handle: You've solved the wrong
problem. Work hard to improve." - Alan Perlis
|
|
|
|
|
What's so hard about removing the beginning of a string and replacing it with a workstation name?
|
|
|
|
|
Nothing hard, once I have the string. For instance, if I have the following shares on my machine:
D:\ with a share name of "D$"
and:
D:\MyPrivateDownloads\Tools\ABCtool\ with a share name of "ABCdownload"
plus a bunch of other shares on the same drive, with the file stored in:
D:\MyPrivateDownloads\Tools\ABCtool\Docs\UserManual\UsingABCinfo.pdf
I want to send the following link:
\\myMachineName\ABCdownload\Docs\UserManual\UsingABCinfo.pdf
and not:
\\myMachineName\D$\MyPrivateDownloads\Tools\ABCtool\Docs\UserManual\UsingABCinfo.pdf
So, although it is not rocket science to accomplish this, I was wondering if there was an easy way of accomplishing it [via some framework class maybe].
emilG
"Dealing with failure is easy: Work hard to improve.
Success is also easy to handle: You've solved the wrong
problem. Work hard to improve." - Alan Perlis
|
|
|
|
|
1. Dave is right on this. You're making this to difficult. Do something like:
replace("D:\MyPrivateDownloads\Tools\ABCtool\Docs\UserManual\UsingABCinfo.pdf","D:\MyPrivateDownloads\Tools", "\\" & environment.GetEnvironmentVariable("ComputerName"))
Keep it simple.
egottwald wrote: D:\ with a share name of "D$"
2. C$ and D$ are admin shares and shouldn't be used. If it were me, I'd disable them entirely because someone could just access all the dirs/files regardless of what you intended (with \\myMachineName\D$).
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
1. You're making it too simple. The string replace is trivial when the strings are known. In an app, they are both dynamic, and what I'm ideally looking for is something like:
<br />
strSavedFileFullPath = GetSavedFileLocation() ' <<< This is not a problem<br />
If IsLocalShare(strSavedFileFullPath) Then ' <<< This is not a problem either<br />
strLinktoSend = ConvertFullPathToClickableLink(strSavedFileFullPath)<br />
End If<br />
I know how to code ConvertFullPathToClickableLink, but is there an API I can use instead?
2. I used D$ as an example...
emilG
"Dealing with failure is easy: Work hard to improve.
Success is also easy to handle: You've solved the wrong
problem. Work hard to improve." - Alan Perlis
|
|
|
|
|
egottwald wrote: but is there an API I can use instead
Not in the .NET Framework, no.
Typically, I wouldn't be sharing stuff from individual users machines. They'd be forced to post stuff on a central temp drive, that I wipe out every night, and link to that.
In your situation, there are too many unknowns, so force one to be a known. In your example, it sounds like your code can either create a subfolder under a known share, or can create a share for a known folder. This is, to say the least, an administrative nightmare.
|
|
|
|
|
I have two projects and both reference Microsoft Comm Control 6.0 (same GUID is being referenced in both). Both projects have CopyLocal = True and Isolated = false, but generate different sized AxInterop and Interop files? What would cause this when both projects are referencing the same .dll?
Project one generates:
AxInterop.MSCommLib.dll 11,776
Interop.MSCommLib.dll 15,360
Project two generates:
AxInterop.MSCommLib.dll 12,288
Interop.MSCommLib.dll 15,872
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
Which version of VB.NET are you using??
|
|
|
|
|
2005 Pro SP1.
Just to clarify a couple things for my own knowledge,
1. In theory, if you are creating interop projects on the same computer to the same .dll, they interop files should be the same right?
2. If #1 is true, you should be able to deploy the same 2 files for both projects (IE: a .net exe project is calling a .net .dll project, and both are using the interop'd vb6 comm control).
Thanks for any help.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
modified on Tuesday, October 21, 2008 11:10 AM
|
|
|
|
|
OK, since 2005 includes a Serial I/O class, why are you using the old MSCOMM control anyway??
I don't know why they're comming up with different interop's. In my, admittedly very limited, testing, I couldn't replicate the problem.
|
|
|
|
|
Dave Kreskowiak wrote: OK, since 2005 includes a Serial I/O class, why are you using the old MSCOMM control anyway??
Management decision above my head. We have a considerable amount of custom code that controls many diff. types of machinery. Due to the size of the projects we are converting, the comm stuff must wait until everything is initially released.
Sigh..
I'll keep looking into the interop differences and post my results later.
Thanks for checking Dave.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
hi there , im quite new to vb , im using 2008 express .
i want to simply read this xml document and put just all the "artist" into a listbox. therefore just want to loop thought the xml and list the <artist>
i have worked out how to get just the first artist by this code but i want to have a list of them all .
<pre>Dim xmlfile = XDocument.Load("C:\ls\data\viddec.xml")
Dim imbd_code = xmlfile...<item>
msgbox(imbd_code.<artist>.Value)</pre>
heres an example xml...
<?xml version="1.0" encoding="utf-8"?>
<items Page="1" PageSize="100" PageCount="1" TotalRecordCount="9">
<item>
<artist> test1 </artist>
<album> album1 test </album>
</item>
<item>
<artist> test2 </artist>
<album> album2 test </album>
</item>
any help would be great ,i have looked on the net and followed some guides but i have yet found what i want.
cheers
luke
|
|
|
|
|
try the following
Dim oDOm as new xmldocument
odom.load("c:\ls\data\fiddec.xml")
dim oxmlelem as xmlelement
dim l as new list(of string)
for each oxmlelem in odom.selectnodes("//item")
dim oxmlartist as xmlelement = oxmlelem.selectsinglenode("artist")
if oxmlartist isnot nothing then l.add(oxmlartist.innertext)
next
This is from memory so ...
Also note that the xmltags are case sensitive
Hope this helps
|
|
|
|
|
You might want to have a look at some of the code here - http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1759860&SiteID=1
|
|
|
|
|
|
If you are using wpf, then getting the artists into the listbox is as simple as:
lstArtists.ItemsSource = imbd_code.<artist></artist>
If you are using Windows Forms, you will probably need to iterate over the collection and add them manually
For Each aElem In imbd_code.<artist>
'transform aElem into some object to be displayed
lstArtists.Items.Add(transformedObject)
Next</artist>
|
|
|
|
|
just say thanks everyone whos helped i kinda worked out after watching a few of the videos . cheers again . luke
|
|
|
|
|
Hello,
perhaps somebody can help me to find the reason for the crashes I have.
I have a MFC Application with MFC extension DLLs.
One of the dialogs is a window with a CPropertySheet.
One CPropertyPage is a host for ActiveX Controls providing extending UI.
This CPropertyPage has a CWnd member to host the ActiveX Controls dynamically created runtime using the CWnd::CreateControl method.
I have a VB ActiveX Control providing needed extending UI.
It can be loaded and used without problems.
The only problem occurs, when the application exits:
1. The CPropertySheet is destroyed ... the CPropertyPage is destroyed, ...
... which releases its previously queried interfaces,
... sends a WM_DESTROY to the CWnd hosting the ActiveX Control and
... deletes/frees the CWnd
2. Somewhere at the end just before invoking "exit" open "OLE" connections/loaded "OLE" libraries are terminated by Microsoft internal code. I saw that the ActiveX OCX module was active until this moment.
3. In the "exit" invocation the MFC application crashes from within the VB ActiveX Control. The VB ActiveX Control does not execute its UserControl_Terminate handler, so it seems, that there happens an irregular deletion of the VB ActiveX Control.
This crash happens currently only in the debug version of our application. But adding CommonControls to the VB ActiveX Control UI causes a crash even in the release version of this MFC application.
Using a MFC ActiveX Control providing some UI, too, no problems occur.
The only difference seen while releasing the last reference to the previously queried interface are that ...
... the release on the interface of VB ActiveX Control returns 4 still valid references,
... while the release on the interface of the MFC ActiveX Control returns only 3 still valid references.
Thus I suspect, that at application end there is still a last reference valid, not released, which causes a crash after the OCX is unloaded from Microsoft internal code cleaning up before the real application exit.
Something in the VB ActiveX Control wants still to work (like executing UserControl_Terminate), but the OCX is already unloaded.
But ... where and how can I find this last reference?
Debugging through the MFC code hosting the ActiveX Control didn't help really?
Has somebody here experienced a similar problem? Or can somebody help?
Thanks in advance,
Martin
|
|
|
|
|
This question should be asked in the Visual C++/MFC forum. They probably have more experience in hosting VB ActiveX controls than we can give you on how it interacts with the host.
|
|
|
|
|
Hello again,
first - I'm sorry, because I didn't provide any information about the development environment:
Microsoft Visual Studio 6.0 SP6
Microsoft Visual Basic 6.0 SP6
And ... no ... I can not upgrade - currently!
Second - I created a new most simple MFC application only loading the VB ActiveX control and raising an exception on exiting.
It has a CWnd* member on which CreateControl is called and which is deleted while deleting the dialog object.
So it shows the same behavior than the big MFC application I normally work on.
Has someone a hit or suggestion?
Best regards,
Martin
|
|
|
|