|
Hell Yeah!
Thanks a lot for your help!
I owe you one
The Jazz Master 6000
DJ Badknees
Parma Grind Crew - www.geocities.com/parmagrindcrew
|
|
|
|
|
np glad to have helped
<font color="blue">Private void</font> ExpectingTwins(<font color="blue">string</font> twins)
{
<font color="blue">switch</font>(twins)
{
<font color="blue">Case</font> ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
<font color="blue">break</font>;
}
}
|
|
|
|
|
Hi! I'm totally new in VB.net... I bought The VB.net Deluxe Learning Edition 2003 kit... I may not be done with it (almost though) but as I skimmed through the book I noticed that it does NOT show you how to play sounds and music... (I'm not usre if it even teaches you Avis!)
I was just wondering what object do i need to use to open and play sonds and music...
Or if there is no object... HOW DO YOU DO IT?!
BTW: I looked aeverywhere for the answer already...
Thnx
|
|
|
|
|
For sound, use the sndPlaySound() API. For video, use the Windows Media Player control or something similar.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
an old example in .net i did for someone a few months ago , might give you a helping hand with the sound
<font color="blue">Private</font> <font color="blue">Declare</font> <font color="blue">Function</font> sndPlaySound <font color="blue">Lib</font> "winmm.dll" <font color="blue">Alias</font> "sndPlaySoundA" _
(<font color="blue">ByVal</font> lpszSoundName <font color="blue">As String</font>, <font color="blue">ByVal</font> uFlags <font color="blue">As Integer</font>) <font color="blue">As Long</font>
<font color="blue">Const</font> SND_SYNC <font color="blue">As Integer</font> = &H0
<font color="blue">Const</font> SND_ASYNC <font color="blue">As Integer</font> = &H1
<font color="blue">Const</font> SND_NODEFAULT <font color="blue">As Integer</font> = &H2
<font color="blue">Const</font> SND_LOOP <font color="blue">As Integer</font> = &H8
<font color="blue">Const</font> SND_NOSTOP <font color="blue">As Integer</font> = &H10
<font color="blue">Dim</font> SoundName <font color="blue">As String</font>, wFlags <font color="blue">As Integer</font>, x <font color="blue">As String</font>
<font color="blue">Private</font> <font color="blue">Sub</font> Button1_Click(<font color="blue">ByVal</font> sender <font color="blue">As</font> System.Object, <font color="blue">ByVal</font> e <font color="blue">As</font> System.EventArgs) <font color="blue">Handles</font> Button1.Click
SoundName = "C:\Documents and Settings\Den\My Documents\Visual Studio Projects\WindowsApplication1\beav_rap.wav"
wFlags = SND_ASYNC <font color="blue">Or</font> SND_NODEFAULT
x = sndPlaySound(SoundName, wFlags)
<font color="blue">End</font> <font color="blue">Sub</font>
<font color="blue">Private void</font> ExpectingTwins(<font color="blue">string</font> twins)
{
<font color="blue">switch</font>(twins)
{
<font color="blue">Case</font> ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
<font color="blue">break</font>;
}
}
|
|
|
|
|
Okay, what if the whole folder, pgm and all, is read-only? Can you change it to grant write access through code? I'm trying to play with the fileIOpermissions but I think I'm going down the wrong track...
|
|
|
|
|
I have a datagrid that displays information based on searches. When I run a search, the datagrid fills and I can scroll through the table. However, let's say I scroll down the list a little, and then decide to run another search. The datagrid fills with the new information and shows the top of the list, but the scroll box doesn't change. Then when I click on the scroll bar the table snaps to where it would be in relation to the scroll bar.
How do I make the scroll bar move back to the top when the datagrid fills with new information? (This is on a Windows form btw)
Puzzled...
|
|
|
|
|
Take a look here http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q895q or maybe try setting the current cell like this:
Datarid.CurrentCell = New DataGridCell(0, 1)
|
|
|
|
|
thank you - looks like a good site, I'll be bookmarking that!
I actually made a little subroutine that deletes the datagrid and then makes a new one. Then the scroll bar goes back to the top. But I will try this too...perhaps less code.
|
|
|
|
|
If you are just performing a new query and setting the results to the datagrid then in your routine where you set the datagrids datasource property, always set the datasource to nothing first.
Private Sub FillGrid(dg As DataGrid)
Dim ds As New DataSet
'//Clear Any Data From The Grid
dg.DataSource = Nothing
'//Do Work To Get Data Here
'
'
'//Fill The Grid With Data
dg.DataSource = ds
End Sub
Just An Example. That way your really only had to add one line of code to clear the grid and scrollbar.
|
|
|
|
|
Thank you so much! That did exactly what I wanted and it elminated the need for an extra subroutine.
|
|
|
|
|
|
How can I enumerate a control's properties in .Net?
I bascially want to do this (vb6 code):
*****Start Code*****
ctl = control
strPropName = "value"
For each prop in ctl.properties
If propr.name = strPropName
msgbox prop.value
Exit For
End if
Next prop
*****Start End*****
I'm struggling with this, as it was obvious in VB6!
Thanks
|
|
|
|
|
Use Control.GetType to get the Type of the control, and Type.GetProperties to get an array containing the properties of the control.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Is there any one know how to set the text file to be printed on next new page? I mean if i read certain line contain string start with "*", then i want the line below "*" to be printed on next page.
Any one know how to do this?
|
|
|
|
|
yea use an else if statment to check for more pages. email me if u need more help. pschutt@rxcci.com
|
|
|
|
|
This probally is the stupidest question but I am new to Microsoft VB .Net, and I need help. I know where to put it but I don't know what to put. I just want a sound to play when my Application starts.
|
|
|
|
|
Can you do it in a macro?
WindowEvents_WindowCreated? Oh wait .... in the application your writing(not the enviorment... Ughh)
Yeah - Option One, in your main window load event, Making sure to play it only once.
Option two, have a main function that plays the sound and then loads the form. Make sure you set the startup object to be the main function you just wrote. Just like in VB classic.
|
|
|
|
|
I have been working with VB.NET for a few months coming from vb 4 5 and 6. I have enjoyed the control that I have over the execution on my programs and the level of detail available throught he framework. However, I seem to have a thorn in my side whenever I utilize the datagrid. Indexoutofrange exception seems to pop up out of knowhere and for the life of me I can not properly trap it or handle it in debug mode. I have gotten around other exceptions, has anyone else experienced this? is there something that I would be overlooking or a way to trap.
Thanks
Gregory J Lynch
Hack
|
|
|
|
|
I compiled a DLL using Visual Basic 6. I am unable to call this DLL in OMNIS.
I was told that if a DLL is compiled in VB 6, it is highly likely to be compiled as a COM object. Omnis functions will not work with COM objects.
How do I compile a DLL in VB 6 as a normal DLL?
Can somebody help me out??
Regards,
Vick
|
|
|
|
|
This cannot be done using VB6 alone, which creates only stand-alone EXEs or COM components. Desaware, however, has a product called SpyWorks, that will create Win32 exports of VB DLLs.
http://www.desaware.com/SpyWorksL2.htm
|
|
|
|
|
vicknesh wrote:
I was told that if a DLL is compiled in VB 6, it is highly likely to be compiled as a COM object.
That is correct.
-Nick Parker
|
|
|
|
|
Hi
How do i disallow a user from entering MBCS characters (Japanese Kanji) from entering in text box.
He/she should only be allowed to enter SBCS (KataKana) in the text box.
Help!..
|
|
|
|
|
|
USe StrCon() function ofVB.
USe it to convert to any type.
i.e VBWide,VBNarrow,VBKatakana,VBHiraGana. etc..
USeful-function,if u get it right.
else VB stores strings in UNICODE format which takes 2bytes / character.
So difficult to recognise single/multibyte otherwise.
CIAO
|
|
|
|