|
yea! tongue-in-cheek....
|
|
|
|
|
Fixed. Thanks.
(remember its Friday evening here already )
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
I put this question not as a programmer.
I want someone to develop my website.
does .net is more advance than php.
search engine optimization is good for .net or php site
Which one you suggest
Also should i select static website or dynamic website by considering below points
performance,speed,page load time,search engine optimization etc
|
|
|
|
|
Noone here is going to write your site for you.
There is no one best web server/language combination that beats everything else. Performance is highly dependant on the person writing the site and they're knowledge, as well as the setup and administration of the web server(s), the database setup, design of the database, design of the app, ...
What gets used is far more dependant on your applications requirements, not the language that it's written in.
|
|
|
|
|
MKC002 wrote: Please suggest should i go for website development in asp.net or php.
Well, go with the one you are most comfortable with
MKC002 wrote: Since linux server does not support .net
have you heard of Mono
MKC002 wrote: I do not have idea about which server is more secure (linux or windows)
Both are as secure as you can properly secure them. Even the most secure platform can be compromised if not properly configured.
MKC002 wrote: Also which website provides better performance aspx or php
define Better. better in what? in performance, in maintainability, in coding, ....
|
|
|
|
|
performance. page load time in website etc
|
|
|
|
|
hi
how Communicated program with the lan to devices (for example plc)(a device that converts analog code to digital code)
|
|
|
|
|
|
hey friends..i display only one column in my datagrid and i want to make a search in it and i want to make that search by using stored procedure and i wrote a procedure for it..like below
ALTER procedure sp_SearchFirm
(
@aranan_firma nvarchar(50)
)
as
Begin
Select firma_adi From Firmalar Where firma_adi=@aranan_firma
End
and i have a DataAccessLayer class..in that class i wrote a method to work with that proc.like below
public DataSet SearchFirms(string aranan_firma)
{
try
{
cmd = new SqlCommand("sp_SearchFirm", con);
cmd.CommandType = System.Data.CommandType.StoredProcedure;
cmd.Parameters.Add("@aranan_firma", System.Data.SqlDbType.NVarChar).Value = aranan_firma;
con.Open();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
con.Close();
}
}
i try to return a DataSet to make it as source of datagrid i have in my main form..as u see i cant complete the method but the problem is that i didnt work with multilayer programming before and i cant find the right logic to make that search event and i dont know if i am on the right way or should i change my method i dont know.i will be pleased with any of your suggestion and idea..
|
|
|
|
|
How are you triggering the search, a button click, or perhaps textchange event? There is plenty of information availble on n-teir development, what have you researched so far? In a typical senerio the search event will call a business logic class, which will do any preprocessing or validation then pass the request to the data layer class which returns to the business class for any additional post processing of validation then back to the object making the call.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi friend...as u guessed i trigger the search with textbox change event..and in another question i have a Helper class but i couldnt imagine how i interact that two classes with each other to make a search..as i understand u ask that
|
|
|
|
|
If you don't understand how to use two class together then you have a quite a bit more to learn than can be explained here.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
i meant i couldnt complete the logic only for that search and to interact that two classes
|
|
|
|
|
|
I replied to you in the Quick Answers forum. Why are you now asking the same question in a different forum?
This is called cross-posting and is considered rude.
If you did not understand my previous answer then respond to it saying so and saying why.
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.”
|
|
|
|
|
This is my code.I was asked to draw a rectangle on the picture box.When i run the program,i can only draw the rectangle on the form but not the picture box.Kindly assist as i am a first timer to C#.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
Boolean bHaveMouse;
Point ptOriginal = new Point();
Point ptLast = new Point();
public void MyMouseDown(Object sender, MouseEventArgs e)
{
bHaveMouse = true;
ptOriginal.X = e.X;
ptOriginal.Y = e.Y;
ptLast.X = -1;
ptLast.Y = -1;
}
private void MyDrawReversibleRectangle(Point p1, Point p2)
{
Rectangle rc = new Rectangle();
p1 = PointToScreen(p1);
p2 = PointToScreen(p2);
if (p1.X < p2.X)
{
rc.X = p1.X;
rc.Width = p2.X - p1.X;
}
else
{
rc.X = p2.X;
rc.Width = p1.X - p2.X;
}
if (p1.Y < p2.Y)
{
rc.Y = p1.Y;
rc.Height = p2.Y - p1.Y;
}
else
{
rc.Y = p2.Y;
rc.Height = p1.Y - p2.Y;
}
ControlPaint.DrawReversibleFrame(rc,
Color.Black, FrameStyle.Thick);
}
public void MyMouseUp(Object sender, MouseEventArgs e)
{
bHaveMouse = false;
ptLast.X = -1;
ptLast.Y = -1;
ptOriginal.X = -1;
ptOriginal.Y = -1;
}
public void MyMouseMove(Object sender, MouseEventArgs e)
{
Point ptCurrent = new Point(e.X, e.Y);
if (bHaveMouse)
{
if (ptLast.X != -1)
{
MyDrawReversibleRectangle(ptOriginal, ptLast);
}
ptLast = ptCurrent;
MyDrawReversibleRectangle(ptOriginal, ptCurrent);
}
}
protected override void OnLoad(System.EventArgs e)
{
MouseDown += new MouseEventHandler(MyMouseDown);
MouseUp += new MouseEventHandler(MyMouseUp);
MouseMove += new MouseEventHandler(MyMouseMove);
bHaveMouse = false;
}
}
}
|
|
|
|
|
Please clarify. When you say you cannot draw the rectangle on the picturebox what happens when you drag within the picturebox? Where is the rectangle drawn?
Also does it have to be a ReversibleFrame or will a normal rectangle do?
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.”
|
|
|
|
|
sorry i'm a first timer so please forgive me.
when i drag with the picturebpx to draw a rectangle nothing happen but when i drag it from the form across the picturebox i'm able to draw.
but now i'm asked the draw the rectangle inside the picturebox so this is the problem.
a normal rectangle will do i can do the reversibleFrame myself. thanks
|
|
|
|
|
You need to make your event handlers point to the picture box:
protected override void OnLoad(System.EventArgs e)
{
this.pictureBox1.MouseDown += new MouseEventHandler(MyMouseDown);
this.pictureBox1.MouseUp += new MouseEventHandler(MyMouseUp);
this.pictureBox1.MouseMove += new MouseEventHandler(MyMouseMove);
bHaveMouse = false;
}
Also where you set the points:
private void MyDrawReversibleRectangle(Point p1, Point p2)
{
Rectangle rc = new Rectangle();
p1 = this.pictureBox1.PointToScreen(p1);
p2 = this.pictureBox1.PointToScreen(p2);
.......................
.......................
.......................
.......................
}
When the mouse is up, the rectangle will disappear you therefore need to draw a rectangle using the OnPaint event of your picturebox.
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.”
|
|
|
|
|
The scope of your mouse event handler is based on the form - that's what you specified when you hooked it up in your OnLoad. Change the scope there to be the picture box and you'll be good to go - to do this, change
MouseDown += new MouseEventHandler(MyMouseDown); to
picDrawing.MouseDown += new MouseEventHandler(MyMouseDown); (Assuming you named your picture box picDrawing).
|
|
|
|
|
I have a program from which I am calling a subordinate form with the axmediaplayer name axWMP.
I want the subordinate form to run from the keyboard but the key strokes are not seen unless I click on the form. It seems that the form loses focus because the keys strokes go to my compiler not the form.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace IRmediacontrol
{
public partial class WMP : Form
{
string fname = "";
public WMP(string filename)
{
InitializeComponent();
fname = filename;
}
private void axWMP_KeyPressEvent(object sender, AxWMPLib._WMPOCXEvents_KeyPressEvent e)
{
label1.Text = "key press = " + e.nKeyAscii.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
axWMP.URL = fname;
axWMP.Ctlcontrols.play();
}
}
}
Any help would be appreciated!
modified on Thursday, October 14, 2010 7:16 PM
|
|
|
|
|
Just add
axWMP.Focus(); after you make the .play() call.
|
|
|
|
|
I had tried that prior to the .Play call and it didn't work. Your suggestion solved the problem.
Many Thanks.
|
|
|
|
|
Please mark his answer as the right answer (by clicking on the Good Answer link).
|
|
|
|
|