Hello every one . I have a piece code in VB.net which work perfectly. but now i convert that code to C# Which give me the follwing error. "No suitable Method found to override" my VB.Net Code is Here Protected Overrides Sub onload(ByVal e As EventArgs) startPosX = Screen.PrimaryScreen.WorkingArea.Width - 330 startPosY = Screen.PrimaryScreen.WorkingArea.Height SetDesktopLocation(startPosX, startPosY) MyBase.OnLoad(e) Timer1.Start() End Sub and here is converted code protected override void onload(EventArgs e) { startPosX = Screen.PrimaryScreen.WorkingArea.Width - 330; startPosY = Screen.PrimaryScreen.WorkingArea.Height; SetDesktopLocation(startPosX, startPosY); base.OnLoad(e); Timer1.Start(); } The `onload` give the error.

Member Avatar
Member Avatar
+0 forum 5

I have a link in my web page: <div class="site-logo"> <h1 class="site-title"> <a href="http://10.0.0.201/wp/" title="Document &amp; Draft" rel="home">Document &amp; Draft</a> </h1> <h2 class="site-description">For power CAD users</h2> </div> The "site-logo" class is as follows: .site-logo{ display: block; text-align: left; color: #9FA32E; font-family: "Trebuchet MS",Arial,Helvetica,Sans-Serif; font-size: 42px; text-decoration: none; } I'm expecting the text in the link to be 42px high, coloured #9FA32E and without the underline that normally denotes a link. The text is indeed 42 pixels high, but it's coloured the deep purple of a visited link and it has an underline beneath it. Firebug doesn't tell me where the …

Member Avatar
Member Avatar
+0 forum 5

hmm, think I figured it out

Member Avatar
+0 forum 0

Hello, I am having a particularly nasty case of "What is the syntax?" while working on an event driven library. Basically this is what I want: class Object {// private: public: virtual bool onEvent(Event e)=0;//all objects have to react to events Object operator|(const Object &o) { // I want to return an Object which will execute both onEvents... // How can I do this... IF I can do this... // my example attempt: (I have yet to fully memorize the lambda expression syntax in c++11) return Object::onEvent(Event e)=[]{return (*this).onEvent(e) || o.onEvent(e);} } }; class Test1:public Object {// private: public: virtual …

Member Avatar
Member Avatar
+0 forum 7

I'm trying to create a program where I can print output to my console application and entering test without being override. Is there anyway to accomplish this? Here is my simple code showing my issue: ` #include <iostream> #include <thread> #include <Windows.h> void myThread() { while (1) { std::cout << "hello world" << std::endl; Sleep(1000); } } int main() { std::thread t1(myThread); while (1) { std::cin.get(); } return 0; } `

Member Avatar
+0 forum 0

Hi, I am having a problem overriding methods in a subclass when they contain private methods from the master class. The is the master: package blabla; public class Person { private String firstName; private String secondName; private String familyName; public Person() { firstName = ""; secondName = ""; familyName = ""; } /** * Parameter constructor */ public Person(String firstName, String secondName, String familyName) { this.firstName = firstName; this.secondName = secondName; this.familyName = familyName; } public String getFirstName() { return firstName; } public void setFirstName(String setFName) { firstName = setFName; } public String getSecondName() { return secondName; } public void …

Member Avatar
Member Avatar
+0 forum 3

Hey guys I'm having a bit of touble assigning the toString to a string from an index of an array list, any help would be appreciated. @Override public String indentedToString(int level) { String answer = " "; answer = super.indentedToString(level); answer += "Value " + this.list.toString() + "\n"; for(int i = 0; i < list.size(); i ++) { answer += list[i].indentedToString(level + 1); } return answer; } I keep getting an error in line 9 [array required, but java.util.ArrayList found] any help ? Thanks in advance

Member Avatar
Member Avatar
+0 forum 2

Lets say I have a class A and I also have classes B and C that inherit from class A class A { virtual void foo()=0; //stuff } class B : class A { void foo(); //more specific stuff } class C : class A { void foo(); //more specific stuff } Now lets say I have a similar set up for classes X, Y, and Z, except I want them contain some form of class A as such. class X { A m_myA; // I know this doesn't work due to the abstract definition, but this is my goal …

Member Avatar
Member Avatar
+0 forum 2

General rules is that: 1) A private method cannot be overridden. 2) Subclass method should be a lower access modifier than a overridden superclass method. But the output of the program is "I am Son". Why? Is it because of the rule 2 the output comes? If that's the case here, then two rules of overriding I mentioned above are clashing, aren't they? Help please. Thanks.

Member Avatar
Member Avatar
+0 forum 8

Hello, thought I'd ask before getting too deep into code to make sure I understand this properly. As described in the Gamma et. al. book the Visitor Pattern looks something like this: interface Visitor{ public void visitX(X x); public void visitY(Y y); public void visitZ(Z z); } interface Visited { public void visit(Visitor v); } class X implements Visited{ public void visit(Visitor v){ v.visitX(this); } } class Y implements Visited{ public void visit(Visitor v){ v.visitY(this); } } class Z implements Visited{ public void visit(Visitor v){ v.visitZ(this); } } //SOMEWHERE ELSE A CLASS public void doAlgorithm(Visitor visitor){ for(Visited v : datastructure){ …

Member Avatar
Member Avatar
+0 forum 5

Hey all, I have been wanting to make a cool game in jave such as a fighting game starting off simple with drwing stick figures :). But i was wondering why there are so many java games created in Japplet why not use swing- i know there are games out there that do but why dont all?

Member Avatar
Member Avatar
+0 forum 2

Hey, following Problem: I have two classes Measurement and its subclass DC_Measurement. Measurement has a method called: [CODE]public virtual SetPoint[,] createSetPointArray()[/CODE] DC_Measurement: [CODE]public override DCSetPoint[,] createSetPointArray()[/CODE] DCSetPoint is also a subclass of SetPoint. I read that this is possible. Now I use in my mainWindow following code which contains an error: [CODE] DCSetPoint[,] calArray = selectedMeasurement.createSetPointArray(); [/CODE] Error: Cannot implicitly convert type 'paMeasure.SetPoint[*,*]' to 'paMeasure.DCSetPoint[*,*]'. An explicit conversion exists (are you missing a cast?) I don't know what to do. Thanks for help.

Member Avatar
Member Avatar
+0 forum 1

hello..i've made a structure given below and the objects of that struct are stored in an arraylist [code] struct node { public int x; public int y; public int cost; public object parent; } [/code] now when i'm adding a new object this type..i want to check if the arraylist already contains the object with the same values..the check should only focus on x,y and cost variables of the object leaving behind the parent variable..how do i achieve this??? which methods of the arraylist should i override?? any help would be appreciated

Member Avatar
Member Avatar
+0 forum 3

Hi :) i am new in C# and i am a little confused with the abstruct, virtual and override terms in C#... why they are good for? i tried to google it but i got more confused... for example - i am making a chess program and i made a class "piece" and other classes for pawn, knight, bishop etc. that inherit from piece now, i wanna to made a "LegalSquares" function that show me all the legal squares on the board - ofcourse it will be different between the pieces what is the right way to do it? make …

Member Avatar
Member Avatar
+0 forum 1

In class my teacher ran a program similar to this one. When I attempt to run this from home I get a message saying "No main classes found". I know there should be a main in the program but he ran a similar program without it. Just trying to get some insight on how to run this. This is basically just a program that makes a checkerboard pattern then it draws the checkers on top. [CODE]package checkers1; import java.awt.*; public class Checkers1 { static int columns = 8; int rows = 8; int sizeofsquare = 50; void maketheboard(Graphics g) { …

Member Avatar
Member Avatar
+0 forum 4

Hi everyone My intention is to enable NTLM authentification when using the native PHP SOAP client, Most of the code is copied from an php.net manual example and it is said to be working. I'm trying to override the __doRequest function in the SoapClient class and let it use cURL. But I can't get the overriding part to work. __doRequest is never called, What am I doing wrong? Any suggestions ? [CODE]class ExtSoapClient extends SoapClient { private $proxy_login; private $proxy_password; ... public function __construct($wsdl, $options = array()) { $this->proxy_login = $options['proxy_login']; $this->proxy_password = $options['proxy_password']; $this->proxy_host = $options['proxy_host']; $this->proxy_port = $options['proxy_port']; …

Member Avatar
+0 forum 0

Hi guys, Bit of a strange problem here. I've been working on a CMS for a client where they can preview work that they've done in a div-tag which is inside the "Admin" template for the back-end. My problem is this: After the user styles all of their content accordingly using CKEditor and they save it, when the content is then previewed, the stylesheet for the "Admin" template applies itself within that div-tag and overwrites their styles. Is there any way to stop this from happening? I realise I could just make the preview occur in a popup window, but …

Member Avatar
Member Avatar
+0 forum 1

The End.