Jump to content
Xtreme .Net Talk

HSN

Members
  • Posts

    23
  • Joined

  • Last visited

About HSN

  • Birthday October 19

Personal Information

  • Occupation
    CS student
  • .NET Preferred Language
    C#

HSN's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. In fact I haven't installed the ODBC. I'll try to install it now.
  2. Here is my procedure for connecting to mysql: internal void mySQL() { string mySQLString = "DRIVER={MySQL};DATABASE=system;"; mySQLString += "SERVER=localhost;"; mySQLString += "UID=root;PWD=1234;"; System.Data.Odbc.OdbcConnection myDb = new OdbcConnection(mySQLString); try { myDb.Open(); } catch (System.Exception E) { MessageBox.Show(E.ToString()); } } while I get the following exception: ERROR [iM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
  3. Hiii there, I have never programmed a windows app which uses a db system. I'm a php + mySQL developer and I currently have a database on mySQL. I just wanna use this db using a C# program. Please give me the starting key for that. Thx
  4. Hello, I'm developing a dialog based C# 2.0 application. My dialog has some buttons on it. I need to handle some "keyPress" events on my dialog such that each time for example key 1 was pressed, a certain action is taken. But, when I defined the event handler I found it not wokring. The problem was that the focus is on buttons not on the dialog and the handler belongs to my dialog. To solve the problem I used: this.Focus(); But didn't work! How can keep the focus always on my dialog such that I can handle the key event. Or is there any other solution that lets me use the key handler? Thx
  5. Hello, In part of my application which is written in C#, I want to connect it to a symbian phone via a bluetooth device. So, what are the API's I can use for this purpose and for any other interconnection between .NET and mobile phones? Thanks :)
  6. Hello, How can I terminate a thread say T1 by another thread which I already started say T2? Or in general how can I control one thread using other threads?
  7. Oh, that was really helpfull. Thank you for your assistant.
  8. Yes in fact my problem was that I wasn't set the KeyPreview property to true. Now it works fine. But, how can I determine which key was pressed? Because, according to the key I have to take the appropriate action.
  9. Hello, I need to handle some key press events in a C# windows application. I thought I can use this: [size=2][/size][size=2][color=#0000ff]private[/color][/size][size=2] [/size][size=2][color=#0000ff]void[/color][/size][size=2] MainForm_KeyPress([/size][size=2][color=#0000ff]object[/color][/size][size=2] sender, System.Windows.Forms.KeyPressEventArgs e) { MessageBox.Show("Hello!"); } [/size] But it didn't work! It should output a hello whenever I press a key but it doesn't do anything! Can anyone help me please?
  10. Ok good, that works. But anyway how can I get the system's time?
  11. I'm using the System.Random of C# to generate some random numbers. In order to make the seed vary for each execution of the code, I wanna use the CPU time as a seed number so it would make real random numbers. However, I don't know how do I get the time of the CPU in C#?! Please help me with that..
  12. Hello, I have a question regarding the old visual basic 6.0. I have some programs written in 6.0 and still in use. Are they going to be compatible with longhorn or not?!
  13. Console.WriteLine(Math.Pow(8,1/3F)); True, my problem was that 1/3 = 0 because it is an integer. Yes Wile, VB is more flexibile in this but this implicit type conversion causes problems.
  14. Well, I tried it before I put this thread: [size=2]Console.WriteLine(Math.Pow(8, (1/3))); It wouldn't work. I tried pow() in C++ and Math.Pow() in both C# and Java. This trick cannot be applied to these methods. [/size]
  15. Hello, Is there a built in object that calculates the nth root of some number in C#? for example, (x)^(1/3)
×
×
  • Create New...