|
In my previous example, the abstract B results in an error if it doesn't contain method A.A() .
So I guess it is necessary to implement an interface even in an abstract class
|
|
|
|
|
My earlier answer wasn't quite as correct as I would have preferred.
You need the abstract stub, but it's still not an implementation.
|
|
|
|
|
I built a small little application that every time a certain extension is clicked on, this application opens the file. On my website when you click on certain links it returns this file extension and in IE & Firefox they both prompt me on what to do with the file. I would like them to not prompt me and just open the file in the default application that is assigned to that extension in windows.
Can someone help me figure this out?
|
|
|
|
|
Brad Wick wrote: I would like them to not prompt me and just open the file in the default application that is assigned to that extension in windows.
Then tell Windows what you want it to do with them.
|
|
|
|
|
I did. If I have a file on my desktop and I double click on it, it opens my application and displays the contents of the file. When IE locates this extension, then it asks me if I want to Open, Save or Cancel. I want it to always just open this type of file.
|
|
|
|
|
Then I don't know; it works for me.
|
|
|
|
|
I designed a test.rpt file in VS2005, the test.rpt contains a picturebox on the PageHeader, Now I want to know how to unload a image file to this picturebox in C#2005? (Pls pay attention to the pictureBox is in the PageHeader section)
Thanks all in advance!
|
|
|
|
|
Dear all, who can me help on it?
thanks!
|
|
|
|
|
Hi,
I have created a file association in my C# program, but it just opens my program and doesnt actually load the file. What should I do?
Thanks,
|
|
|
|
|
your app will get launched and the file will be in the CommandLine arguments.
Use one of:
- the args parameter of static Main
- Environment.GetCommandLineArgs()
and add code to open the file.
BTW: if you select multiple files in Win Explorer and double-click one of them, they
will all appear (in random order) as command line args.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Luc Pattyn :tank so much
it was very good.
|
|
|
|
|
Hi,
This is pretty complex for me. I have 2 tables city_master(cityid,cityname) and zone_master(zoneid,zonename). I have bound the data to 2 separate dropdown lists. Now I want to insert the values selected from these 2 lists into another table city_zone(cityid,zoneid). How is this possible?
Can someone help me asap?? plsssssssssss
Regards,
Anuradha
|
|
|
|
|
This is basic SQL, which bit is confusing you ? I recommend buying a book on SQL if the SQL is the issue, or just read one of the many articles online, b/c what you're asking for is basic SQL. If some other aspect is the issue, what is it ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I myself am surprised what the error could be, as I know this is basic SQL. I have tried to trace it with Response objects, but no clue. It just says foreign key constraint conflicts.
regards,
Anuradha
|
|
|
|
|
Hello, all. I've come to codeproject once again to discuss a custom form, but I understand the concept much more. But, I just can't get the algorithm to make the form stay at the mouse's location while moving, you know, while clicking and holding the top bar. It's probably really sime, but here's what I have so far. If anyone could assist, it would be greatly appreciated. Thanks in advance!
*assuming FormBar is the bar at the top of the form you can move round with.
* there are probably a LOT of beginner errors in here; if you try to correct me (you will), please help me understand.
public bool Moving = false;<br />
public Point xy;<br />
<br />
private void FormBar_MouseDown(object sender, MouseEventArgs e)<br />
{<br />
Moving = true;<br />
xy = MousePosition;<br />
}<br />
<br />
private void FormBar_MouseMove(object sender, MouseEventArgs e)<br />
{<br />
int x1, y1, x, y, x2, y2;<br />
x1 = this.Location.X;<br />
y1 = this.Location.Y;<br />
x = MousePosition.X;<br />
y = MousePosition.Y;<br />
x2 = xy.X;<br />
y2 = xy.Y;<br />
<br />
if (Moving == true)<br />
{<br />
this.Location = new System.Drawing.Point(x - (x2 - 50), y - (y2 - 50));<br />
}<br />
}<br />
<br />
private void FormBar_MouseUp(object sender, MouseEventArgs e)<br />
{<br />
Moving = false;<br />
}<br />
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
this.Close();<br />
}
The most knowledge doesn't mean the most wise...
|
|
|
|
|
MasterSharp wrote: int x1, y1, x, y, x2, y2;
x1 = this.Location.X;
y1 = this.Location.Y;
x = MousePosition.X;
y = MousePosition.Y;
x2 = xy.X;
y2 = xy.Y;
Declare them as you set their values, i.e. int x1 = this.Location.X;
MasterSharp wrote: public bool Moving = false;
public Point xy;
Make these private if at all possible
MasterSharp wrote: x2 = xy.X;
y2 = xy.Y;
This is superfluous, just use the xy values.
MasterSharp wrote: xy = MousePosition;
What is mousePosition ? The event args has the current mouse pos.
What you want to do is this:
store the current mouse pos from the event args in mouse down.
On mouse move, move the form by the difference between the mouse pos in the event args and the one you stored, and then store the pos from the args over the pos you stored before, so that next time you again move by how much the mouse moved between events.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi
I want to embed the Windows Media Player to my C# win app
I did it successfully.
and I know that for changing it's skin, have to use of 'IWMPRemoteMediaServices.GetCustomUIMode' method.
but I can not find this method at all.
I do not know how can select a desired skin for my WMP object in my application.
anybody help me ?!
-- modified at 16:09 Sunday 21st October, 2007
H.R
|
|
|
|
|
Hello Friends,
I need your help setting up a DataGrid. I have this DataGrid, and I want the following
options to be available on it, some I got working, and some only work if I disable another option. How can I get all of these options to be available on my DataGrid?
1) I want to be able to select a single line, or multiple lines. This by clicking on one cell in the
row. I want it to become blue, like when selecting text. If I click control or shift, it will select multiple rows.
This in order to remove rows from the grid.
2) I want to be able to sort the list by a specific coloumn in it.
3) I want the height of the row to be determined by the amount of text inside it. thus if the text in a specific cell in a row takes a bigger space than the default row height, that row's height will be enlarged.
Imagine this situation on a Word's table; if you enter
a big amount of text in a cell, that entire row's height enlarges.
4) Something I don't want - when you click on a cell, the text inside it becomes blue (only in that specific cell) and its format is changed.
e.g if I have:
"This is a
Nice line"
if I click on it it becomes blue and the text becomes "This is aNice line"
I never want the text's format to change.
The problems I have: if I "enable=false" the DataGrid, I get no event for a click on it
thus I can't select it (i.e turn it blue).
I'm very sorry for this over-sized message and I would really appreciate your help.
Thank you very much,
Aviv Giladi
|
|
|
|
|
How long does it take for your article to get "edited" and not have that blue background at the top anymore. I am just tired of it being an "Unedited" project.
Thanks for any help you can give in this matter.
Brad Barnhill
|
|
|
|
|
A long time. Have you seen how many 'unedited reader contributions' there are? Alot.
Im not certain how they decide which articles to check first, or if its just the first article to get posted gets edited first, but either way, it could be a while.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
You should put this in the General Discussion forum, or better yet, email Chris and see what happens. With the volume of articles that get submitted, some fall through the cracks.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
For a start, you need to ask in the appropriate forum. Don't just randomly pick one and hope for the best. Chris generally receives details from the Suggestions forum, so that's the best place to be.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
To be nice ... I didnt just pick a forum at random. Since I wrote a C# article I posted it in here. I figured I would get some help from here instead of a smart mouth. Ive been wrong before and looks like I was again.
Brad Barnhill
|
|
|
|
|
bbarnhill wrote: I figured I would get some help from here instead of a smart mouth. Ive been wrong before and looks like I was again.
You did get help. You just chose to ignore it.
If you take the time to look around this site, you will see that there is a Suggestions forum - and Chris receives notifications when anybody posts to this forum. The sheer volume of posts means that it's impractical for him to monitor every forum - hence my comment about picking the appropriate forum.
Look at it this way - would you crosspost this question if your article had been about C#, Vista and SQL Server? No - I thought not.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Just work on your presentation skills. You strike me as rude in the delivery of your "help".
Brad Barnhill
|
|
|
|