|
A book called VB.NET Hacks & Pranks by Alexander Klimov explains sine waves pretty well. I do not know how to explain what he has wrote very well though. Sorry. This may or may not help, but this is a formula for the section on sine waves:
ptf(i).Y=CSng((cy/2)*(1-Math.Sin(i*cW*Math.PI/(cx-1))))
Regards,
1tg46
Check out 3D Game Development with Dark Basic Professional [^]programming.
|
|
|
|
|
Hello
I want to play a sound/(audio file) (the format doesn't matter).
But I want to play the file and still use the application.
For example a button starts the sound/(audio file) and then if I press a new button, the first sound/(Adio file) stops and a new sound/(Audio file) starts.
It is almost the same as Windows Media Player, which plays the file and still make the app useable.
Can someone show me some articles or tell me how to do this?
Thanks
QzRz
|
|
|
|
|
|
|
How do I persist information in an app? I am taking some input from the user in a form and I want to access this information from any form. How do I do it?
I am talking about windows forms.
Thanks
-
बुरा जो देखण मै चला, बुरा न िमलया कोय,
जो मन खोजा आपणा तो मुझसे बुरा न कोय।
Translation
|
|
|
|
|
You could use a config file for it. If the information is complex enough, you can use a database to store the data. The simplest way is to write a class, say Config, to store the configuration settings and then use XML serialization/deserialization to write and read back the data.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
S. Senthil Kumar wrote: The simplest way is to write a class, say Config, to store the configuration settings and then use XML serialization/deserialization to write and read back the data.
Yes, I thought of doing that. Is there no other alternative? I find it a little odd that there is no way I can persist some variables across the windows application in .Net.
|
|
|
|
|
I get the following error when trying to run my ASPX page on my live server but it works FINE on my local test server. Where is the database connection settings for this as I can ONLY think that is the problem?
ERROR
System.Data.OleDb.OleDbException: Could not find installable ISAM.
at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
at System.Data.OleDb.OleDbConnection.InitializeProvider()
at System.Data.OleDb.OleDbConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Data.OleDb.OleDbException: Could not find installable ISAM.
at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
at System.Data.OleDb.OleDbConnection.InitializeProvider()
at System.Data.OleDb.OleDbConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()
--------------------------------------------------------------------------------
System.Data.OleDb.OleDbException: Could not find installable ISAM.
at System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr)
at System.Data.OleDb.OleDbConnection.InitializeProvider()
at System.Data.OleDb.OleDbConnection.Open()
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()
Other than this my files are as follows.
ASPX file:
--------------------------------------
<%@ Page Language="C#"%>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral"
%>
<mm:dataset
id="DataSet1"
runat="Server"
isstoredprocedure="false"
connectionstring="<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_GKAUser"] %>"
databasetype="<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_GKAUser"] %>"
commandtext="<%# "SELECT * FROM tblWOL WHERE usern = ? ORDER BY usern ASC" %>"
failureurl="<%# "noaccess.htm" %>"
debug="true"
=""><parameters><parameter name="@usern" value="<%# (Request.Cookies["AuthenticateGKDUser"] != null) ? Request.Cookies["AuthenticateGKDUser"].Value :
"" %>" type="WChar">
<mm:pagebind runat="server" postbackbind="true">
<%@ Register TagPrefix="Portal" TagName="ImageCanvas" Src="ImageCanvas.ascx" %>
<%@ import Namespace="System.Drawing" %>
void Page_Load(Object sender, EventArgs e)
{
HttpCookie UserCookie = Request.Cookies["AuthenticateGKDUser"];
if (null == UserCookie){
Response.Write("No cookie");
//string UserCookieValue = "evlxtc";
}
else{
string UserCookieValue = UserCookie.Value.ToString();
//Response.Write(UserCookieValue);
};
//Response.Write(UserCookieValue);
int WOLScr1StrX, WOLScr1StrY, WOLScr2StrX, WOLScr2StrY, WOLScr3StrX, WOLScr3StrY, WOLScr4StrX, WOLScr4StrY, WOLScr5StrX,
WOLScr5StrY, WOLScr6StrX, WOLScr6StrY, WOLScr7StrX, WOLScr7StrY, WOLScr8StrX, WOLScr8StrY, WOLScr9StrX, WOLScr9StrY, WOLScr10StrX, WOLScr10StrY,
WOLScr11StrX, WOLScr11StrY, WOLScr12StrX, WOLScr12StrY, WOLScr13StrX, WOLScr13StrY;
int pWOLScr1StrX, pWOLScr1StrY, pWOLScr2StrX, pWOLScr2StrY, pWOLScr3StrX, pWOLScr3StrY, pWOLScr4StrX, pWOLScr4StrY,
pWOLScr5StrX, pWOLScr5StrY, pWOLScr6StrX, p.........etc
----------------------------------------------------------------
<b>location of my DB </b>is : C:\Domains\gkabayete.com\wwwroot\login\db\GKA.mdb (ON the live server)
-----------------------------------------------------------------
<b>web.config is :</b>
----------------
<configuration>
- <appSettings>
<add key="MM_CONNECTION_HANDLER_GKAUser" value="default_oledb.htm" />
<add key="MM_CONNECTION_STRING_GKAUser" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Domains\gkabayete.com\wwwroot\login\db\GKA.mdb;Persist Security Info=False" />
<add key="MM_CONNECTION_DATABASETYPE_GKAUser" value="OleDb" />
<add key="MM_CONNECTION_SCHEMA_GKAUser" value="" />
<add key="MM_CONNECTION_CATALOG_GKAUser" value="" />
</appSettings>
- <system.web>
<customErrors mode="Off" />
</system.web>
</configuration>
--------------------------
and my <b>connection file </b>is GKAUsers.asp:
--------------------
<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_GKAUsers_STRING
MM_GKAUsers_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Domains\gkabayete.com\wwwroot\login\db\GKA.mdb;Persist Security Info=False"
%>
-----------------------------------------
WHERE else can there be a problem that I get this error? All my files is in wwwroot\login folder and connection file is in wwwroot\login\connection folder
----------
Should the location be in quotes or something since the one dir has a dot (.) in "gkabayete.com"???
this is me
|
|
|
|
|
This isn't necessarily a connection string problem. Check this[^] out for more info. If you google the error message you'll find lots of pages which talk about it.
Josh
|
|
|
|
|
You looked in your web.config?
This line:
ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_GKAUser"]
says it gets it from there.
Regards,
Rob Philpott.
|
|
|
|
|
|
No.
Perhaps here: thread[^]
---
b { font-weight: normal; }
|
|
|
|
|
|
i have problem with next code - " could not found StringSplitOptions"
string text = "This is my string";
string[] words = text .Split(new char[1] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
TotalWords = words.Length;
is anybody knows how to deal wit hthe problem ?
eyalso
|
|
|
|
|
hi,
dont know how good is this method.i did like this last time
String tmp =Words;
do while(tmp.indexOf(" ")>0) // Do while you find two continuous spaces and remove those..
{
tmp = tmp.Replace(" "," ");
}
int TotalWords = tmp.Split(' ').Length;
Where there is a will,there is a way.
|
|
|
|
|
It's only in framework 2.0
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Best regards, Alexey.
|
|
|
|
|
how can i show scrollbars on picturebox, i dont want to show an image as streched. I like to show on normal mode. but sometimes image is bigger than picturebox sizes. so i cant see other pice of image .
|
|
|
|
|
Put PictureBox on Panel, set size of PictureBox equal to image size, and set Panel AutoScroll property to true.
Best regards, Alexey.
|
|
|
|
|
I have been researching ClickOnce deployment, and I am very curious to hear from a few folks who have actually used it and deployed with it and had remote users updated with it, and, hopefully, someone who has used some of the advanced technical capacities offered in it such as scripting.
thanks, Bill
"The greater the social and cultural distances between people, the more magical the light that can spring from their contact." Milan Kundera in Testaments Trahis
|
|
|
|
|
how do I convert a C# program into a windows installer? tips and advise would really really be of help.
or maybe there's a software i can use to change my C# program into an installer.
|
|
|
|
|
You should create a setup project for your application. Don't try to make your application install itself. Visual Studio has support for creating setup projects. There are many articles that show how to do it.
Josh
|
|
|
|
|
Hi all,
What is the best way to deal with the next problem:
I Have a ASP login page with codebehind C#
The user is allowed to login more then once on the same computer. But he is not allowed to login more than once on different computers.
should I keep record of it in a database with which ip address a user is logged in or are there other ways?
thanks in advance.
|
|
|
|
|
IP address will not work because the multiple computers could be behind a firewall that does Port Address Translation. The server cannot distinguish machines using IP address.
Even though I know that IP addresses won't work, I don't know what will.
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Curious though. Why do you have this strange requirement? Maybe, I can think of some solution if I understand the problem better.
modified 29-Aug-18 21:01pm.
|
|
|
|
|
It's for an intranet application. Everyone in our company has their own computer so normally they would only logon on one machine. Since every user has different roles it could be possible that someone stole a password to do things they're not allowed to. It's like msn messenger, it automaticly logs of on one computer when you login on another one. Except that we would like to make it impossible to login when the user is already logged in on another computer.
I hope this makes it a bit more clear.
|
|
|
|