|
Thanks for your clarification, Pete!
regards,
George
|
|
|
|
|
Why do you think it is "conceptual distinction", PIEBALDconsult? Any more descriptions?
regards,
George
|
|
|
|
|
Why do you think "foreach is somewhat frowned upon", PIEBALDconsult?
regards,
George
|
|
|
|
|
Hi EveryOne,
I am writing a windows application that Refers a COM component which exposes a single function called Connect(). I have referenced COM Component but I don't know how to call this function on a button click.
In VB we create a variable and then set an instance of the class object to the varibale, finally browsing this variable with a dot operator would reveal the methods exposed by the class. How do we achieve the same in C#?
I am new to C# so kindly excuse me if this is very basic and I am wasting your valuable time. Thanks.
Regards,
LG.
lgatcodeproject
|
|
|
|
|
lgatcodeproject wrote: In VB we create a variable and then set an instance of the class object to the varibale, finally browsing this variable with a dot operator would reveal the methods exposed by the class. How do we achieve the same in C#?
The same works in C#. You use the New operator to create a new instance.
MyClass myObject = new MyClass();
myObject.SomeMethod();
If you want to do something on a button click, you just find the handler for the click event for the button, and put the code in their.
Post your code. Which bit are you having trouble with?
Simon
|
|
|
|
|
Hi Simon,
The COM component(named ActiveXRAP) I have referred in my project(ActiveXRAPLib) is displayed as namespace.
<br />
namespace RAPClient<br />
{<br />
public partial class Form1 : Form<br />
{<br />
string output;<br />
<br />
<br />
<br />
ActiveXRAPLib.RAPClientX objRAP;<br />
<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
<br />
}<br />
<br />
private void bConnect_Click(object sender, EventArgs e)<br />
{<br />
<br />
}<br />
}<br />
}<br />
Regards,
LG.
lgatcodeproject
|
|
|
|
|
That looks all right to me. Sorry.
Is RAPClientX defiantly a type?
Simon
|
|
|
|
|
Are you missing a "using ActiveXWrapLib;" at the top of the class?
|
|
|
|
|
Hi,
I made a custom user control and set it's public property "ShowFiles". now this property can be seen as a property of my user control in property window. I want that this property should be a combobox and it should shows all the files which are currently in my "Resources" at design time. at design time I will choose one of these and use as a property of my user control.
Plz help...
thanx in advance... ![Rose | [Rose]](https://www.codeproject.com/script/Forums/Images/rose.gif)
|
|
|
|
|
|
Hi,
I want to return a trigger when new row is inserted or existing row is updated.
if a row is inserted ,i have to return a trigger to my application.Later it is executed by our application to push data into our local database.
It's urgent. can anyone help me for this?
thanks
sri
|
|
|
|
|
Why do you need your application to handle this? It seems like a bad idea. What if you write a second program that updates the data and forget about the trigger thing.
Write a database trigger for Insert and/or Update or write a Stored Procedure that updates or inserts the data and does whatever other things you want done at the same time.
|
|
|
|
|
Member 4008492 wrote: It's urgent
Of course it is. Triggers don't do that, they fire IN the DB.
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 )
|
|
|
|
|
Hi
Use the DB triggers (INSERT, UPDATE) in order to log the changes that occur on the table, then use that log todo what ever you want
|
|
|
|
|
Do a search on "SQL Server Notifications". Triggers fire in the database, and are not what you need here, but notifications might work for you.
|
|
|
|
|
Is it possible to force a TextBox to show it's input cursor even though it's not active?
|
|
|
|
|
I don't think it's a good idea, because that would be confusing! Why would you do anything like that?
And no I don't think it possible.
|
|
|
|
|
I want it because we're writing a custom autocomplete function. We show a popup list, but when the popup is shown it's not possible to see what part of the textbox is being edited.
|
|
|
|
|
After showing the popup list, return focus to the text box to allow the cursor to be displayed. Handle keypresses on the text box and when appropriate respond to them by navigating through the list.
Or
Implement your own custom text box class, inherited from the TextBox and handle the drawing of the cursor yourself.
The first option is defiantly the easier.
Simon
|
|
|
|
|
No. And yes, that does suck, and it would confuse your users if you could do it.
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 )
|
|
|
|
|
Well... If you read about my reason above, do you still think it will confuse my users? I think it will confuse my users not to have it.
|
|
|
|
|
You can change what the selection is in the textbox, that makes more sense to me. But, the only way to get a cursor AFAIK is to focus on the textbox.
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 )
|
|
|
|
|
Hello, at first, i am german and i can't speak a perfect english.. thx
My Problem is, i have an Access Database and a DataGridView in my Applicatoin.
i have use the Wizard to Make a Databinding to the Database
As i have Build my DGV with Drag and Drop in my Application, i have use the smal little Pionter on the top right corner... i hope you understand qhat i mean.
okay.... the datas was also in the DGV, BUT if i make changes in the database, the DataGridView don't show it.... why? what can i do, to make the DataGridView shows the current datas in the database....
thare is my C# Code from Highscores.cs
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
using System.IO;<br />
using System.Data.OleDb;<br />
<br />
namespace Zahlenraten<br />
{<br />
public partial class f_Highscores : Form<br />
{<br />
public f_Highscores()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void f_Highscores_Load(object sender, EventArgs e)<br />
{<br />
this.highscoreTabelleTableAdapter.Fill(this.highscoresDataSet.HighscoreTabelle); <br />
}<br />
<br />
private void b_zurück_Click(object sender, EventArgs e)<br />
{<br />
this.Close();<br />
}<br />
}<br />
}
|
|
|
|
|
|
The changes are applied to the database, you need to refresh your datagridview.
Bob
Ashfield Consultants Ltd
|
|
|
|