|
Try calling the 'I need to find a Matlab forum instead of asking about it in a totally unrelated place' method.
afshing wrote: hich can open a file as a notepad type that file not as text file type but could be open as like a notepad file
This shows you have absolutely no idea what the hell you're talking about. Tell your teacher that you're lost, lonely and confused. They can either put you back into a more basic class, or recommend a change of course for you.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
And this has precisely what to do with VB.NET and the .NET Framework??
|
|
|
|
|
I was wondering if anyone out there in the world would have a script to accomplish the above. That being associate anything that is opened up with a .tiff or .tif extension is opened in the Microsoft Office Document Imaging application.
Thank you in advance for ANY and all help.
|
|
|
|
|
Hi,
I have a C DLL that I wrote using VS6 and a Visio Add-In DLL I wrote using VB6. I tested the C DLL by creating a VB6 test app and no problems but when using the same code in my VB6 Visio Add-In, the params to the C DLL gets garbage.
When debugging the VS6 C DLL I see the utfdata is correct and the fileID is correct but the datalength is always garbage value. When debugging the VB6 Visio Add-IN DLL I see the correct Utf8Size is being passed.
VS6 C DLL Function:
__declspec(dllexport) int __stdcall WriteUTF8Data(void *utfdata, int datalength, int fileID)
VB6 DLL
Public Declare Function WriteUTF8Data Lib "myutf" (UniLine As Any, ByVal utflen As Integer, ByVal FileID As Integer) As Integer
Public Function WriteUTF8Line(ByVal str As String, ByVal filenum As Integer) As Integer
Dim bytUtf8() As Byte
Dim Utf8Size As Integer
Dim current
' Get active directory
current = CurDir()
' To work, must set app path as active directory.
ChDir (App.Path)
bytUtf8 = StrConv(str, vbUnicode)
Utf8Size = UBound(bytUtf8) + 1
WriteUTF8Line = WriteUTF8Data(bytUtf8(0), Utf8Size, filenum)
' set back to active directory
ChDir (current)
End Function
Any help you can provide would be very appreciated.
Thanks!
<div class="ForumMod">modified on Tuesday, February 17, 2009 4:34 PM</div>
|
|
|
|
|
Found it
Changed VB6 Add-IN DLL Declare to:
Public Declare Function WriteUTF8Data Lib "myutf" (UniLine As Any, ByVal utflen As Long, ByVal FileID As Long) As Integer
|
|
|
|
|
I have an XML doc that contains some file info (path, date created, etc.) and some media files in a folder with the same properties. Trying to devise some sort of way to compare the two lists and return a list of files that are not already described in the XML doc has been quite a challenge.
First I get the files and their properties from the watched folder:
Dim mediaFiles = From file In fileinfo _
Where file.Extension = ".avi" Or file.Extension = ".mov" _
Or file.Extension = ".mkv" _
Or file.Extension = ".mp4" _
Or file.Extension = ".asf" _
Select file
Then the nodes from the XML doc that describe those files:
Dim showsInXML = From s In doc...<tvshow> _
Select s
After that I compare the two lists, to get the ones that are the same:
Dim mediaOnFileSystemAndInXML = From mf In mediaFiles, sh In showsInXML _
Where mf.FullName = sh.<path>.Value _
Select mf
So far, so good. But after that when I want to 'invert' my selection (get only the files that are on disc, but not described in XML) with the following:
Dim mediaOnFileSystemAndNotInXML = mediaFiles.Except(mediaOnFileSystemAndInXML)
...I get the same ones as in the mediaFiles . As far as I can tell, I'm telling Except to compare the same objects, so what gives?
|
|
|
|
|
hi,
I am working in vb.net 2005
i want to check is current time is lie between two times "t1" and "t2"
i want to check only time values not a complete date or with date.
for example
Current time= "06:21:18 PM"
t1="08:30:15 PM"
t2 ="02:10:05 AM"
WAITING FOR REPLY
|
|
|
|
|
Hi,
create DateTime instances of each of your strings (using DateTime.Parse or better yet TryParse),
then compare them with whatever comparison operator you choose (<, <=, >, ...)
FYI1: when year/month/day are absent their current values are used; that normally does not
interfere with delta calculations or comparisons. If you want to get rid of Y/M/D get
the TimeOfDay property (which returns a TimeSpan).
FYI2: TimeSpan could do this too (without any year/month/day) if you were to use 24-hour notation instead of AM/PM notation; AFAIK TimeSpan.Parse does not understand AM/PM.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
The MP3 player I'm working on needs to detect the volume level at certain points of an MP3 file. I'd like to do this programmatically by looking at the file itself, as opposed to going through the sound card while the song is playing. I want to set it up to start the next song when the volume drops to a certain level. Cross-fading is too arbitrary and clunky.
Can you point me in the direction I need to go to find this information? Thanks in advance.
"Go to, I’ll no more on’t; it hath made me mad." - Hamlet
|
|
|
|
|
You're going to need a library to process the MP3's to do this. I suggest Googling for something like ".net MP3 normalize" to see what the possibilities are. I don't know of any processing libraries myself, since I don't do any work with MP3's.
|
|
|
|
|
Can I insert a link as Linklabel in MsgBox. I want to click in MsgBox to open a site
|
|
|
|
|
No, you can't. You'd have to create your own version of a Message Box to do something like this.
|
|
|
|
|
Thanks then I use form with Linklabel. I check with this code whether .NET Framework version 2.0 is exist.If not exist I want to show MsgBox with link indicate Microsoft site, but I use form with link
Dim key1 As String
key1 = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey(".NETFramework").OpenSubKey("Policy").OpenSubKey("v2.0").GetValue("50727").ToString()
Dim v20 As Boolean
v20 = False
v20 = (key1 = "50727-50727")
If v20 = False Then
MsgBox("Нямате инсталиран .Net Framework 2.0 на вашия компютър" + Environment.NewLine + "може да го изтеглите от")
End If
|
|
|
|
|
FYI:
Dim key1 As String = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\.NETFramework\Policy\v2.0").GetValue("50727").ToString()
|
|
|
|
|
|
ivo75 wrote: Dim key1 As String
key1 = Registry.LocalMachine.OpenSubKey("SOFTWARE").OpenSubKey("Microsoft").OpenSubKey(".NETFramework").OpenSubKey("Policy").OpenSubKey("v2.0").GetValue("50727").ToString()
Dim v20 As Boolean
v20 = False
v20 = (key1 = "50727-50727")
If v20 = False Then
Why are you even checking this since the code won't even run without the .NET Framework installed?
|
|
|
|
|
I want user know what application not work
|
|
|
|
|
You don't need to do this check at all! If the .NET Framework is not installed, you're app won't even launch and your code will never get to notify the used of anything.
|
|
|
|
|
I don't think about this, thank You, maybe I check when intall application but I don't know how to make this. Are in InstallShield have something?
|
|
|
|
|
You make the .NET Framework 2.0 a prerequisite to your applications installer. In Visual Studio (not the Express Editions!), if you add a Setup project to your solution, this is done automatically. For other installer projects, you'd have to find out what needs to be done according to the documentation for the installer editor package you use.
You might want to start with this this search[^].
|
|
|
|
|
Thank You I will try to use this
|
|
|
|
|
Is it possible to create something similar like a tabcontrol, but without the page selectors at top... Instead, i want nodes to select each page.
The controls must also be dragable from the designer, and into each page, just like with the normal tabcontrol...
I was told i had to use the Activator, and set each nodes tag to its appropriate panel.
However, there are some problems:
1. I cant do anything if i make a usercontrol, and put it in another form, as i cannot touch the controls within the usercontrol.
2. I cant click on a node in the designer (As you can just click on a tabpage, and it changes to that page)
3. The nodes disappear when i close the designer, and open it again. (How do i save/persist the nodes?)
Mockup:
http://img17.imageshack.us/img17/7831/clipboard01md8.png
Now, im not asking anyone to code this for me, i simply need some directions on how to do it, how to get started
Any ideas?
|
|
|
|
|
vigylant wrote: Is it possible to create something similar like a tabcontrol, but without the page selectors at top...
Wouldn't that just be a stack of Panel controls?
vigylant wrote: Instead, i want nodes to select each page.
And a "node" would be?? I don't remember seeing a "Node" control that I can click on.
vigylant wrote: 1. I cant do anything if i make a usercontrol, and put it in another form, as i cannot touch the controls within the usercontrol.
The child controls of a UserControl are not exposed to the designer unless you provide code that exposes this functionality.
vigylant wrote: 2. I cant click on a node in the designer (As you can just click on a tabpage, and it changes to that page)
Again, I have no idea what you mean by "node".
vigylant wrote: 3. The nodes disappear when i close the designer, and open it again. (How do i save/persist the nodes?)
When you drop a control, like a Button, on a form, code is written by the designer to instantiate that control and set it's properties and wire up events, like Caption, Color, Size, Location, Click event handler, ... in the form's formName.Designer.vb file. You expose this functionality from your UserControl by attributing the proper Properties of your UserControl with the DesignerSerializationVisibility[^] attribute.
|
|
|
|
|
By nodes, i mean the nodes of a treeview... This is the only (i think) control that uses nodes :P
Your idea of a simple stack (just lots of panels) sounds doable... Could be messy though ^^
|
|
|
|
|
You could have just said "TreeView" and it would have made perfect sense.
I didn't look at the link you posted because ImageShack is blocked around here.
|
|
|
|