|
Hi.
Does anybody know if it is possible to ‘pan’ a PictureBox?
Thanks.
Brad
|
|
|
|
|
If you are meaning like scrolling around, try putting one in a panel and setting the panel's .AutoScroll() Property to true.
Hope this helps
|
|
|
|
|
Actually what I would like to do is a Pan similar to what a lot of drawing packages like AutoCAD have...left click and hold while dragging the image around the viewer. This is a very handy option when the picture is zoomed in very close.
Thanks
Brad
|
|
|
|
|
I am making a application which plays tracks from a listboxcontrol
with the windows media player active x control (OCX). The items in the
listbox are the paths to the sound files.
The problem is that when I start playing a track, the very
beginging of the track gets cut off, this is only a fraction of a
second but it is still bad.
Any sugestions?
Many Thanks,
Glen Conaway
|
|
|
|
|
i want to developed server application
Which gets time from user let suppose 8'O clock in morning and then start seasrching database for changes and takes appropriate actions
thansk
regdrs
|
|
|
|
|
Permission granted!
I take it, there's a question buried in there somewhere...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well i mean
how i create Application as we see in Antivirus programs to Schedule scan time and other timing
thanks
|
|
|
|
|
All you have to do is write your application as a stand alone app that quits on its own. Then just use the Scheduled Tasks control panel to run it on at a scheduled time as often as you want.
Or you could make it more complex by building a scheduler into your app. You'd use a timer to fire off a method that gets the current system time and compares it to, maybe, a list of scheduled tasks that it needs to perform. If the time is right, you would have to launch the appropriate tasks. If not, the method just exists and waits for the next tick of the timer, say, every 10 seconds. My first thought is a scheduler that launches each task in a seperate thread. You would then need an interface to manage the task list and another one to manage the scheduler.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks Dave for supporting responce
I will soon try it
thanks
|
|
|
|
|
Hi everyone,
I have managed to get crystal reports working with my program fine when the database used for the source is put in a fixed directory ie. the programs directory.
I'm now updating my program so that the user can install the program in any directory and the database is called from the application folder. This works great with everything except the crystal reports. The main problem is that originally I had set the crystal report data source to the database in the fixed directory so I thought it would be a simple job to just use the dataset as the data source to get over this problem. I have tried the folowing code on a form with the report viewer:
'First change the directory of the database to the application folder
Try
Me.OleDbConnection1.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source= Asset Control.mdb"
Catch eConnection As System.Exception
MessageBox.Show(eConnection.Message)
End Try
'now fill the data adapter
Me.OleDbDataAdapter1.Fill(Me.DsAssetTypeReport1)
'**********************************************************************************
'Change Report Source to application folder
Try
Me.CrystalReportViewer1.ReportSource = "Reports\CRAssetsByAssetType1.rpt"
Catch eConnection As System.Exception
MessageBox.Show(eConnection.Message)
End Try
'***********************************************************************************
End Sub
I think the reportviewer is still trying to open the report from the fixed directory because I get a log On dialog appear. And if the database is in the original directory it will open. Can anyone throw some light on this?
Also am I anywhere near the mark with the code above?
Thanks in advance.
|
|
|
|
|
fizzer666 wrote:
'First change the directory of the database to the application folder
Try
Me.OleDbConnection1.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source= Asset Control.mdb"
Well, according to the comment you put in there, this code does NOT change the directory of anything. It just assumes that the current directory is the one with the .MDB database. You really can't assume anything, so what you might want to do is prepend the path to the .EXE file that started your app to the filename of the database (assuming it's in the smae directory as the .EXE file.)
Imports System.IO
.
.
.
Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Path.Combine(Application.StartupPath, "Asset Control.mdb")
The same thing would apply to your Crystal Reports files:
'Change Report Source to application folder
Try
Me.CrystalReportViewer1.ReportSource = Path.Combine(Application.StartupPath, "Reports\CRAssetsByAssetType1.rpt")
Catch eConnection As System.Exception
.
.
.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the code.
It seems to be working because I'm not getting any errors like "Incorrect Path". However, i'm still getting the login screen.
Sorry if i'm being a bit thick here but have you any idea why this is happening?
|
|
|
|
|
Is your database using User and Group Security/Permissions? Or is it on a network share?
[EDIT]
Never mind, I just re-read your original post. Is the dialog coming from Crystal Reports? Does any of your usernames/passwords work in the dialog? If so, that might tell you where the dialog is coming from.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I haven't got any usernames/passwords set in the database. The crystal report opened fine when the directory was fixed.
The Database Login dialog does state the correct table name when it opens but there is no options to select from the server name combobox or the Database combo box.
I'm pretty sure it's coming from the Crystal Report because if I enter something in the dialog and click finish I get a message box saying logon failed with the title of the message box being "Crystal Report Windows Forms Viewer".
|
|
|
|
|
Think i've solved the problem. Found an example in a book I have. I've used the following code and everything now seems to work. Hopefully all should be ok now. Thanks for all your help Dave.
'First change the directory of the database to the application folder
'[Change dbconnection to application startup path]
Try
Me.OleDbConnection1.ConnectionString = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Path.Combine(Application.StartupPath, "Asset Control.mdb")
Catch eConnection As System.Exception
MessageBox.Show(eConnection.Message)
End Try
'[Change dbconnection to application startup path/]
Dim myRpt As Object
Dim cr_dataset As New dsAssetTypeReport
myRpt = New CRAssetsByAssetType1
Me.OleDbDataAdapter1.Fill(cr_dataset)
myRpt.setdatasource(cr_dataset)
Me.CrystalReportViewer1.ReportSource = myRpt
|
|
|
|
|
Hi,
I'm looking for some code that can calculate the Decibel from a mic.
Thx
|
|
|
|
|
Bascially, you can't. The driver set doesn't expose the functionality of mapping digital microphone values to an audio decibel level. The volume control of the microphone input jack, as well as any on the microphone itself, doesn't allow a mapping of real-world audio volume to digital values. If the outside sound is, say, 100Db and the sound card microphone volume control is set very low, the values you get as input from the microphone will be very low, resulting in an incorrect decibel calculation.
What would be required is a calibration so you can map the values from the microphone to a known range of volume in the outside world. This would mean that the volume control(s) would have to be set at a specified level and never moved. Also, you would need a source of known calibrated audio. Once you have these you can use the input from the calibration source to sample and map the values from the microphone and calculate decibels.
There is no function you can call to return the decibel information for you. You have to write it, but a large part of what you want is dependant on the audio you use for calibration. Without the calibration, all of your calculations will be meaningless.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a form which is having two combo boxes.
This two combo boxes contains the same list. This list is retrieved from the database. First, I am filling the first combo box and then i am filling the second combo box. This is taking more time.
Is there any method which I can fill the second combo box with the first one?
Please Help me...
Thanx,
Ravi.
|
|
|
|
|
The easiest way to do it would be to copy the items, one at a time, from one combobox to the other.
Dim index As Integer
ComboBox2.Items.Clear()
For Index = 0 To ComboBox1.Items.Count() - 1
ComboBox2.Items.Add( ComboBox1.Items(Index) )
Next
Or you could bind the Items collection of one Combobox to the other.
ComboBox2.DataBindings.Add(New _
Binding("Items", ComboBox1.Items, "")
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Try using the CopyTo method of the first combobox to copy its contents to an array then use the AddRange method of the second combobox to copy the array.
|
|
|
|
|
There is no other method in VB6
|
|
|
|
|
You didn't say you were using VB6 before. Is there some reason you can't fill both ComboBoxes at the same time? That way, you're only enumerating the data once. Otherwise, you have to enumerate the data again, either from the datasource or from the first ComboBox, to fill the second ComboBox. You could still try databinding, but it's a bit more complex than the .NET version. Try this[^] for an example in VB6.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is there a term or practice of running an application on a web server? I would like to run a program either console application to send commands to my ASP.net application on shared hosting. Some commands would drop tables, delete expired records, and update table data.
Should I use a web service or windows service to perform these tasks or is there another method for employing these executions? Is it possible to write something like this and have it running as a background service?
Also, I would like it to run it as a process with at any time an option to disable the process. Consider the term "web application sub-worker."
Any help or comment about this would be greatly appreciated. Thank you.
M.R.
a2leadpencil@hotmail.com
AOL: bgppa1
Yahoo: slatequarry
|
|
|
|
|
leadpencil wrote:
I would like to run a program either console application to send commands to my ASP.net application on shared hosting. Some commands would drop tables, delete expired records, and update table data.
These are things you do with SQL commands. You could do it with the SQL Query Analyzer. It would bypass your ASP.NET site completely. If you wanted to, you could create a WebService that takes commands you type in SQL and forwards them to the SQL database, but that would represent a huge security risk.
Are you talking about an AUTOMATED method of running these commands on a schedule? In that case, SQL Server has it's own scheduler service for running batch commands like this on a schedule. All it would take is putting these commands into a stored procedure, the setting up the scheduler to run it.
If you running your site on a shared host, I don't think the owner's will let you install a background process on their servers.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi everbody
iam using an application in which iam using an exe audioplayer called big hand which will play only
text messages.i have a rich text box in my form what i have to do is i have to type all the text
messages that are played by this big hand player.when ever i run this big hand player it is showing some common dialog box and asking what file should be opened.
my problem is how to capture the file name when iam opening the file and the same file name should be present when ever i save(for the first time)my text that i have typed in rich textbox in the common dialog box
and again is there any solution for keeping this exe file fixed into the file so that when ever i close the form that exe should also be closed automatically
thank you all
thank you for your reply for keeping an exe file into vb form as mdi child
thank you once again
|
|
|
|