Topics
-
- 0 replies
- 1k views
i've fond a lot of exemple on how to add my program as a service on these forums, but what I want to do is add another program to service list... I dont even know if it's possible but I ask anyway. I want to write an installer that will install my program + Apache web server, I need apache to run as a service, but I dont want the user to go trough the usual setup, my program should install it automatically... but I dont know how to make it a service anyone can help?
Last reply by Shurikn, -
- 0 replies
- 1.4k views
hi folks i'm using the SelectedNodeChanged-Event to expand or collapse a treenode. but this event is only fired, if a new node has been selected. clickling on the node to expand it and clicking the same node again to collaps it, doesnt work, because the selected node hasn't changed... how can i detect, if the user clicked on the same node he just clicked before?? tx for any help! george
Last reply by ganders, -
- 3 replies
- 751 views
I have a form which uses (or tries to use) two separate calendar controls. The user needs to be able to select different dates for 2 different locations. My problem is that the calendar events are some how interrelated and I have to click several times to the the selection in the second calendar to display (I have the controls set up to write the selected dates to associated textboxes). Is it not possible to use two calendar controls? If it is possible, how do I separate the events. Here is my code: (Both controls use this event to prevent users from selecting a date that is in the past) Sub DayRender(ByVal source As Object, ByVal e As DayRenderEventArgs) If e.…
Last reply by lorena, -
-
- Administrators
- 2 replies
- 2.5k views
Hi I've found following code forlisting all the computers in active directory: 'ActiveDirectorySearch1 'Displays all computer names in an Active Directory 'Written 08/26/02 - John O'Donnell - csharpconsulting@hotmail.com Imports System Imports System.DirectoryServices Namespace ActiveDirectorySearch1 Class Class1 Shared Sub Main(ByVal args() As String) 'Note : microsoft is the name of my domain for testing purposes. Dim enTry As DirectoryEnTry = New DirectoryEnTry("LDAP://microsoft") Dim mySearcher As DirectorySearcher = New DirectorySearcher(enTry) mySearcher.Filter = ("(objectClass=computer)") Console.WriteLine("Listing of computers in the Active D…
Last reply by ivan74, -
-
-
- Administrators
- Leaders
- 29 replies
- 2.1k views
StreamWriter strWriter = new StreamWriter(Application.StartupPath + "\\" + "bla.txt", false, System.Text.Encoding.BigEndianUnicode); strWriter.WriteLine(textBox1.Text); strWriter.WriteLine(textBox2.Text); strWriter.WriteLine(textBox3.Text); strWriter.WriteLine(textBox4.Text); strWriter.WriteLine(textBox5.Text); strWriter.WriteLine(textBox6.Text); strWriter.WriteLine(textBox7.Text); strWriter.WriteLine(textBox8.Text); strWriter.Close(); This creates a text file with following input: 1 2 3 4 5 6 7 8 Ok, but I want to read every line to a specific string variable. Why the F. does this F. S. reads only a few lines? why is it skiping lines? string sTemp1 = …
Last reply by EFileTahi-A, -
-
- 1 reply
- 1k views
Checkbox event handler problem Hello I am trying to set up an event handler to detect clicks on checkboxes IN A PANEL. The watch window shows two strange outputs: 1. Addhandler ... expression expected 2. CheckBoxx(intCounter).CheckedChanged ... 'CheckedChanged' is not a member of 'CheckBox' Anyway, it isn't working. Any ideas? Thank you. Cut-down code: Private Sub refreshprices_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Click Dim numberofprices As Integer = (CurrentMarket.prices.Length) Dim CheckBoxx(numberofprices) As CheckBox Dim Panel1 As New Panel Panel1.Locatio…
Last reply by Machaira, -
-
- Moderators
- Administrators
- 17 replies
- 4.3k views
I've been using Try... Catch, but at times I want to use Resume or Resume Next. I know I can use On Error, but I've been trying to avoid that. So is there a Resume / Resume Next equivalent with Try... Catch?
Last reply by JDYoder, -
-
- 4 replies
- 1.4k views
I have an XML file that I would like to write to a database. I know how to load the XML file to a dataset by using the DataSet.ReadXml command but I do not know how to write the resulting dataset to the database. Any ideas? I am using an MS Access database.
Last reply by cpopham, -
- 0 replies
- 1k views
I have misplaced my Visual Studio 2002 Prerequisites disk. I�m sure it�s in a box somewhere, but I can�t find it. Is there a list somewhere of what needs to be installed to allow me to continue on to step two of the installation? I know that the first time I installed VS.NET it gave me a list of the apps it was going to install, but I think that it showed after the Prerequisites disk was loaded.
Last reply by Alistair, -
- 1 reply
- 977 views
I'm trying to generate some valid xml from a SQL Server dataset. I can get it to crank out the standard xml using WriteXml but I would like to add some elements and nodes before this part. Can I do this? Also can I modify the default tags that the WriteXML kicks out? I have some code that I am trying to use to write start and end elements but it keeps saying invalid xml // Build the DataSet DataSet myDs = new DataSet(); adapter.Fill(myDs); FileStream myFs = null; // Get a FileStream object myFs = new FileStream(filename+".xml", FileMode.OpenOrCreate, FileAccess.Write); XmlTextWriter xmlWriter = new XmlTextWriter(myFs, Encoding.UTF8); xmlWriter.Indentation =…
Last reply by cyclonebri, -
- 5 replies
- 821 views
I have an asp.net form that adds a record to a table and then increments a counter variable in another table before closing the connection. The add record part works fine but I am getting "Syntax error in UPDATE statement" when I try to update the incremented field in the counter table. (I started trying to do the operation as an INSERTbut that didn't work either) Here is my code: strSQL = "Update NumberGen set Counter = ~ where ID like 'SK'" strSQL = Replace(strSQL, "~", intCounter) objCommand = New OleDb.OleDbCommand(strSQL, objConn) objCommand.ExecuteNonQuery() objConn.Close() I have tried substituting an actual number in place of intCounter (didn't work) and al…
Last reply by Afraits, -
- 4 replies
- 1.4k views
Hello All, I created an aspx page in which I have a nested user control containing a dynamically created button. The problem is that everytime I click on it, the codebehind is not executed. It doesn't even enter in the code. The button was working before and I don't know what makes it bug . Here is the begining of the .aspx page : <%@ Register TagPrefix="uc1" TagName="Layout" Src="/User_Controls/Layout.ascx" %> <uc1:Layout id="ucLayout" ShowConsole=True RightColumn=False runat="server"> <CentreTemplate> ... some code ... <asp:Button id="btnModify" runat="server" Text="Modify" Font-Size="XX-Small" Font-Names="Verdana,Arial" BorderStyle="O…
Last reply by scalf, -
- 3 replies
- 887 views
I have a form that is setup to ask for a user anme and then a password. I would like it if the user could just press enter as soon as they enter the password rather then having to push a login button. I have looked all over the net for a way to do this and have not found one yet. Any help would be great however I am very new to vb.net so please show complete code if you have the answer or I will get lost. :-) Also, I will need to do a if statement in there also to validate the password. Thank you!!! :D
Last reply by Joe Mamma, -
-
- Administrators
- 1 reply
- 992 views
hi folks the following code creates a compositecontrol and adds a button to the control. the button gets a handler for the click-event. this works all fine, except: the sub button_click is called twice. why??? best regards george Private WithEvents btnSearch As New WebControls.Button Protected Overrides Sub CreateChildControls() AddHandler btnSearch.Click, AddressOf btnSearch_Click Me.Controls.Add(btnSearch) MyBase.CreateChildControls() End Sub Public Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click ' this code is executed twice... End Sub
Last reply by PlausiblyDamp, -
-
- 1 reply
- 974 views
I have made a user control that has a graphic for a backdrop. Its a JPG and I use the DrawImage function to apply it to the form. The image has regions, well more like a lame type of button, so when I move the mouse over them, a rectangle is drawn over them to give it a higlight effect. These regions are stored in an array of rectangles (about 20 of them). So when the mouse moves and the position is inside one of the rectangles, a rectangle is drawn over the button. The problem I am having is the CPU usage. When the form is being display (doesn't have to be in focus), the CPU usage for the app runs at 50%. This will happen when the mouse is still. Is there a w…
Last reply by sjn78, -
-
- Administrators
- 2 replies
- 1.1k views
For the life of me I cannot get this block of C code working that I found: using System; using System.Collections; using System.Configuration; using System.Web; using System.Web.Security; using System.Runtime.InteropServices; using AZROLESLib; public class AuthorizationManagerRoleProvider: RoleProvider Visual Studio keeps saying that the type or namespace RoleProvider cannot be found. As far as I can tell that is part of system.web.security (which I have uin my usings above). When I use the VS Class browser I cannot seem to find it. Is this part of .NET 2.0 only - the roleprovider?
Last reply by patrick24601, -
-
-
- Administrators
- 2 replies
- 933 views
Hi is it possible to do the following: Response.Redirect("file:///c:/somefolder/") or Server.Transfer("file:///c:/somefolder/") I get error message if I try the second and "page could not be displayed" if I try the first. But it works just fine if I press ctrl+click from visual studio, what's the catch?
Last reply by ivan74, -
-
- 1 reply
- 702 views
Hi, Have a drop down list that is full of countries, I want to have Ireland set as the default selected value. The code that I am using is as follows: Me.ddCodes.DataSource = CType(Session("Utility"), DataSet) Me.ddCodes.DataTextField = "Country" Me.ddCodes.DataBind() Me.ddCodes.SelectedValue = "Ireland" However this fails to select the required value? any suggestions on what I am doing wrong... as the same code is working perfectly on other pages. Mike55
Last reply by mike55, -
- 4 replies
- 1.1k views
Hi, Currently we're using VB6 and DCOM to establish communication between the server application and the client applications. We're about to change platform to .NET (VB2005) but not sure how to handle the remote communication. There are a couple of things we'd like to have: The client should react on events raised in the server app Connections should be possible over a network Multiple clients should be able to connect to the server app One or more client apps can be located on the same computer as the server app Our server app will monitor and control a test environment and the current situation will be visible on client computers in "real time" (time delay …
Last reply by kejpa, -
- 1 reply
- 952 views
Is there a way to retrieve all of the tables and there relationships into a dataset using code? I have only seen some of this done using the erver explorer. I am trying to create a simple application that will backup a database. The user will navigate to the database and then be able to back it up. I was thinking of using a strongly typed dataset to accomplish this. So does anyone know how to get the database tables with relationships from a database into a dataset without using the server explorer or having to know the relationships ahead of time and recreate them programattically using code? Thanks, Chester
Last reply by Joe Mamma,
-
Who's Online 0 Members, 0 Anonymous, 58 Guests (See full list)
- There are no registered users currently online