|
Actually i have placed some images in a single webpage with visible="false" and i need to check it with date and month, if both matches then one image has to be visible and next time when date and month matches it has to show some other image and hide the previous image. working on asp.net 2003 with vb.net
pls do this needful.
|
|
|
|
|
You should be asking this in the ASP.NET forum.
|
|
|
|
|
I am developing a web application in that I need to record audio, for that I am importing "winmm.dll" and
using mciExecute function.(the following code is in vb.net). If I have posted in irrelavent forum please let me
know where should I post questions related to audio and video (for web development).
<code>
Imports System.Runtime.InteropServices
Imports Microsoft.VisualBasic
Imports Microsoft.VisualBasic.Devices
Partial Class audioRec
Inherits System.Web.UI.Page
<DllImport("winmm.dll", EntryPoint:="mciExecute", CharSet:=CharSet.Ansi, SetLastError:=True,
ExactSpelling:=True)> Private Shared Function mciExecute(ByVal lpstrCommand As String) As Boolean
End Function
Protected Sub BtnStart_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnStart.Click
mciExecute("open new Type waveaudio Alias recsound1")
mciExecute("set recsound1 time format ms bitspersample 16 channels 1 samplespersec 8000")
mciExecute("record recsound1")
End Sub
Protected Sub BtnStop_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnStop.Click
mciExecute("save recsound1 c:\\record.wav")
mciExecute("close recsound1 ")
Dim c As New Computer
c.Audio.Stop()
End Sub
Protected Sub BTNplay_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTNplay.Click
Dim computer As New Computer
computer.Audio.Play("c:\\record.wav", AudioPlayMode.Background)
End Sub
End Class
</code>
but when I am clicking the start button, A msgBox with "the parameter is out of range " msg is getting displayed. I need to to record an audio file in "8khz, 16 bit, mono" format. If I change the value of samplespersec to 11025 or greater frequency it works. But I am not able to save my audio file in 8kHz format.
How can I meet this requirement.
i will be thankful for ur suggestions..
with regards,
kiran
|
|
|
|
|
The code you've come up with is never going to work. Any ASP.NET code you write in VB.NET or C# or whatever only executes on the server-side.
You need an ActiveX control installed on the client-side and usable in your HTML page that your ASP.NET code generates in order to get at the hardware on the client. Your VB.NET code will have nothing to do with this.
This is a question best asked in the ASP.NET forum.
|
|
|
|
|
help I need to map from the server to the local host.
I am having problems with my web application, i am unable to make the application read on the hard drive of the client (local) machine, i need to be able to map the path such that this application is able to upload files from the client's C:\ drive.
Any ideas....it's a VB.net application running on a web server.
thanks,
|
|
|
|
|
An ASP.NET website cannot access resources on the client machines that are accessing it, nor should it for security reasons. It simply provides a means for producing MIME-encoded data streams that can be handled by a web browser.
If you need to provide the facility for the user to upload a file from their local machine, create a page with a FileUpload control on it. The user will need to pick the file to upload of course.
Paul Marfleet
|
|
|
|
|
Hi All,
I have a two dimensional array of string carrying Name, Date & Amount of customers. The Names in the array are repeating; now want to collect all the distinct Names in the array and store it in another array (obviously one dimensional). I am using VB6. It may look like a stupid question, but I have tried everything I could have and got no results. It is very urgent.
Can any one please help me?
Thanks in advance.
Regards,
Paramhans Dubey.
|
|
|
|
|
Does VB6 offer a set class, or a dictionary/hashtable ? If not, then is there a method you could use to search the array for each string before you add it, to make sure it's not there ?
VB6 sucks BTW, I'd recommend moving to VB.NET as soon as you get the chance
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
For each item you are about to put into the "distinct" array, you have to search the array to see if it's already in there. If it's NOT in there, add it. If it is, move on to the next item in your srouce array.
|
|
|
|
|
Hi I have a login page...,
After enter that username,pwd it will go to default.aspx page...,
In that default.aspx page i have displayed some usercontrols and one iframe tag...,
In that iframe i have displayed other aspx page...,
In that aspx page i have said when the session(userid)=0 go to login.aspx page like...,
Code:
If Val(Session("userid")) = 0 Then
Response.Write("Your Session Expired.....")
Server.Transfer("login.aspx")
End If
so when the session expires it showing the login.aspx page in inside the default.aspx page iframe control...,
But it have to show when the session is expires login.aspx page on whole page...,
It mean it have to come outside of the default.aspx page also...,
So i have used javascript & modified code as...,
Code:
If Val(Session("userid")) = 0 Then
Response.Write("")
Response.Write("window.open('login.aspx','_top')")
Response.Write("")
End If
But in this i am getting error inside the iframe tag...,
I hope u peoples understand my probs,
Plz help me to solve this...,
Advance thanks,
Regards,
Magi
|
|
|
|
|
Dont cross post, you already have this same query in the ASP.net forum (which is the better forum for issues like this) with someone there trying to help you.
|
|
|
|
|
hi all
i m trying to zoom a tab control with all sub controls on it like textbox, another tab control, label, group boxes.
i already have tried the for each loop as told by dave in my early post.
can some one tell me another way to do the job, i am thinking about to increase the pixel size of the control or some thing like that.
thanks in advance
help everyone
|
|
|
|
|
I really can't add anything to what Dave Traistor already said. I really don't have a good idea of exactly what you're trying to do either. What do you mean by "zoom"?? Maybe if you draw out what it's supposed to look like before and after the zoom??
|
|
|
|
|
Hi,,,,
I am using VB6, could any one help me how to enter unicode strings(chainese language)to the string table of a VB application? And how to dispplay them on a command button?
thanx in advance!
birajendu
CyberG India
Delhi
India
|
|
|
|
|
|
Hi i am using Vb 2005 and using some other command line based applications to take some “file backups”.
I am able to execute the command by using the shell function.
My issue is that i want to know what is the status returned back. One way is to redirect the output of the commands to a file and read....
Is there any other way ???
Regards
Nishkarsh
|
|
|
|
|
If you're using the Process class to launch this, there's a WaitForExit method you can call that will block your code until the process you launched exists. When that call returns, then you can look in the ExitCode property of the Process object you created.
You can also redirect the output of the console app to your application and read it like you would a Text file. Check out the StandardOutput property of the Process class and the RedirectStandardOutput property of the ProcessStartInfo class.
|
|
|
|
|
Hi i am stuck up at a very small point in my new vb 2005 Express edition application, I want to have right aligned labels (text aligned to right side of label) so that when there is a large string added to the text of labels they expand on left side...just like the way they used to do in VB6
Note: I had set the auto size property of labels as true
Regards
Nishkarsh
-- modified at 2:30 Friday 26th October, 2007
|
|
|
|
|
just put the property 'textalign' to the value 'right' and that should do it
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Hi thanks for your suggestion but unfortunately it dose not works the way i wanted...
I aligns the text to the right side of the label but my idea is different...
I am having a small Label which i populate at runtime... i want it to grow on left side not on right, when i put data in it..
Regards
Nishkarsh
|
|
|
|
|
There should be a TextAlign property int he label.
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
|
|
|
|
Hi thanks for your suggestion but unfortunately it dose not works the way i wanted...
It aligns the text to the right side of the label but my idea is different...
I am having a small Label which i populate at runtime... i want it to grow on left side not on right, when i put data in it..
This used to be the case in vb 6 if i am not wrong when we make a label left aligned
|
|
|
|
|
You can always calculate the location and size of the textbox yourself, I guess.
|
|
|
|
|
Hi, I would set TextAlign to right, AutoSize off, and give sufficient Width.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Option Explicit
Dim Starttime As Date
Dim Endtime As Date
__________________________________________________
Private Sub Command1_Click()
Starttime = Format(Now, "HH:mm")
Timer1.Enabled = True
Form1.Print Starttime
End Sub
__________________________________________________
Private Sub Command2_Click()
Endtime = Format(Now, "HH:mm")
Timer1.Enabled = False
Form1.Print Endtime
End Sub
____________________________________________________
Private Sub Command3_Click()
Form1.Print Minutesdiff = (Endtime - Starttime)
End Sub
_____________________________________________________
Private Sub TxtEnd_Change()
End Sub
______________________________________________________
Private Sub txtStart_Change()
End Sub
_______________________________________________________
i have created this project with three command button two textbox and three level and a form. command1 is for login time ( Start Time) and command2 for logout button (EndTime), and command3 for calculating difference Between EndTime and StartTime. so that i could calculate the amount of billing. i.e.
0 > 30 minutes = 10 Rs.
31> 60 minutes = 20 Rs.
further i want the the log in ang Log Out detail appeares in the textbox but i dont get it how
so i have made it default apearance on the form itself.and when the total command3 button is click it should show the difference of Time in HH:MM format
help me solving it.
zrch
|
|
|
|