|
Ohhh - I was not knowing. Thanks
|
|
|
|
|
(C# VS 2005)
I need a function to determine
If the OS is windows 2003 or 2008
Yes. CreatiVity withOuT limiTs
|
|
|
|
|
Don't double post, it's rude. Your question has already been answered in c# forum.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Dear All,
I need to implement STRPTIME function in the Windows Mobile.I downloaded the wcelibcex-1.0 library as it was posted here.But it couldnot be run on Windows Mobile 5.0.Please help me to find a soution.This stands same for the gmtime() function and ctime.
|
|
|
|
|
Dear sir ,
i have two windows forms one is recordvideoform another is insermadiaform.
bydefault i set the recorder video form at top-center of our window.
once the recorderform pops-up then i can drag it to any place of the window like left corner or right corner or bottom of the window. then the recorderform comes to the respective place.
in the recorderform i have one button "insertmedia" when i click on the button insertmedia-window will popup.( at this stage i have two windowsforms at my system) then i insert some images or videos to my recorderform. they will add to the recorderform.
problem: if i close the insertmwdia-window form then the recorderform goes to the default position i.e at top-center of the window.
expected result: i want my recorderform window to be at the same position where i place it before clcking the :insertmedia" button on the recorderform.( like left corner or bottom or right corner) after clicking close button of the insertmediaform.
|
|
|
|
|
Please don't repost the same issue. If you look really hard at the screen you will see that it's the thread below this one.
|
|
|
|
|
Dear sir ,
i have two windows forms one is recordvideoform another is insermadiaform.
bydefault i set the recorder video form at top-center of our window.
once the recorderform pops-up then i can drag it to any place of the window like left corner or right corner or bottom of the window. then the recorderform comes to the respective place.
in the recorderform i have one button "insertmedia" when i click on the button insertmedia-window will popup.( at this stage i have two windowsforms at my system) then i insert some images or videos to my recorderform. they will add to the recorderform.
problem: if i close the insertmwdia-window form then the recorderform goes to the default position i.e at top-center of the window.
expected result: i want my recorderform window to be at the same position where i place it before clcking the :insertmedia" button on the recorderform.( like left corner or bottom or right corner) after clicking close button of the insertmediaform.
|
|
|
|
|
balaji_vbr wrote: i want my recorderform window to be at the same position where i place it before clcking the :insertmedia" button on the recorderform.( like left corner or bottom or right corner) after clicking close button of the insertmediaform
Then find out the Size and Position of the window and record it somewhere. When your form opens again retrieve the information and set the Size and Position properties to the appropriate values.
|
|
|
|
|
when i open the button standard dialogbox opend
but how to find the size,filename,dateof the selected file
in the textboxes which i created in form
|
|
|
|
|
Do not crosspost. Btw, I answered this in VB.NET forum.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Hi when i set the backcolor to transparent when i run my form, the form run slow and the backcolor label jump and after it set in transparent.how i can repair this?how can i do? Thanks
|
|
|
|
|
If you have just one label that you are setting the backcolor to transparent that shouldn't be causing the form to run slow. You can either set the label's backcolor to transparent in design so that when the form first displays it is already transparent or you can set the label's visible property to false in design, and then in your code you can set the backcolor to transparent and then the visible to true. This will stop it from first appearing with a color and then turning transparent on the screen as the form loads.
Hope this helps.
|
|
|
|
|
Create you own custom control that handles its own paint routines.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Dear sir,
i have a require ment to cut the corners of the form .
i have a windows form with a shape square.& i have a background image for that
i want to cut the corners of the form along with the back ground image.
for that i have one algorithm , I have written it in the form_paint event .
but it is not cut the corners.
i paste the code here.
---------------------------------------------
private void RecordForm_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
//"E:\\covideo\\Recorder - Code\\CoVideo Libraries\\Rebrand Control\\Rebrand Control\\Resources\\main_bg2.png"
//Graphics g = e.Graphics; ;
//// Rectangle mainRect = new Rectangle(0, 0, 578, 470);
//Rectangle mainRect = new Rectangle(0, 0, 650, 500);
//Region mainRegion = new Region(mainRect);
//e.Graphics.SetClip(mainRegion, CombineMode.Replace);
///* Clip top left side curve region and exclude it.*/
//Point point1 = new Point(0, 33);
//Point point2 = new Point(11, 17);
//Point point3 = new Point(23, 6);
//Point point4 = new Point(35, 0);
//// Create an array of the points.
//Point[] curvePoints = { point1, point2, point3, point4 };
//// Create a GraphicsPath object and add a curve.
//GraphicsPath myPath1 = new GraphicsPath();
//myPath1.AddCurve(curvePoints, 0, 3, 0.8f);
//myPath1.AddLine(35, 0, 0, 0);
//// Exclude the clipped region
//Region ExcludeRegion1 = new Region(myPath1);
//e.Graphics.ExcludeClip(ExcludeRegion1);
///* Clip top right side curve region and exclude it.*/
//GraphicsPath myPath2 = new GraphicsPath();
//point1.X = 539; point1.Y = 0;
//point2.X = 555; point2.Y = 9;
//point3.X = 569; point3.Y = 23;
//point4.X = 577; point4.Y = 37;
//Point[] curvePoints2 = { point1, point2, point3, point4 };
//myPath2.AddCurve(curvePoints2, 0, 2, 0.8f);
//myPath2.AddLine(577, 37, 577, 0);
//Region ExcludeRegion2 = new Region(myPath2);
//e.Graphics.ExcludeClip(ExcludeRegion2);
///* Clip bottom left side curve region and exclude it.*/
//GraphicsPath myPath3 = new GraphicsPath();
//point1.X = 0; point1.Y = 428;
//point2.X = 8; point2.Y = 446;
//point3.X = 20; point3.Y = 461;
//point4.X = 37; point4.Y = 469;
//Point[] curvePoints3 = { point1, point2, point3, point4 };
//myPath3.AddCurve(curvePoints3, 0, 2, 0.8f);
//myPath3.AddLine(37, 469, 0, 469);
//Region ExcludeRegion3 = new Region(myPath3);
//e.Graphics.ExcludeClip(ExcludeRegion3);
///* Clip bottom right side curve region and exclude it.*/
//GraphicsPath myPath4 = new GraphicsPath();
//point1.X = 542; point1.Y = 469;
//point2.X = 556; point2.Y = 463;
//point3.X = 571; point3.Y = 449;
//point4.X = 577; point4.Y = 439;
//Point[] curvePoints4 = { point1, point2, point3, point4 };
//myPath4.AddCurve(curvePoints4, 0, 2, 0.8f);
//myPath4.AddLine(577, 439, 577, 469);
//Region ExcludeRegion4 = new Region(myPath4);
//e.Graphics.ExcludeClip(ExcludeRegion4);
//e.Graphics.DrawImage(img, 0, 0, 577, 469);
//e.Graphics.ResetClip();
}
------------------------------------------------------------------
it is not working please help me.
|
|
|
|
|
dear sir,
i have two forms one is login form & recorder form.
1.in login form i import the record from class and i create one obj for that i initialise with new record form class.
in btnLogin click
i call the method rcf.show(); // here the recorder form open
this.hide(); // here the login form closed
2. then the recorderform_lad event fire
3.afetr that recorderform_paint will fire.
4. after this again the program counter come to the recorderform_paint is firing
5. why it again will fire i didnt understand please help me.
|
|
|
|
|
Dear sir ,
this is balaji working as software engineer in innobox, in india. i have problem regarding the paint event.
step1: i have a login screen when i click on login it show a recorder form to record our video.
this is th code i have written in the login button
----------------------------------------------------------------------
private void btnLogin_Click(object sender, EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
tbLogin.Enabled = false;
tbPassword.Enabled = false;
btnLogin.Enabled = false;
btnCancel.Enabled = false;
CurrentUser.rf = rcf;
//if (Communicator.GetUserInfo(tbLogin.Text, tbPassword.Text, rebrandLoginForm.label1)) {
System.Windows.Forms.Label lblName = new Label();
lblName.Text = "idle";
if (Communicator.GetUserInfo(tbLogin.Text, tbPassword.Text, lblName))
{
//Rebrand_Control.UsersInformation.CustomerID = CurrentUser.CustomerID;
//Rebrand_Control.UsersInformation.UserID = CurrentUser.UserID;
//Rebrand_Control.UsersInformation.Username = CurrentUser.Username;
//Rebrand_Control.UsersInformation.Password = CurrentUser.Password;
//Rebrand_Control.UsersInformation.ResellerID = CurrentUser.ResellerID;
//Rebrand_Control.UsersInformation.AccessLevel = CurrentUser.AccessLevel;
//Rebrand_Control.UsersInformation.PLS = CurrentUser.PLS;
//Rebrand_Control.UsersInformation.PlaybackURL = CurrentUser.PlaybackURL;
//Rebrand_Control.UsersInformation.ResellerAdmin = CurrentUser.ResellerAdmin;
//Rebrand_Control.UsersInformation.isPremium = CurrentUser.IsPremium;
//rebrandLoginForm.GetRebrandImages(tbLogin.Text, tbPassword.Text);
//rebrandLoginForm.label1.Text = "Status: Loading Graphics...";
//while (!rebrandLoginForm.gotRebrandedImages)
//{
// Application.DoEvents();
//}
rcf.Show();
this.Hide();
}
else
{
MessageBoxForm mbf = new MessageBoxForm("Username or Password incorrect. Please try again.");
mbf.ShowDialog(this);
tbLogin.Enabled = true;
tbPassword.Enabled = true;
btnLogin.Enabled = true;
btnCancel.Enabled = true;
// focus on login box
tbLogin.SelectAll();
this.ActiveControl = tbLogin;
}
this.Cursor = Cursors.Default;
}
step:2 afetr login the recordform_load evevnt will fire
this is the code
--------------------------------------------------------
this.Location = new Point(this.Location.X, SystemInformation.WorkingArea.Top);
//this.Text = Rebrand_Control.UsersInformation.ProperTitle + " - Record Video";
//this.Icon = Rebrand_Control.UsersInformation.ProperIcon;
lblName.Text = CurrentUser.FirstName + " " + CurrentUser.LastName;
lblVersion.Text = "Version 6.8";
lblTimeAvailableTimer.Text = CurrentUser.TimeLeft;
if (CurrentUser.SecondsLeft == 0)
{
MessageBoxForm mbf = new MessageBoxForm("You have reached your recording time limit. Remove old videos to free up more time.");
mbf.ShowDialog(this);
this.pbStartRecording.Enabled = false;
}
else if (CurrentUser.SecondsLeft < 60)
{
MessageBoxForm mbf = new MessageBoxForm("You have less than one minute of recording time left. Remove old videos to free up more time.");
mbf.ShowDialog(this);
}
// delete old videos
string[] files = System.IO.Directory.GetFiles(Application.StartupPath, "*.wmv");
foreach (string file in files)
{
System.IO.File.Delete(file);
}
string[] tfiles = System.IO.Directory.GetFiles(Application.StartupPath, "*.jpg");
foreach (string file in tfiles)
{
System.IO.File.Delete(file);
}
string[] tfiles2 = System.IO.Directory.GetFiles(Application.StartupPath, "*.gif");
foreach (string file in tfiles2)
{
System.IO.File.Delete(file);
}
string[] tfiles3 = System.IO.Directory.GetFiles(Application.StartupPath, "*.bmp");
foreach (string file in tfiles3)
{
System.IO.File.Delete(file);
}
string[] tfiles4 = System.IO.Directory.GetFiles(Application.StartupPath, "*.avi");
foreach (string file in tfiles4)
{
System.IO.File.Delete(file);
}
string[] tfiles5 = System.IO.Directory.GetFiles(Application.StartupPath, "*.mod");
foreach (string file in tfiles5)
{
System.IO.File.Delete(file);
}
string[] tfiles6 = System.IO.Directory.GetFiles(Application.StartupPath, "*.mpg");
foreach (string file in tfiles6)
{
System.IO.File.Delete(file);
}
pbStartRecording.Enabled = true;
LoadScripts();
step 3: after this the paint event i.e private void RecordForm_Paint(object sender, System.Windows.Forms.PaintEventArgs e) it will fire
it is executed. i put a break point at this event then i press f10 after execution of this event the program counter again comes to the paint event. it loops in this event infinitly.
even if i press f5 then also it is in the same event.
if i remove the break point then execute it will show the output but the code what i written in the paint doesnt cut the corners of the screen.
the code i have written in the paint event to cut the corners of the windowform as well as img which is on the top of the form.
the code is
--------------------------------------------------------
Graphics g = e.Graphics;
// Rectangle mainRect = new Rectangle(0, 0, 578, 470);
Rectangle mainRect = new Rectangle(0, 0, 650, 500);
Region mainRegion = new Region(mainRect);
e.Graphics.SetClip(mainRegion, CombineMode.Replace);
/* Clip top left side curve region and exclude it.*/
Point point1 = new Point(0, 33);
Point point2 = new Point(11, 17);
Point point3 = new Point(23, 6);
Point point4 = new Point(35, 0);
// Create an array of the points.
Point[] curvePoints = { point1, point2, point3, point4 };
// Create a GraphicsPath object and add a curve.
GraphicsPath myPath1 = new GraphicsPath();
myPath1.AddCurve(curvePoints, 0, 3, 0.8f);
myPath1.AddLine(35, 0, 0, 0);
// Exclude the clipped region
Region ExcludeRegion1 = new Region(myPath1);
e.Graphics.ExcludeClip(ExcludeRegion1);
/* Clip top right side curve region and exclude it.*/
GraphicsPath myPath2 = new GraphicsPath();
point1.X = 539; point1.Y = 0;
point2.X = 555; point2.Y = 9;
point3.X = 569; point3.Y = 23;
point4.X = 577; point4.Y = 37;
Point[] curvePoints2 = { point1, point2, point3, point4 };
myPath2.AddCurve(curvePoints2, 0, 2, 0.8f);
myPath2.AddLine(577, 37, 577, 0);
Region ExcludeRegion2 = new Region(myPath2);
e.Graphics.ExcludeClip(ExcludeRegion2);
/* Clip bottom left side curve region and exclude it.*/
GraphicsPath myPath3 = new GraphicsPath();
point1.X = 0; point1.Y = 428;
point2.X = 8; point2.Y = 446;
point3.X = 20; point3.Y = 461;
point4.X = 37; point4.Y = 469;
Point[] curvePoints3 = { point1, point2, point3, point4 };
myPath3.AddCurve(curvePoints3, 0, 2, 0.8f);
myPath3.AddLine(37, 469, 0, 469);
Region ExcludeRegion3 = new Region(myPath3);
e.Graphics.ExcludeClip(ExcludeRegion3);
/* Clip bottom right side curve region and exclude it.*/
GraphicsPath myPath4 = new GraphicsPath();
point1.X = 542; point1.Y = 469;
point2.X = 556; point2.Y = 463;
point3.X = 571; point3.Y = 449;
point4.X = 577; point4.Y = 439;
Point[] curvePoints4 = { point1, point2, point3, point4 };
myPath4.AddCurve(curvePoints4, 0, 2, 0.8f);
myPath4.AddLine(577, 439, 577, 469);
Region ExcludeRegion4 = new Region(myPath4);
e.Graphics.ExcludeClip(ExcludeRegion4);
e.Graphics.DrawImage(img, 0, 0, 577, 469);
e.Graphics.ResetClip();
please help me.asap.
balaji
|
|
|
|
|
Paint events are tricky to debug because the debugger keeps popping up and sending the application window to the background, so it needs repainting again when it regains the focus. One way around this problem is to use remote debugging - run the application on one computer and the debugger on the other.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Or have two monitors....
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
sir ,
how can i repaint it again focus in the same event
please hellp me sir
|
|
|
|
|
Hi,
i have a problem and i hopr you can help me,
i want to create a user control with textbox and listbox. the listbox is binded to a collection and it works as autocomplete of the text box. i did some search and i found some solution but i still have the problem which is i want the list to be appeare outside of the usercontrol and be almost as popup list because if i make the usercontrol hieght to be the hieght of the list then the space with other controls in the form will be large.most of solutions suggest to use form as popup of the control and put the list on the popupform, its not work because the focus will be lost from the main form when user navigate through the list and have alot of problems when to show/Hide the popup control.
what i want is almost to make a control just like the combobox with its items dropDown list.
please i need help its too urgent
|
|
|
|
|
iam Manageing windows application in c# , looking browse and upload functionality sourcecode. Thanks
|
|
|
|
|
|
This is not a suitable request for a free website, if you want someone to do your work, you need to pay them.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
i want to have a different for text for every new line.
|-----------------------------------|
| this line red |
| this line blue |
| this line orange |
| |
| |
|___________________________________|
|
|
|
|
|
Look up the RTF specification? Rich Text has mark up that lets you format it.
|
|
|
|
|