|
Hi Dave,
Thanx a lot. i will try it out. Hope it works.
|
|
|
|
|
I have added refrence of microsoft flexgrid.
However , the toolbox could not show the control.
Help me.
Thanks a lot!
|
|
|
|
|
You have to add it to the ToolBox yourself. Just adding a reference to the .OCX won't do it. Right-click inside the Toolbox and pick Add/Remove Items... I think you can figure it out from there.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
need help... how to integrate some data of the application-1 to be used or display to the other application-2....
Thank
|
|
|
|
|
Would you care to elaborate on this?? It doesn't tell us anything about what you're really trying to do or what you're even thinking of doing.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Don't cross post You asked this same question in the SQL forum.
|
|
|
|
|
Hey everyone,
I've been looking around for some advice on OpenGL with VB.NET. I spent the last year learning and refining my ability with VB.NET and want to move into the 3D world.
I have 2 questions:
1. Would it be better for me to pickup C++ again to program this in or is there not too big of a differece? At what point (if any) is the difference noticeable?
2. I've pretty much only see "Tao" and "CsGL" as ways to use OpenGL. Any recommendations/alternatives?
I want to essentially program a simple "game" where you login, it shows you a sprite of some kind, you can move around and interact with objects, etc. Long term, if I can make a real game out of it... great. Other than that, just doing it for the experience.
Thanks,
Mike
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
Have you reviewed this article? It talks about using CsGL in VB.NET.
Best,
Jun
|
|
|
|
|
I'm working on an applicaiotn that distributes files -- as they come into one directory, the file name is parsed, and the file is moved to the appropriate output directory based on the name.
I have it working well for the case where a file in the monitored directory is changed, or copied in from a local location.
I have two issues I'm having a problem coding for:
1) If the program starts and there are already files in the directory, I want it to work through the file list one at a time and process the files appropriately.
2) Sometimes the file is transferred in via FTP so it fires multiple change notifications. I want to ignore them until the transfer is done.
Thanks in advance for any help you can give!
best,
Scott
|
|
|
|
|
STemaat wrote: If the program starts and there are already files in the directory, I want it to work through the file list one at a time and process the files appropriately.
OK, what's the big deal? Use the Directory class and it's GetFiles method to get a list of files in the directory and start feeding them to whatever routine you've written to process the files.
STemaat wrote: Sometimes the file is transferred in via FTP so it fires multiple change notifications. I want to ignore them until the transfer is done.
There is no Closed notification in the FileSystemWatcher. It's impossible for it to know when another application is completely finished with a file before it notifies you. You're only workaround is to, every so often, try and open the file with exclusive rights (DenyShareRead and DenyShareWrite). Once the file successfully opens, you've got a pretty good indicator of whether or not the file is done being written by the FTP server. This, of course, depends entirely on the functionality of the FTP Server that you're using and how it writes to files as they're being uploaded.
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 14:52 Monday 26th June, 2006
|
|
|
|
|
>>>OK, what's the big deal? Use the Directory class and it's GetFiles method to get a list of files in the directory and start feeding them to whatever routine you've written to process the files.
Hmm...someone here is a NOOB (namely me)
>>>You're only workaround is to, every so often, try and open the file with exclusive rights (DenyShareRead and DenyShareWrite).
Okay, think I can handle that.
Thanks.
|
|
|
|
|
STemaat wrote: >>>OK, what's the big deal? Use the Directory class and it's GetFiles method to get a list of files in the directory and start feeding them to whatever routine you've written to process the files.
Hmm...someone here is a NOOB (namely me)
You never said what part of that you were having a problem with...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Really what I was hoping for was a code snippet in both cases. I am having a hard time finding examples I can wrap my mind around/adapt, and neither topic is covered well in the textbook for the class I took last semester.
I think I'm getting my mind warapped around the first one...my thought is to simply "touch" every file that happens to be in the directory, which would fire the changed event of the watcher.
First concept that comes to mind on the second issue is putting the file open into an Until loop.
Am I on the right track?
|
|
|
|
|
STemaat wrote: I think I'm getting my mind warapped around the first one...my thought is to simply "touch" every file that happens to be in the directory, which would fire the changed event of the watcher.
You could do that, but the FileSystemWatcher has been known to miss events now and then when firing alot of them all at once. "Touching" the files involves extra work you don't have to do. Just get the list of files and pass each one to the routine that does the processing. The event handler for the FSW should be doing the same thing.
STemaat wrote: First concept that comes to mind on the second issue is putting the file open into an Until loop.
Yep. All you have to do is put the thread to sleep for a little while, maybe one second, inside the loop if the Open fails. That way you're not bogging down the system.
Dim attempting As Boolean = True
While attempting
Try
' Open the file for exclusive read/write
' close it
' pass the filename to some method to do the actual processing
attempting = False
Catch
Thread.Sleep(1000)
End Try
End While
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
As a follow-up...I fixed the second part of the problem by changing the Watcher trigger to changed, instead of created. That was all I needed in this case
Got the ifrst part handled, too. Thanks for your help!
|
|
|
|
|
hey i would like help some help regarding the playback speed...
i would like to increase or decrease the speed with which an audio file is played..depending on the users choice..it shuould be variable in as low as 5% increment/decrement.
help me i am new
|
|
|
|
|
This depends entirely on the object or API that you're using to play the audio file. If you're using just the Win32 API, you can't change the playback speed. In this case, you'll have to find a 3rd party media player that supports what you want.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
In Vb, I would have an option or groupbox, with checkbox controls on it. I could set a value for each checkbox and then write the following code...
Select Case optGroupbox1<br />
<br />
Case 1: 'checkbox 1<br />
'statements<br />
Case 2: 'checkbox 2<br />
'statements<br />
End Select
How would I implement the above code in vb.net?
I've tried the following but vb.net does not like Case chkbox1.CheckState = CheckState.Checked call...
Select Case GroupBox1.Controls<br />
<br />
Case chkbox1.CheckState = CheckState.Checked<br />
'statements<br />
End Select
Thanks in advance.
|
|
|
|
|
Rashar wrote: Select Case GroupBox1.Controls
Case chkbox1.CheckState = CheckState.Checked
VB.NET won't work like that. Since you've specified GroupBox1.Controls in the Select statement, you can only specify properties of the Controls collection, not it's contents.
You'll have to enumerate the controls collection to get this to work:
For Each gbc As Control in GroupBox1.Controls
Select Case gbc.Name
Case "chkbox1":
If gbc.CheckState = CheckState.Checked Then
...
End If
End Select
Next
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
while savinf the DTS package with visual basic file and converting it into vb.net file i get troublews how do i convert vb6 file to vb.net?
|
|
|
|
|
Recode it by hand. I have no idea what's your trying to say about DTS, but converting the VB6 code by hand is the best method.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have a programme that I write using VB6 Now I want to Convert it to VB.NET2003
how can I achieve this.Also What is the Different between VB.Net and VB.Net2003.Thanks
Ademola
|
|
|
|
|
Adekolurejo wrote: I have a programme that I write using VB6 Now I want to Convert it to VB.NET2003
how can I achieve this.
Open the VB6 projects .VBP file in Visual Studio and it'll launch the Conversion Wizard. I highly recommend not doing this and just rewriting the project from scratch though. The conversion doesn't do a perfect job of converting code and it will NOT take advantage of any improvements made in the .NET Framework or VB.NET language. It'll generate code that emulates and is functionally equivilent to VB6, but that's about all.
Adekolurejo wrote: What is the Different between VB.Net and VB.Net2003.
VB.NET = VB.NET2003. VB.NET is an identifier that covers the language versions 2002, 2003, 2005, and above.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I am trying to write a sub-routine in a VBScript to split a file path into 3 bits.
For example I want to split the following path:
"C:\Program Files\MyProg\Studio\win32\bin\filt.exe"
into 3 bits:
1. C:\Program Files
2. \MyProg\Studio\win32\bin
3. \filt.exe
The First part will always be de-limited by 'Program Files' (or the 2nd '\').
The Second part will be delimited from the end of 'Program Files' to the last '\' in the path.
The 3rd Part will be delimited from the last '\' to the end of the path.
The source of the initial file path is stored in an input file, and the split path is to be stored in another text file in the following format:
"C:\Program Files" ** "\MyProg\Studio\win32\bin" ** "\filt.exe"
I hope this is clear, and someone will be able to assist. Any help will be much appreciated.
Thanks
|
|
|
|
|
This is simple string handling.
You can use the FileSystemObject 's GetFilename method to get the last part of the string.
You can use WScript.ExpandEnvironmentStrings to get the path to the Program Files folder (which is NOT always on C:!!). All you need to do is exand the environment variable "ProgramFiles" and it'll usually return C:\Program Files .
After that, it's simple string handling to get the middle part. Hint: What's the length of the strings returned by both of these calls?
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 14:34 Monday 26th June, 2006
|
|
|
|