|
Sajjad Leo wrote: no overload for method 'open' takes '12' arguments
then thats your problem. Do you not understand that simple message?
if your IDE doesnt help with params then search for the function signature on google. you should find that the Open function wants 15 params, 3 more (15 - 12) than you are giving it
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
ok i am trying to find more three but do you any idea then tell me
well thanx ....
|
|
|
|
|
your problem is that you are passing too many parameters in the open method. Use intellisense to find out what parameters the method accepts.
|
|
|
|
|
Hi All,,
I Want To Get The Date Of All Friday Days In the Year
How Can I Do That,,,,
void GetAllFridayDate(2009)
{
return allFridayDate
}
|
|
|
|
|
Hi,
initialize a DateTime with the first of January. Then check if this is a Friday, if not add one day with AddDays(1) and check if this is a Friday. Do this until you get the first Friday within the year. Then add 7 days as long as the date is within the year. This will give you all Fridays of the passed year.
Regards
Sebastian
|
|
|
|
|
please can you help Me by a code
|
|
|
|
|
Hes told you what you need to do, its up to you to code it! If you don't know how to check what day of the week it is, try hitting F1 from within the ide when you have hightlighted DateTime
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Come on, don't be a noob here.
He gave you all, and really ALL the steps you need to get all the friday's of a year.
But you probably don't even know the basics, so I'd say: do a beginners tutorial. Specially for you I've typed it in google and got the first link for you: here[^]
|
|
|
|
|
Not code, but if you cannot work this into code then i suggest you forget what your trying to do and start learning programming from the beginning...
create collection of DateTimes.
create DateTime as first of january for the desired year(from you param).
Start while loop.
if the year value of your DateTime is not the year value of your param then break the loop.
check if day if friday, if it is then store date in collection, then add 7 days to the DateTime.
else add oneDay.
end the loop.
return the collection.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Yes, here you are the code: #124fg@@!w .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi guys,
I´m gonna create a new project but I don´t now what technology I can use, because it´s a project that´s gonna have a dynamic menu, I´m gonna use PostGree DataBase, and I´m want to use ASP.Net C# ou VB...
Someone has some opinion about the architecture? For example: I´m thinking to use MVC framework... but I don´t know if it´s a better way..
Thanks a lot
|
|
|
|
|
Didn't work with the MVC yet, but it looks nice...
I think it all depends on your own favors, what you know already and if you have the time to learn something new.
Regards
Sebastian
|
|
|
|
|
There are many ways, and many patterns which you can use. But if I was in your place, I'd use the MVC model. It's simple and I guess it fits your requirements.
|
|
|
|
|
Can anyone know how to add a dropdownlist or a label inside a table that declare dynamically?
Here the code of what I understand.
Inside the HTML tag
<form id="Form1" action="TEST.aspx" runat="server"></form>
Inside the script tag using C#
void Page_Load(Object s, EventArgs e)
{
Table elbat = new Table();
TableRow record = new TableRow();
TableCell column = new TableCell();
Label ttt = new Label();
ttt.Text = "B";
column.Text = "A";
record.Controls.Add(column);
elbat.Controls.Add(record);
Form1.Controls.Add(elbat);
}
Basically, by doing
record.Controls.Add(ttt) cant be done with that
Thanks, in advance
|
|
|
|
|
hi
Does textbox have Autosize property?
one interesting subject
when i use Autosize property in win app there is but when i use in class library project there is not any property that named AutoSize
????
???
??
?
.
|
|
|
|
|
behzadcp wrote: Does textbox have Autosize property?
Nope.
behzadcp wrote: when i use Autosize property in win app there is but when i use in class library project there is not any property that named AutoSize
You might have mixed up classes. Are you using a label, or mayhaps setting the Form.AutoSize property by accident?
behzadcp wrote: ????
???
??
?
.
If you're lost, you can always check MSDN for information on the TextBox[^] component.
I are troll
|
|
|
|
|
No there isnt any inbuilt 'AutoSize' property for textbox but you can do some tricks. Here is one
write the following code in TextChanged and FontChanged events of TextBox.
Graphics g = Graphics.FromHwnd(IntPtr.Zero);
TextBox.Size = g.MeasureString(TextBox.Text, TextBox.Font).ToSize();
g.Dispose();
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
behzadcp wrote: Does textbox have Autosize property?
No.
behzadcp wrote: when i use Autosize property in win app there is but when i use in class library project there is not any property that named AutoSize
Not possible. The TextBox class is same be it win app or a class library.
Moreover, why would you need that?
With textboxes, you can always make it multiline, set WordWrap to true and set scrollbars property to Vertical.
If you need to grow/shrink the textbox with increase/decrease in the size of its container, then you should employ anchoring and docking.
जय हिंद
|
|
|
|
|
i am getting image based slideshow by using image list and picture box. i want it to make it more dynamic and flexible... I tried using "System.IO.Directory.GetFiles("C://MyPictures")"......So tat image files (after specifying the extension also ("*.jpeg"))can be extracted from the directory and be displayed as slideshow.....But its kinda not working out for me....need help !!!
**************************************************************************************
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
timer1.Interval = 3000;
timer1.Enabled = true;
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
System.IO.DirectoryInfo dirInfo=new System.IO.DirectoryInfo("C://Images");
System.IO.FileInfo[] files=dirInfo.GetFiles("*.jpeg");
if(files!=null)
{
foreach(System.IO.FileInfo file in files)
{
pictureBox1.Image=Image.FromFile(file);
}
}
}
}
}
|
|
|
|
|
Hi,
Do you get a sepcific error message during comilation/runtime?
Try to use
<br />
pictureBox1.Image = Image.FromFile(file.FullName);<br />
FromFile accepts only the filename, not the FileInfo.
Regards
Sebastian
|
|
|
|
|
The most obvious thing here is that by putting all of the file fetching code inside the ontick handler, each time it fires, it gets all the files again and shows the first one every time (I think).
My suggestion, move
System.IO.DirectoryInfo dirInfo=new System.IO.DirectoryInfo("C://Images");
files=dirInfo.GetFiles("*.jpeg");
into Form_Load(), or other suitable place.
create System.IO.FileInfo[] files = null; as a field of the form.
add an index field int index = 0; as well.
Then in your ontick handler
if (files != null)
{
if (index >= files.Length)
{
timer1.Enabled = false;
}
else
{
pictureBox1.Image=Image.FromFile(files[index++]);
pictureBox1.Image=Image.FromFile(files[index++].FullName);
}
}
[MOD]
Realized I had forgotten the '.FullName' property
[/MOD]
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
modified on Thursday, March 26, 2009 4:49 PM
|
|
|
|
|
dude d slideshow stops after d last image is read !!!
i want d slideshow to run continously .....plz help !!
|
|
|
|
|
i want d slideshow to execute continously in a repeated fashion and not stop after reading the last image. Is there any way i can do it ??
|
|
|
|
|
OK.
It's hard to be certain without seeing your code, but something like this should work.
Change the code of the ontick handler so it looks something like this:
if (files != null)
{
if (index >= files.Length)
{
timer1.Enabled = false;
index = 0;
}
else
{
pictureBox1.Image=Image.FromFile(files[index++].FullName);
}
}
All that this does, is detect when the last image has been used and resets the index back to the start.
Hope this helps.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I'm getting a NullReferenceException from the line "notify.SetNotificationPositions(bpnArray,3);" in the code below anyone got any idears.
code:
buffer = new Microsoft.DirectX.DirectSound.Buffer(bufferDescription, playbackDevice);<br />
<br />
bufferHalfEmptyEvent = new AutoResetEvent(false);<br />
<br />
bufferSize = buffer.Caps.BufferBytes;<br />
<br />
sinusBuffer = new MemoryStream(waveFormat.BlockAlign * waveFormat.SamplesPerSecond);<br />
<br />
BufferPositionNotify bufferOneThridPointNotify = new BufferPositionNotify();<br />
bufferOneThridPointNotify.Offset = bufferSize / 3 - 1;<br />
bufferOneThridPointNotify.EventNotifyHandle = bufferHalfEmptyEvent.Handle;<br />
BufferPositionNotify bufferTwoThridPointNotify = new BufferPositionNotify();<br />
bufferTwoThridPointNotify.Offset = (2*bufferSize / 3) - 1;<br />
bufferTwoThridPointNotify.EventNotifyHandle = bufferHalfEmptyEvent.Handle;<br />
BufferPositionNotify bufferEndPointNotify = new BufferPositionNotify();<br />
bufferEndPointNotify.Offset = bufferSize - 1;<br />
bufferEndPointNotify.EventNotifyHandle = bufferHalfEmptyEvent.Handle;<br />
<br />
BufferPositionNotify[] bpnArray = new BufferPositionNotify[3];<br />
bpnArray[0] = bufferOneThridPointNotify;<br />
bpnArray[1] = bufferTwoThridPointNotify;<br />
bpnArray[2] = bufferEndPointNotify;<br />
Notify notify = new Notify(buffer);<br />
notify.SetNotificationPositions(bpnArray, 3);
|
|
|
|