2,245 Posted Topics
Re: You shouldn't want to stop base constructors from being called -- ever. This is probably a design issue so please post more code or what your intensions are. If a base class implements a [icode]List<string>[/icode] that and has classes the derive from it -- then it stands to reason they … | |
Re: That depends what you want to do. Do you want to support cisco hardware? Then CCNA is the route to take. Or do you want to support Windows servers? If so then I would take MCSE. | |
Re: Upload the project you have so far and someone will be glad to take a look at it and help implement the functionality required | |
Re: You can close any number of forms you want at runtime. The only limitation is how you choose to go about it. Explain the call order for these forms. Here is one way to go about it: [code] namespace daniweb { public partial class frmHTTP : Form { private frm1 … | |
Re: This should do the trick: [code] Imports System.Globalization Public Class frmFormat Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim nfi As NumberFormatInfo = New CultureInfo("en-US", False).NumberFormat nfi.NumberDecimalSeparator = "," nfi.NumberGroupSeparator = "." Dim tempBASIC As String = "150000" Dim decResult As Decimal = ((tempBASIC / … | |
Re: You could stun your professor and take this one step further -- submit the credit card to a merchant for payment processing. They will do extensive validation on the card number :) | |
Re: That is because you're not returning a value. There are two possible fixes here. [code] public [COLOR="Red"]string [/COLOR]Main(string[] args) [/code] The highlighted section of the code means that it is expecting for you to return a string value. So we can return a string value or change the declaration to … | |
Re: [QUOTE=adatapost;985608][code] string[] ar = listBox1.SelectedItems.Cast<string>().ToArray<string>(); [/code][/QUOTE] That is handy! For unboxing casts I have always used the .ConvertAll() but this is much easier to call :) What I have been doing: [code] double[] sArray2 = lst.ConvertAll<double>(new Converter<decimal, double>(Convert.ToDouble)).ToArray(); [/code] | |
Re: No you can't. You need to use a client side [icode]alert()[/icode] with javascript. You can read about client side events here: [url]http://www.eggheadcafe.com/articles/20041016.asp[/url] | |
Re: You can do it in code with all the text boxes. In this case I have textBox1 thru textBox10: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb.textboxes { public partial class Form1 : Form { private TextBox[] _textBoxCollection; public … | |
Re: Could you post the actual IP address you are trying to reverse? There are many things to look at here and it is difficult without knowing the actual IP address. I need to know the outbound IP of your mailserver and the IP of your DNS server. | |
Re: This should do the trick: [code=vb.net] Public Class frmKeyboard Private Sub frmKeyboard_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress 'Stops user key presses e.Handled = True End Sub Private Sub frmKeyboard_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Give the form access to key presses before … | |
Re: Its amazing after the world almost ended for Y2K that people would use anything other than a 4 digit year! | |
Re: Are you sure its not using gcc? Most distros alias 'cc' to 'gcc' which is probably what is happening here. [code] sk@sk:~$ which cc /usr/bin/cc sk@sk:~$ ls -al `which cc` lrwxrwxrwx 1 root root 20 Oct 15 2004 /usr/bin/cc -> /etc/alternatives/cc sk@sk:~$ ls -al /etc/alternatives/cc lrwxrwxrwx 1 root root 12 … | |
Re: I use just about every search engine for SEO but I only use google when I want to find something. That being said I had to put yes... | |
Re: Do you literally mean *draw* the DataTable as in render it like a control -- or do you mean load a table on a form while a [ICODE]DbConnection[/ICODE] is open? Here is an example of loading a DataTable on a form while having an OleDb connection open: [code] Imports System.IO … | |
Re: One other field you may be interested in is [icode].DataPropertyName[/icode] if you're looking for the bound field's name. You would access it the same way adatapost showed you in his post. | |
Re: I am in the same situation. Currently I am a software developer but i'm going for a BS/Computer Science -- and a BBA/Undecided. Then i'm going for my MBA. I think 10 years from now I might be done with programming all day and want to move up the corporate … | |
Re: What language is the original software written in? Also take the buffer you receive and write it to a text file and upload it here. | |
Re: [QUOTE=kaninelupus;984909]Hmmm... does make one think. Does not that turn the "donation" into a "subscription fee"? Not against subscriptions, but all for calling things what they truly are.[/QUOTE] You are "subscribed" to daniweb right now for free... so it wouldn't be a "subscription fee", right? Unless you want to call it … | |
Re: [code] Private Sub populate() 'Instantiating a new connection con = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ System.Environment.CurrentDirectory.ToString() & "\DataBase.mdb") ' 'Opening the connection con.Open() 'Instantiating a new data adapter dAdapt = New Data.OleDb.OleDbDataAdapter("select * from Watches", con) 'Instantiating a new dataset dSet = New DataSet 'Populating the dataset with the results … | |
Re: Why are you comparing to make sure it isn't equal to the fromDate and toDate? Also is this MSSQL? [code=sql] Declare @StartDate DateTime, @EndDate DateTime Set @StartDate = Cast('1/1/2009' as DateTime) Set @EndDate = Cast('1/1/2010' as DateTime) Select * From Invoice Where OrderDate >= @StartDate and OrderDate < @EndDate --or … | |
Re: You can also use OleDb to display the data: [code] Imports System.IO Imports System.Data.OleDb Public Class frmExcel Private Shared Function GetExcelConnString(ByVal FileName As String, ByVal FirstRowContainsHeaders As Boolean) Dim sFirstRow As String If (FirstRowContainsHeaders) Then sFirstRow = "Yes" Else sFirstRow = "No" End If Dim ext As String = Path.GetExtension(FileName) … | |
Re: This will open the Excel spreadsheet with the defaul ".xlsx" handler. You just need to ensure they have Office installed: [code] private void button4_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start(@"C:\Data\Spreadsheet.xlsx"); } [/code] | |
Re: On the client maches you need to write the stderr and stdout to a text file. If an app crashes before [icode]Application.Run()[/icode] it will write out the diagnostic info: [code=dos] AppName.exe >> debug.txt 2>&1 [/code] After the app crashes take a look at debug.txt and it should indicate your problem | |
Re: > I'm still noticing in the C++ section that [noparse][code][/code][/noparse] is adding line numbers and saying "C++ Syntax". It's not supposed to do that, correct? You can get around that behavior. Take a look at [this post](http://www.daniweb.com/forums/post981568.html#post981568). | |
Re: Try this: [code] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim idx As Integer = DataGridView1.Rows.Add() DataGridView1.Rows(idx).Cells(0).Value = "Abc" DataGridView1.Rows(idx).Cells(1).Value = "123" DataGridView1.Rows(idx).Cells(2).Value = "456" End Sub [/code] | |
Re: As far as I know the "X" just sends the form close message to your form and you cannot distinguish the caller. This will work though: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb { public partial class frmImage … | |
Re: I also wanted to point out that .NET has a [icode]Dictionary<>[/icode] class that may do what you want. Other than that i'll wait next to danny on seeing more code. | |
Re: Upload your project with the database. There is probably something that can be done to improve the performance. | |
Re: This should do the trick: [code=vb.net] Public Class Form1 Private Sub OpenPicture() If (OpenFileDialog1.ShowDialog() = Windows.Forms.DialogResult.OK) Then PictureBox1.SuspendLayout() ClearPicture() PictureBox1.Image = Image.FromFile(OpenFileDialog1.FileName) PictureBox1.ResumeLayout() End If End Sub Private Sub ClearPicture() Dim img As Image = PictureBox1.Image img = PictureBox1.Image PictureBox1.Image = Nothing If Not (img Is Nothing) Then img.Dispose() End … | |
Re: This is slow: [code] private void button1_Click(object sender, EventArgs e) { Bitmap bmp = (Bitmap.FromFile(@"C:\letter.bmp") as Bitmap); pictureBox1.Image = bmp; Bitmap bmp2 = (bmp.Clone() as Bitmap); for (int x = 0; x < bmp.Width; x++) { for (int y = 0; y < bmp.Height; y++) { Color c = bmp2.GetPixel(x, … | |
Re: [QUOTE=serkan sendur;983867]when it comes to mobile development, you guys have no idea, do you?[/QUOTE] Nope :( I don't even know how to create a project using the compact framework. I have been tempted to look in to it a time or two when you have asked a question. | |
Re: Developer express is awesome! :) Unfortunately I do not see a question in what you posted. Developer express is a set of controls and has nothing to do with your database. Please elaborate. | |
I think the username completion feature pops up in a rather awkward spot. See the screenshots | |
Re: Post the code you have so far and we'll go from there! | |
Re: You should largely disregard DNS for identifying the original of an IP address. DNS names can be set up anywhere and there is significant overhead with performing a DNS resolution on inbound IPs which will eventually plug up your server. What you should do is find a database of IP … | |
Re: Use HttpWebRequest and fill out the form fields. You're going about this task the wrong way :) You want a 'scraper' that downloads content. | |
Re: Drop a button and a panel on a form and try this code: [code] Public Class frmDynamic Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim lastComboBox As ComboBox = Nothing Dim i1 As Integer For i1 = 0 To 10 lastComboBox = GetComboBoxUnder(lastComboBox) Panel1.Controls.Add(lastComboBox) Next … | |
Re: Post a sample XML file here. It requires an API key to get the information and I don't feel like signing up :) You can scrub the file before you load the data in to a DOM. | |
Re: [code=c#] static void GetInstalled() { string uninstallKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(uninstallKey)) { foreach (string skName in rk.GetSubKeyNames()) { using (RegistryKey sk = rk.OpenSubKey(skName)) { Console.WriteLine(sk.GetValue("DisplayName")); } } } } [/code] Borrowed from: [url]http://weblogs.asp.net/rosherove/archive/2003/09/24/28864.aspx[/url] | |
Re: Pass a [icode]Control[][/icode] array in the constructor. Or you can make a struct so you can assign controls to the struct and pass the struct -- that way you don't have 90 parameters :) You should leave a parameterless constructor for your form in place. Visual Studio's designer requires a … | |
Re: Maybe if you started your own thread instead of posting to an old thread you would receive help. | |
Re: Perhaps if you asked a specific question. I would being by going to "File -- New Project" then selecting the type of project you wish to create. | |
Re: Are you using parameterized SQL? Post the code where you are inserting the data and post the sample data that is causing the issue. Also paste the _full exception_ thrown. | |
Re: This is a design choice. I personally let the last person to make the change overwrite the other persons data. If you use a DataSet in .NET generated code it has an option for optimisitic concurrency where you can tell it to throw an exception if someone has modified the … | |
Re: You need to issue a backup command to the SQL Server and then archive the .bak file. You never want to access the .mdf and .ldf files directly. Use this query: [code] BACKUP DATABASE [[COLOR="Red"]DBName[/COLOR]] TO DISK = [COLOR="red"]'C:\Program Files\Microsoft SQL Server\MSSQL\BackUpManual\DBName.bak[/COLOR]' WITH INIT , NOUNLOAD , NAME = N'[COLOR="red"]DBName[/COLOR] … | |
Re: pw_jamison: Please create your own thread to ask questions, and do not append them to someone elses thread. This thread has been sitting here since 2006! To answer your question you can impersonate a user: [code=c#] using System.Runtime.InteropServices; // DllImport using System.Security.Principal; // WindowsImpersonationContext using System.Security.Permissions; // PermissionSetAttribute ... public … | |
Re: First -- This is more of an ASP.NET question than C# and should be posted in the ASP.NET forum. A moderate will move it for you so please don't create a new thread. Second -- You should consider marking your threads solved as you find answers for them. Eventually people … | |
Re: Save the .cs file, or copy the code to your clipboard from visual studio then open notepad and paste the contents, then save the file. Just treat it like any other text file. |
The End.