|
you could do this :
VB:
<font color="blue">Private</font> void richTextBox1_MouseMove(<font color="blue">Object</font> sender,System.Windows.Forms.MouseEventArgs e)
{
<font color="blue">Try</font>
{
<font color="blue">Char</font> c=new <font color="blue">Char</font>();
System.Drawing.Point p=new System.Drawing.Point();
p.X=e.X;<font color="#006400">
p.Y=e.Y;<font color="#006400">
c=richTextBox1.GetCharFromPosition(p);
this.Text=(Convert.ToString(c));<font color="#006400">
}
<font color="blue">Catch</font>
{
System.Exception f=new System.Exception();<font color="#006400">
MessageBox.Show(f.Message.ToString());
}
}
hope that helps a little.
<font color="blue">Private void</font> ExpectingTwins(<font color="blue">string</font> twins)
{
<font color="blue">switch</font>(twins)
{
<font color="blue">Case</font> ("twins on the way"):
MessageBox.Show("for mr and mrs dynamic","twins on the way");
<font color="blue">break</font>;
}
}
|
|
|
|
|
caret not cursor
<a TITLE="See my user info" href=http:
|
|
|
|
|
Try the GetCaretPos API function.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Thanks everyone for your help!
I eventually managed to do this using:
pt = rtf.PointToScreen(rtf.GetPositionFromCharIndex(rtf.Text.Length))
|
|
|
|
|
Dear all,
How to access a C# DLL function from a MFC app? Is it possible?
VikramS
|
|
|
|
|
Yes, compile your MFC application with /clr and use the #using directive for importing the C# DLL. You'll need to use Managed C++ for calling your C# DLL, but it's not a big deal.
ORACLE One Real A$#h%le Called Lary Ellison
|
|
|
|
|
Hi all!
I have some problems with convert project from VB6 to C#.
I dont know how it be in C# code like this:
----------------------------
Public Event Wiadomosc(ByVal sender As Long, ByVal seq As Long, ByVal time As Long, ByVal class As Long, ByVal message As String)
----------------------------
Public Property Let ListaKontaktow(index As Integer, co As lbpoleKontaktu, value As Long)
If co = 0 Then
kontakty(index).nrgg = value
Else
kontakty(index).typ = value
End If
End Property
----------------------------
Public Property Get ListaKontaktow(index As Integer, co As lbpoleKontaktu) As Long
If co = 0 Then
ListaKontaktow = kontakty(index).nrgg
Else
ListaKontaktow = kontakty(index).typ
End If
End Property
----------------------------
Public Sub sendMsg(numerGG As Long, seq As Long, class As Long, msg As String)
Dim dlugosc As Long
dlugosc = Len(msg) + 12 + 1
sckGG.SendData 11&
sckGG.SendData dlugosc
sckGG.SendData numerGG //where sckGG is Winsock control i know that i must use Socket in C# but i don't know how
sckGG.SendData seq
sckGG.SendData class
sckGG.SendData msg & Chr(0)
End Sub
Greeting
S_W
|
|
|
|
|
|
Hi, friends ! If I want to create a window's control unit for reuse , how could I know when it should inheritance the Forms , Usercontrol , Control , Component ... ? what are they difference between them ? I am very confuse for them ? help me !! thx!
|
|
|
|
|
Hi, friends! How can I do a toolbar like VS.Net ? (it's called coolbar or rebar in C++), I have some library about that , but it's very complex for me , I want to know the keypoint , what is keypoint for coolbar in C# ? thx!
|
|
|
|
|
I am building a simple test application in c# that uses the Flash player ActiveX control to display some data.
I have two Classes in c#:
FooWindow.cs
Foo.cs
I then embed the Flash player in my app in visual studio.
When I compile everything, it creates the following files:
AxInterop.ShockwaveFlashObjects.dll
Interop.ShockwaveFlashObjects.dll
stdole.dll
Foo.dll
FooWindow.exe
This all works perfectly on my machine, but when I send it to other people to test, they get various errors. I am sending all of the files. Do I have to do anything special to distribute an app which uses an ActiveX control?
Thanks for any input...
mike c
|
|
|
|
|
When distributing C# apps, you have to make sure A) They have the .NET framework installed (only newest XP has it installed default), and B) Do they have the right version of .NET installed. I have found that 1.0 and 1.1 executables are not interchangeable (which is a bit dissapointing).
|
|
|
|
|
Do your testers have Flash installed on their machines?
|
|
|
|
|
Yes. Thus far, I have sent it to three people, and it didn't work for any of them.
They all have the same version of the flash player also.
mike c
|
|
|
|
|
i wanna do the following...
make the user enter how many values he/she wanna enter to the application....then i display a table that has (n)
cells equalls to the no. of values that the user enter.....what can i do?
|
|
|
|
|
The solution i am going to tell you is what are you going to do with the source code NOT WITH THE DB, which is a bit more difficut.
let's say n is the number of the columns.
System.datatable newtable = new Syste.Data.DataTable();
string colname;
for(int a=0;i
|
|
|
|
|
i wanna run an exe application from my program....and at the same time i wanna make it invisible to the user...what can i do??....
|
|
|
|
|
Process.Start() is what you want. I don't understand what invisible mean. with CTRL+ALT+DEL a user can see any application and any process in his system.
From Greece:
Dimitris Iliopoulos
dimilio@yahoo.com
|
|
|
|
|
by invisible i mean that the process work at the background.....so the user can't SEE it or INTERACT with it...
|
|
|
|
|
You can make a service. It would run all the time in the background.
|
|
|
|
|
how do you use this? I have a form thats inputting data into a datagrid thats binding it to a dataset and then binding that to xml then exporting html........lol.......alot ain't it.....................i need to be able to start a new paragraph when the user hits return i know i have to use text.replace i just don't know how........................thanks for any help
Da Intern
|
|
|
|
|
|
thanks....so how do i use it to replace a user pressed return so that html can read it
Da Intern
|
|
|
|
|
Replace("\n","<br>")
<a TITLE="See my user info" href=http:
|
|
|
|
|
okay so i can use that to catch a user enter press....like to start a new paragraph
Da Intern
|
|
|
|