Topics
-
-
- Administrators
- 2 replies
- 1.9k views
Can anyone point me to the C# equivalent of the C++ CHttpFile object? Basically the C++ code just queries the size of a BINARY file that will be downloaded, sets up a progress bar and then does the download. Here is what I am converting: CHttpFile *pHttpFile; CFile file; pHttpFile = (CHttpFile*)NetSession.OpenURL(m_cstrHTTPServer + "/TestFile.exe", 1, INTERNET_FLAG_TRANSFER_BINARY | INTERNET_FLAG_RELOAD); // get the length of the file dwTemp = 0; if (pHttpFile->QueryInfo(HTTP_QUERY_CONTENT_LENGTH, cstrTemp)) dwTemp = atol(cstrTemp); if (file.Open(m_cstrUpdatePath, CFile::modeCreate | CFile::modeWrite | CFile::typeBinary)) { // copy 1KB at a time from serve…
Last reply by flynn, -
-
-
- Leaders
- 8 replies
- 2k views
I have extra unwanted space at the end of a StatusStrip. No matter which property I change, nothing gets rid of it. I have attached an image.ExtraSpace.BMP
Last reply by bjwade62, -
-
- 5 replies
- 1.1k views
How do I get a web server up and running? So far I've created a very simple .aspx project and I've found a way to test it by clicking the right mouse button on the main file and selecting "view in browser". What do I need to do to, that I can acces it from another computer on my home network? Does it work over the internet as well? I'm using VS 2005 Express!
Last reply by tfowler, -
- 0 replies
- 830 views
Hi, I am trying to find the best way to interact with a database. In school we've learned to make BaseClass and a DatabaseClass for every table in the database. In the BaseClass comes every item from the table like this: '... Public Property title() As String Get Return mTitle End Get Set(ByVal Value As String) mTitle = Value End Set End Property '... If I want to give some values to my DatabaseClass, I put them in the in the properties and pass them on to the DatabaseClass. '... bs.title = txtTitle.text db.doSomething(bs) '... Then we've got the DatabaseClass. Here come's everything that has to do with the database (interacting). …
Last reply by Stoffel85, -
-
- Administrators
- 2 replies
- 3.3k views
Hello everyone, I used to have my MS Access 2002 DataBase placed in my application folder and connect to it through an OLEDB connection. Everything worked fine. Now I decided to create an ODBC DataSource and suddenly I'm not able to pass parameters to the SQL Query the way I used to with the OLEDB connection. Here's a sample code of the SQL Query and C# code on my form: FillByClienteDataNumero query: SELECT Data, Cliente, Tipo, Número, Espécie, Lote, Análise, Preço FROM qryALL1 WHERE (Cliente = ?) AND (Data >= ?) AND (Data <= ?) AND (Tipo = ?) ORDER BY Data, Número Form code: private void btnSeekBA_Click(object sender, EventArgs e…
Last reply by teixeira, -
-
- 1 reply
- 1.2k views
Hello to all, When I'm running my application from the debug folder, I'm able to save changes to the database, but when I load the Crystal report to display that data, it still displays the old data, i.e., the data before the changes. Does it have anything to do with the database Build Action property and Copy property or it has something to do with the report source path? Thanks a lot, JC.
Last reply by teixeira, -
-
- Leaders
- 2 replies
- 1.6k views
Hi all, I'm trying to compare 2 DateTimes in C# to see if a specific time difference (5 seconds) has elapsed. I've been told that the best/most efficient way to compare them is to use a TimeSpan object in the code because it takes into account timing over midnight/new year/etc. However, I cannot see how to go about this. Any help would be much appreciated.
Last reply by rcaine, -
-
-
- Administrators
- *Experts*
- 6 replies
- 1k views
i use this script to select a row from my data grid.. but he doesn't fill it.. what's wrong? my customrow script public void dataGrid_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e) { int rowIndex = dataGrid1.CurrentRowIndex; if (CustomRow != null) { CustomRow(this, new CustomRowEventArgs(barry11,dataGrid1,rowIndex)); } } public class CustomRowEventArgs : EventArgs { DataSet barry11; DataGrid grid; int row; public CustomRowEventArgs(DataSet DSet,DataGrid Grid,int Row) { grid = Grid; row = Row; barry11 = barry11; } public DataSet DSet { get { return barry11; } } public DataGrid Grid { get { …
Last reply by rmokkenstorm, -
-
-
- Administrators
- 2 replies
- 798 views
Hi Group, In my application I am using "Range Validator", validator is set for a textbox with range 1900 - 9999. and I am also using "Validation Summary" problem is when I run the application i get a run-time exception Compiler Error Message: CS0234: The type or namespace name 'Global' does not exist in the class or namespace 'System.Web.UI.WebControls.RangeValidator' (are you missing an assembly reference?) Source Error: Line 26: Line 27: [system.Runtime.CompilerServices.CompilerGlobalScopeAttribute()] Line 28: public class Global_asax : RangeValidator.Global { Line 29: Line 30: private static bool __initialized = false; I …
Last reply by anup_daware, -
-
-
- Administrators
- Leaders
- 6 replies
- 8.7k views
Does anyone know if there is a way to effect the C# 'out' keyword in VB.NET? There is an OutAttribute, but this apparently is only for use when working through the COM Interop. This does seem to be a weakness in VB.NET that bugs me from time to time -- for example, the compiler will warn about an unused variable that has actually been passed into a 'ByRef' parameter, which is the best that VB.NET can do, as far as I can tell... Does anyone know of a way to effect the 'out' keyword in VB? Thanks in advance for any thoughts on this... Mike
Last reply by snarfblam, -
-
-
- Administrators
- 2 replies
- 5.3k views
I know I have seen several threads about this. Working on a program, I needed to achieve the same functionality so I hacked this little example together; I'm sure there's a better way but this works pretty well. System.Diagnostics.Process.Start("C:\\Documents and Settings\\Administrator\\My Documents\\Visual Studio 2005\\Projects\\eBay Search\\EbaySearch.exe") 'while external program is running While bSkipDBCheck = True 'set program running to false (so we don't loop endlessly) bSkipDBCheck = False 'for each process running For Each x As System.Di…
Last reply by Nate Bross, -
-
- 5 replies
- 2.5k views
hi i've a problem when i render my meshes with c#. because every mesh is made of triangles, even actually flat faces with more than three vertices have to be devided into more faces. unfortunately this causes the problems when i render the meshes. at the transitions from one of these faces to the next one i've dark areas. the more faces there are the darker are the areas although the mesh is made up of just one material. here is my code and the mesh : http://www.toomaniac.com/kopi/blender/Render_Mesh.rar thx, kopi
Last reply by kopi_b, -
- 1 reply
- 1.5k views
OK, I'm stumped on this. I've got an ASP.NET 2.0 page with a DetailsView on it, tied to a SQLDataSource. Here's the SQL Server 2000 data table I'm using: [dbo].[CDRL Infromation] ( [cdrlID] [int] IDENTITY (1, 1) NOT NULL , [OPFI #] [varchar] (255) [DID #] [varchar] (50) [Field Instruction Title] [varchar] (255) [Gov Lead] [varchar] (255) [Due] [varchar] (100) [Next Due Date] [datetime] [Current Rev Date] [datetime] [Current Rev] [float] [sME] [varchar] (255) [TECH WRITER] [varchar] (255) [Days to Next Update] [int] Here's the SELECT and UPDATES for the data source: SELECT * FROM [CDRL Infromation] WHERE ([cdrlID] = @cdrlID2) UPDATE [CDR…
Last reply by tfowler, -
- 1 reply
- 1.8k views
Hi all I am using the following javascript stored in a single file: function limitText(limitField, limitCount) { var limitNum = "620"; if (limitField.value.length > limitNum) { limitField.value = limitField.value.substring(0, limitNum); } else { limitCount.value = limitNum - limitField.value.length; } } I have an HTML textarea, called txtHistoryComment. The user should only be able to insert 620 characters into this textarea. I reference the javasript file using the following code in the <head> tag of my page: <script language="javascript" type="text/javascript" src="Scripts\jScripts.js"> </script> I also have an input co…
Last reply by mike55, -
- 1 reply
- 6.3k views
Hi, I found a nice tutorial about printing multiple pages in VB.NET ( http://www.startvbdotnet.com/controls/printdialog.aspx ). But I can't figure it out. ... e.Graphics.MeasureString(Mid(RichTextBox1.Text, intCurrentChar + 1), font,_ New SizeF(PrintAreaWidth, PrintAreaHeight), fmt, intCharsFitted, intLinesFilled) ' calling MeasureString to determine the number of characters that will fit in ' the printing area rectangle e.Graphics.DrawString(Mid(RichTextBox1.Text, intCurrentChar + 1), font,_ Brushes.Black, rectPrintingArea, fmt) ' print the text to the page intCurrentChar += intCharsFitted 'advancing the current char to the last char printed on this page If in…
Last reply by Stoffel85, -
- 1 reply
- 2.2k views
Hi there! I've got quiet a problem here right now. I have a datagrid that includes a multiline-textbox column. This column is shown poperly and I can also edit the text. I turned on: .TextBox.WordWrap = true; so that there is an automatic linebreak if i reach the border of the cell, but i can not create linebreaks myself neither with the return- nor with the enter- key and .TextBox.AcceptsReturn = true; is set but still it does not work... everytime i hit return or enter the edit-process is stopped and the next cell in the column is activated... how can i get the textbox to continue editing and adding a new line? Thanks for any help!
Last reply by Beomer, -
-
- Administrators
- 9 replies
- 1.5k views
Hi I'm trying to use a connection string saved in the web.config, but i'm getting an error Dim conn As New SqlConnection("ConnectionStrings:connCReq.ProviderName") <connectionStrings> <add name="connCReq" connectionString="Data Source=RA\SQLExpress;Initial Catalog=CReq;User ID=ASP;Password=password" providerName="System.Data.SqlClient" /> </connectionStrings> If i copy the ACTUAL connection string in, it works fine. Obviously i dont wish to do this as that would be besides the point of the web.config. Can anybody spot whats wrong please? Thanks
Last reply by Jay1b, -
-
- 1 reply
- 888 views
Hello, Here is the problem; I have built a website that makes and receives orders with management facilities on it (Bit of background). The sessions were working fine doing what they are meant to be doing until lately when they just stopped working, every one of them. Sometimes they will work for a process and then refuse to work again for long periods of testing time. Roughly I would use about 10 sessions over 6 WebPages. Has anyone ever encountered such a problem? Is there such a thing as a limited number of sessions? Might there be a problem with the web config or the IIS? Any thoughts on the matter would be of great help as this is an urgent matt…
Last reply by karths, -
- 0 replies
- 1.2k views
this is how i would check it in 2003 <WebMethod()> _ Public Function Test() As String Dim sc As Microsoft.Web.Services.SoapContext = Microsoft.Web.Services.HttpSoapContext.RequestContext If sc Is Nothing Then _ Throw New System.Web.Services.Protocols.SoapException("Only SOAP requests are accepted", _ New System.Xml.XmlQualifiedName("NotSoapCall")) Return "This is a string" End Function in 2005 i would then import Microsoft.Web.Services3 so i could use SoapContext, but theres no HttpSoapContext that can be found anyone?
Last reply by lamy, -
- 0 replies
- 1.1k views
Hello, Firstly, apologies about posting a similar problem because there have been different answers on what language and approach to take. This time, I'll try to describe the problem clearer. In short, I have to display a rightclick menu only when the user rightclicks on a list item in a listbox. If the mouse is not at a list item, the menu will not appear when the user right clicks the mouse. The listbox is an asp.net control, not a vb forms one. It is part of a custom control which consists of the asp.net listbox, a context menu and a label. The context menu is itself a custom control developed using c#, not one which is created by javascript. However, there is…
Last reply by LiLo,
-
Who's Online 0 Members, 0 Anonymous, 49 Guests (See full list)
- There are no registered users currently online