Jump to content
Xtreme .Net Talk

StealthRT

Members
  • Posts

    4
  • Joined

  • Last visited

StealthRT's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Solved: Dim times As String() = lblSongTime.Text.Split("/"c) Dim elapsedTime As TimeSpan = TimeSpan.ParseExact(times(0).Trim(), "m\:ss", Nothing) Dim totalTime As TimeSpan = TimeSpan.ParseExact(times(1).Trim(), "m\:ss", Nothing) Dim remainingTime As TimeSpan = totalTime - elapsedTime Debug.WriteLine(remainingTime.ToString("m\:ss"))
  2. Hey all i have a song playing that displays the time like so: 0:00 / 4:47 The first time is the tracks current time. The second is the total track time of that song playing. I split it like so: Dim tmpTimes As Array = lblSongTime.Text.Split("/") So tmpTimes(0) gives me 0:00 and tmpTimes(1) gives me 4:47. Now i tried to subtract the tmpTimes(1) from tmpTimes(0) Debug.Print(CDbl(tmpTimes(1).replace(":", "") - tmpTimes(0).replace(":", ""))) and i get: 447.. 446... 445... etc What kind of calculation do i need in order to return a descending count? Example: 4:47...4:46.....4:45...etc using the current time tmpTimes(0)?
  3. Hey all i have the following code sliding from the bottom of the main form position to the middle of the main form. main form Dim Viewform2 As New Form2 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.AddOwnedForm(Viewform2) Viewform2.Show() Call ChangeChildFormLayout() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim intX As Integer = Me.Top + Me.Height Dim opacityNum As Short = 0 Dim slideTo As Integer = Me.Top + Me.Height - 210 Do Until intX = slideTo With Viewform2 .TopMost = True .Opacity = intX .Top = intX .Height = 220 .Left = Me.Left .Width = Me.Width End With Debug.Print(intX) intX -= 1 If opacityNum <> 101 Then opacityNum += 1 End If Application.DoEvents() Loop End Sub Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize Call ChangeChildFormLayout() End Sub Private Sub ChangeChildFormLayout() With Viewform2 .Opacity = 0 .Top = Me.Top + Me.Height .Height = 200 .Left = Me.Left .Width = Me.Width End With End Sub slide form no code, just a form thats width 292 and height 266 This code works but its very choppy when the slider form slides up. Also, i am unable to get the opacity correct as well where it fades in and then out when it leaves. Does anyone have any suggestions on how to correct this? Thanks!
  4. I need some help with this code for vb.net. I have an ASP page (index.asp) and i found this code that if you view my site on a cell phone, it would redirect you to the cell phone (WAP) version of the site. Sub Page_Load() Dim isPPC Dim httpAccept As String isPPC = Request.ServerVariables("HTTP_UA_OS") httpAccept = LCase(Request.ServerVariables("HTTP_ACCEPT")) If InStr(isPPC, "POCKET PC") Then response.redirect("--your PocketPC page--") Else If Instr(httpAccept,"wap") Then response.redirect("--your WAP page--") End If End If End Sub Now i am new at .net programming but i have a good grasp on ASP now. I need to know where i need to put that code in my asp page. Ive tryed the code with the <% %> at the start and ending of it at the very top of my asp page, but it still loads up the normal site on my cell phone. If anyone knows how to correct this, please let me know :) David
×
×
  • Create New...