Topics
-
-
- Administrators
- 2 replies
- 1.3k views
Hi, I want to create a windows service with a timer. So one event will fire on every while. I'm using Visual Studio 05 But it doesn't work. The code is fine, becouse it works in normal win app. with sql.Insert_Log I just inser a log into db, so I can see that service is working. All I get in my log file is 'Start Service' and 'Stop service'. The timer tick event never starts. what is wrong? Protected Overrides Sub OnStart(ByVal args() As String) ' Add code here to start your service. This method should set things ' in motion so your service can do its work. 'set connstring sql.ConnectionString = sConn pp.sql = sql …
Last reply by mcerk, -
-
- 4 replies
- 752 views
Is it possible to add properties to a class temporarily at run time? I'm saving the locations of some user controls with serialization. The user controls can't be serialized, because controls can't, so I need to store the locations in some related objects which I can serialize. I need the related objects in any case. The related objects only need this data for serialization, and it would be nice if I could just give them the property for storing this information while serialization takes place. Is there any way this can be done?
Last reply by rbulph, -
- 6 replies
- 2k views
Hi to all, I'm currently makin an application that needs to read a file and update a database with the data that the file contains. I'm using vs 2003 with sql server. My ideia is to run some store procedure in the main thread and start another thread that show a little form indicating that the database is updating. when the process is finnished i want to signal the thread that opened the form and kill it. how can i do that? ho can i signal a thread to "die", an thus closing the form
Last reply by tfowler, -
- 3 replies
- 1.3k views
I have created a database with three tables: 1) Users 2) Empoyees 3) History The history table is related to the employees table through the EmployeeID column in each table, the EmployeeID is the Primary key in the Employees Table, and EmployeeId is the FKey in history table... The employees table has an fkey column called userid which is a relation the the users table pkey userid now I in the datasources window I set the UserTable to be a details view and the othe two tables are gridviews. Then I dragged The USerTable to my form and it created the needed components then i dragged the employees table that was under the usertable and the historytable under the …
Last reply by kurf, -
- 2 replies
- 1.6k views
Hi, I have a multithreaded server app (Winforms) that I have converted to a service. It has a thread that simply creates a new TcpListener and waits for a connection: Public Sub StartListeningThread() Do Dim ip As IPAddress = IPAddress.Any Server = New TcpListener(ip, 4000) Server.Start() Dim tcpTmp As TcpClient = Server.AcceptTcpClient Dim tcpClient As New RUHTcpClient tcpClient.Client = tcpTmp.Client Server.Stop() Connections.Add(tcpClient) Loop End Sub This thread runs for the life of the application. The problem is that without using the command…
Last reply by Mister E, -
- 3 replies
- 1.4k views
I am trying to execute a sql server stored procedure from a c# windows app. I need to send it 3 parameters, is this the correct way to do that or am taking the long route. any feedback greatly appreciated! Thanks private void btnUpdate_Click(object sender, System.EventArgs e) { try { string strConnection = ConfigurationSettings.AppSettings["ConnectionString"]; SqlConnection cnn = new SqlConnection(strConnection); SqlCommand objCommand = new SqlCommand("usp_InsertSoftware", cnn); objCommand.CommandType = CommandType.StoredProcedure; SqlParameter objParameter = new SqlParameter("@softwareName",SqlDbType.VarChar, 100); objCommand.Parameter…
Last reply by Mister E, -
-
- Administrators
- 6 replies
- 2.1k views
Hi, I created an simple hello program in .NET I copied the executable to another machine with .Net Framework installed I can run it as an Windows administrator (user with Windows Admin rights) However, as a user with Windows "User" rights my application fails to start. Any thoughts?
Last reply by cf_user, -
-
-
- Leaders
- 1 reply
- 1.1k views
Hey guys, I'm thinking of writing a word game with VB.net, and was wondering what everybody else uses to check for valid words - is there a dictionary file out there to use, or perhaps a way of attaching the game to the MS word spellchecker? Just wondering as I don't feel like writing out the entire dictionary myself :( Thanks
Last reply by Iceplug, -
-
- 2 replies
- 809 views
I'm trying to get an instance of a Delete button on my webform in order to display a warning msg to the user. I've done this type of thing several times for a button inside a datagrid for a user confirm to delete a particular record. this webform has no datagrid. Simply a delete button. However, the form is set up as having multiple placeholder controls depending upon which functionality is initially selected. The following is the html within my webform: <asp:Button id="btnDelete" Text="Delete" runat="server" class="eppbutton"/> The following info is in my code-behind: ElseIf Request.QueryString.Item("iManage") = 3 Then 'Delete plcAddF…
Last reply by wsyeager, -
- 1 reply
- 2.2k views
I�m playing around with an ado.net windows form application and ran into a problem. I have a data set that is filled. I�m trying to use the select method on a dataset to filter some records� when I bind the results to the datagrid I�m getting extra columns in the grid like the follosing. HasErrors | RowError | Table | etc� What do I need to do in order to have it display just the columns from the dataset?. Here is the code. Thanks for any suggestions. try { dgLocations.DataSource = this.dsSoftwareLocations1.Tables["software"].Select("Software='" + this.cboSoftware.Text + "'"); // this.dgLocations.DataSource = this.dsSoftwareLocations1…
Last reply by reagan123, -
- 2 replies
- 1.3k views
Expert greetings, somebody could give to suggestions for coding my problem me ? I need a GlobalHook to the API : Openprocess Which within its parameters uses a PID, the this delivery the use of some of these APIs : pid = FindWindow -> parameters pid = GetHProcExe -> parameters pid = GetWindowProcessID -> parameters OpenProcess(reqdAccess, bInherit , pid ) When the application is cheat program, the will use in the PID the value of the PID my Game in memory. From my application .Net I obtain the PID of the Game after launching it. Is possible to interact with the GlobalHook to pass to him the PID to leak at the time of spying on all the pro…
Last reply by vitoto, -
- 0 replies
- 845 views
i have a datagrid bound to a table. i am adding and deleting records using the datagrid. here is the code behind my delete button: private void button4_Click(object sender, System.EventArgs e) { int dfd = ds.Tables["visit_activities"].Rows.Count; foreach(DataRow r in ds.Tables["visit_activities"].Rows) { if(r.RowState == DataRowState.Deleted) { dfd = dfd - 1; } } if(dfd >= 0) { int i = this.dataGrid1.CurrentRowIndex; DataRow row = ds.Tables["visit_activities"].Rows[i]; row.Delete(); ds.Tables["visit_activities"].Rows.Remove(row); this.dataGrid1.Refresh(); } else {} } the problem is that this works most of …
Last reply by fguihen, -
-
- Administrators
- 3 replies
- 1.1k views
is there a way to determine on an update trigger what field was modified?
Last reply by barski, -
-
-
- Administrators
- 1 reply
- 1.6k views
my oleDb Delete commands are not working. i have an oledbDataAdapter with insert, update and delete commands like so: this.daRequests.InsertCommand = conn.CreateCommand(); this.daRequests.InsertCommand.CommandText = "insert into requests(patient_id,requests)" + "values(@patient_id,@requests)"; this.daRequests.InsertCommand.Parameters.Add("@patient_id",OleDbType.VarChar,50,"patient_id"); this.daRequests.InsertCommand.Parameters.Add("@requests",OleDbType.VarChar,120,"requests"); this.daRequests.UpdateCommand = conn.CreateCommand(); this.daRequests.UpdateCommand.CommandText = "update requests set requests = ? where patient_id =?"; this.daRequests.…
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 1 reply
- 1.7k views
Using visual basic.net how do you share a directory? Any help offered is greatly appreciated.
Last reply by PlausiblyDamp, -
-
- 3 replies
- 1.7k views
Hey All, Need to know if there is a way to enlarge the scroll bar and drop button on a combo box. I know the drop button gets bigger if you increase the font size but is there a way I can do it without making the font to large. This is for a touch screen application so buttons must be a fair size. Thanks in advance to anyone that helps.
Last reply by MadMaxx, -
- 2 replies
- 1.8k views
I have this problem when I am writing and reading network streams. If I send another packet, then it will also send the last packet again, so I end up sending more and more information. Somehow I mustn't be flushing the buffer out correctly or something. This is my output if I click a button 3 times - you can see by the third time it has sent the packet 3 times, and hence the server replies 3 times. To send a packet I am using: Dim ns As NetworkStream = Client.GetStream If ns.CanWrite Then Dim bytes() As Byte = Nothing bytes = System.Text.Encoding.UTF8.GetBytes(Msg) ns.Write(bytes, 0, bytes.Length) End If …
Last reply by sgt_pinky, -
- 2 replies
- 1.5k views
I'm attempting to get the site to have valid HTML - this is causing much grief due to several reasons (most of which arent .net related so i wont ask about them here) The one that *is* related is that the built in .net controls, eg an image button is writing out html with attributes which are not accepted by the HTML validator (http://validator.w3.org). My code reads: <asp:imagebutton id="btnLogin" onclick="doLogin" tabIndex="3" Runat="server" imageurl="enterButton.gif" width="45" height="18" EnableViewState="False"></asp:imagebutton> The outputted HTML is: <input type="image" name="btnLogin" id="btnLogin" tabindex="3" src="enterButton.gif" b…
Last reply by HJB417, -
- 4 replies
- 1.3k views
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
Last reply by HJB417, -
- 7 replies
- 1.8k views
Couple of (hopefully) quick questions here. 1)I've been using Process.Start(filename) to open programs and files fine for a while now however if its a filetype with no known extension is there anyway to open the windows openwith dialoge? or do i have to code my one in which case how do i access the list normally provided by windows in said dialoge. 2)If i was to write a text editor, (C#) how would i access the data from a file opened with my text editor. 3) How would i (through code/ in the setup program) tell windows to use my application for certain file extensions? C# for answers is appreciated but any answer is great thanks in advance.
Last reply by Mister E,
-
Who's Online 0 Members, 0 Anonymous, 52 Guests (See full list)
- There are no registered users currently online