D
Deleted member 103
Guest
Hi,
I have my first app with Windows Phone ready, I'll have to just publish.
I have my first app with Windows Phone ready, I'll have to just publish.
If you need help you can contact me.
I just today opened a Developer account(17,20 Euro). Whether the need for a cetifications apps like Apple, I do not know yet.thanx filippo for your offer, i will need a little help in the beginning, if you got a simple example how to use scrollviews, menu, buttons, dialog, msgbox, .. that would be fantastic..
and again Good Luck with Windows Apps, dont forget to tell us about the publishing process.
btw does windows apps need cetifications like apple? or just open dev account create your app and upload like google play?
these are just the beginner's mistake. you should something with Grid and StackPanel play. you'll see it's really very simple.it is much harder then i thought, simple stuff are so complicated and i dont find the way to do them.
like add controls to the page in designer, when i add a button its ok but the add another control replace the old button.
why??
########## Timer-Example ##############
Imports System.Windows.Threading
Private timer As DispatcherTimer
Public Sub New()
SetupTimerSpeed()
End Sub
Private Sub SetupTimerSpeed()
' DispatcherTimer setup
timerSpeed = New DispatcherTimer()
AddHandler timerSpeed.Tick, AddressOf timerSpeed_Tick
timerSpeed.Interval = New System.TimeSpan(0, 0, 0, 0, 10) '10 milli sec.
timerSpeed.Start()
End Sub
Private Sub timerSpeed_Tick()
....
....
End Sub
#######################################
########## Sound-Example ##############
Imports System.Windows.Media
Public Sub New()
play("Assets/mysound.wav")
End Sub
Private Sub play(ByVal file As String)
Dim stream As Stream = TitleContainer.OpenStream(file)
Dim sound As SoundEffect = SoundEffect.FromStream(stream)
FrameworkDispatcher.Update()
sound.Play(0.5, 0, 0)
End Sub
#######################################
########## Read/Write-Example ##############
Public Function ReadFileAsString(fileName As String) As String
Dim file As IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication()
Dim filestream As IsolatedStorageFileStream = file.OpenFile(fileName, FileMode.Open, FileAccess.Read)
'Dim data As String = ""
Dim sb As New StringBuilder
Using reader As New StreamReader(filestream)
'data = reader.ReadToEnd
Do While reader.Peek() >= 0
'data = data & reader.ReadLine & vbCrLf
sb.Append(reader.ReadLine).Append(vbCrLf)
Loop
End Using
'System.Diagnostics.Debug.WriteLineIf(True, "ReadFromFile:" & data)
'Return data
Return sb.ToString
End Function
Public Function ReadFileAsList(fileName As String) As List(Of String)
Dim file As IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication()
Dim filestream As IsolatedStorageFileStream = file.OpenFile(fileName, FileMode.Open, FileAccess.Read)
Dim data As New List(Of String)
Using reader As New StreamReader(filestream)
Do While reader.Peek() >= 0
data.Add(reader.ReadLine)
Loop
End Using
'System.Diagnostics.Debug.WriteLineIf(True, "ReadFromFile:" & data)
Return data
End Function
Public Sub WriteListAsText(ByVal file As String, ByVal lst As List(Of String))
Dim ISF As IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication()
'create new file
Using SW As New StreamWriter(New IsolatedStorageFileStream(file, FileMode.Create, FileAccess.Write, ISF))
For i As Integer = 0 To lst.Count - 1
SW.WriteLine(lst.Item(i))
Next
SW.Close()
End Using
End Sub
#######################################
None of my examples it work?hi filippo, when i try your code examples non of them work for me.
i dont know why, maybe i choosed the wrong template but nothing is working
really simple stuff are so complicated, like play sound or change background image.
nothing works only errors.
and if i google you cannot find any informations, if erel will make b4w he will be for sure succesful
so frustrating![]()
None of my examples it work?
"Microsoft Visual Studio 3013 Community"
Private Sub soundbtn_Click(sender As Object, e As EventArgs) Handles soundbtn.Click
Select Case soundon
Case 0
soundon = 1
'mp1.Play()
soundbtn.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("ms-appx:///Assets/s1.png"))
soundbtn.PressedSource = New System.Windows.Media.Imaging.BitmapImage(New Uri("ms-appx:///Assets/s1.png"))
soundbtn.Stretch = Stretch.Fill
Case 1
soundon = 0
'mp1.Pause()
soundbtn.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("ms-appx:///Assets/s0.png"))
soundbtn.PressedSource = New System.Windows.Media.Imaging.BitmapImage(New Uri("ms-appx:///Assets/s0.png"))
soundbtn.Stretch = Stretch.Fill
End Select
End Sub
Dim mp1 As New MediaElement
mp1.AutoPlay = True
mp1.Source = New Uri("ms-appx:///Audio/backm.mp3")
mp1.Volume = 1

Yes"Microsoft Visual Studio 3013 Community"
no, should i?
MP3 is not supported, you need mp3 to wav convert. ( Converter Mp3 to Wav )no sound is played
Dim mp1 As New MediaElement
mp1.AutoPlay = True
mp1.Source = New Uri("ms-appx:///Audio/backm.mp3")
mp1.Volume = 1
Imports Microsoft.Xna.Framework.Audio
play("Audio/backm.wav")
Private Sub play(ByVal file As String)
Dim stream As Stream = TitleContainer.OpenStream(file)
Dim sound As SoundEffect = SoundEffect.FromStream(stream)
FrameworkDispatcher.Update()
sound.Play(plyVolume, 0, 0)
End Sub
Private Sub soundbtn_Click(sender As Object, e As EventArgs) Handles soundbtn.Click
Select Case soundon
Case 0
soundon = 1
'mp1.Play()
soundbtn.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("ms-appx:///Assets/s1.png"))
soundbtn.PressedSource = New System.Windows.Media.Imaging.BitmapImage(New Uri("ms-appx:///Assets/s1.png"))
soundbtn.Stretch = Stretch.Fill
Case 1
soundon = 0
'mp1.Pause()
soundbtn.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("ms-appx:///Assets/s0.png"))
soundbtn.PressedSource = New System.Windows.Media.Imaging.BitmapImage(New Uri("ms-appx:///Assets/s0.png"))
soundbtn.Stretch = Stretch.Fill
End Select
End Sub
Private Sub soundbtn_Click(sender As Object, e As EventArgs) Handles soundbtn.Click
Select Case soundon
Case 0
soundon = 1
'mp1.Play()
soundbtn.Source = GetImageSource("s1.png")
soundbtn.PressedSource = GetImageSource("s1.png")
soundbtn.Stretch = Stretch.Fill
Case 1
soundon = 0
'mp1.Pause()
soundbtn.Source = GetImageSource("s0.png")
soundbtn.PressedSource = GetImageSource("s0.png")
soundbtn.Stretch = Stretch.Fill
End Select
End Sub
Public Function GetImageSource(ByVal Image As String) As ImageSource
Dim imageBrush As New ImageBrush()
Dim uri As New Uri("/Assets/" & Image, UriKind.RelativeOrAbsolute)
imageBrush.ImageSource = New BitmapImage(uri)
Return imageBrush.ImageSource
End Function