405 Posted Topics
Can any one tell about the difference between the Abstract Class and Interface? Can abstract class replaces Interface? If all things can be done in Abstract class Why we need Interface? | |
Re: First Parse the Text into DateTime object. Then compare the DateTime objects [CODE=CSharp] string sDateTime = "20/8/2010"; // yearTextBox.Text DateTime textDateTime = DateTime.Parse(sDateTime) ; DateTime compareDateTime = DateTime.Now.AddYears (2); if (textDateTime.CompareTo(compareDateTime) >= 0) { MessageBox.Show("It is greater"); } [/CODE] | |
Re: Hi, I think there is no ZipInputStreams and ZipOutputStream in Dot Net Libraries. It is available in some third party Libraries. Please Visit [URL="http://www.icsharpcode.net/OpenSource/SharpZipLib/"]http://www.icsharpcode.net/OpenSource/SharpZipLib/[/URL] This Zip Library completely implemented in .NET Managed Code. It is free to use in free or commercial products. This may Help to you! | |
Re: HI, Error may from extra brackets and uncommented documentation ... symbols Your corrected codes [CODE=CSharp] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace Project1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } // C# Code //===================================================================== // Clear … | |
Re: Try System.IO.File Class or System.IO.FileInfo Class for these details FileInfo Example [CODE=VB] Dim FileInfos As FileInfo FileInfos = New FileInfo("C:\Windows") Dim sFileInfo As String sFileInfo = "C:\Windows" & vbCrLf sFileInfo = sFileInfo & "Created on " & FileInfos.CreationTime & vbCrLf sFileInfo = sFileInfo & "Last Accessed on " & FileInfos.LastAccessTime … | |
Re: Hi, I think It is not possible in VB6. You have to write code for unload for every form. | |
Re: Hi, You cannot apply & (Logical AND) operator over strings. IF apply what the result you would expect? but it can be applicable to integers. Ex [CODE=C#] int iInt = 10; if ((iInt & 10) == 10) MessageBox.Show("(iInt & 10) == 10 is True"); [/code] | |
Re: To Remove Controls at Runtime fromthe Form Use Controls.Remove ( Ctrl ) Where Ctrl is the Object reference for Control Ex: Assume You have Button1 and Button2. Now the Following will remove button1 when press button2 [CODE=VB.NET] Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Controls.Remove(Button1) … | |
Re: HI, Use string.Remove(StartIndex) method. Ex [CODE=CSharp] string SampleStr = "String Sample1234"; if (SampleStr.Length > 4) SampleStr =SampleStr.Remove(SampleStr.Length - 4); MessageBox.Show(SampleStr); [/CODE] | |
Re: Hi, My suggestion is "add your all controls to any container" such as Picture Box or Frame etc. Make the container as Big as you need. Add a vertical scroll bar when the container goes beyond the form size. Finally, when scroll the scroll bar move the container inside the … | |
Re: > Change the Dock Property of Webbrowser control to Fill the Form. > Change the Form to Screen Size ? Change the FormBorderStyle as None but Must give another way to close the form or close full screen [CODE=VB.NET] Private Sub btnFullScreen_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles … | |
Re: Do you want to implement the Circle, or Line Drawing Algorithm instead of using Graphics.DrawLine(), DrawEllipse () Method? Or You want to make application like paint ? rubberband elastic Drawing? | |
Re: Hi, We cannot find the square root for negative number. Thus System.Math.Sqrt() raises OverFlowException You are trying to FInd the Roots of an Quadratic Equation. Am I right? [CODE] To find Quadratic Equation > First Find Discriminant ((B * B) - (4 * A * C) ) > Then Check … | |
Re: Hi, You have to override Window Procedure for the particular form. I give example that shows Context menu when user right click on the Title bar [CODE=VB.NET] Public Const WM_NCRBUTTONDOWN = &HA4 Public Const WM_NCRBUTTONUP = &HA5 Dim ContMenu As ContextMenuStrip Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As … | |
Re: Hi, Use Mid() function or Left() or Right() function for separating the characters and Len () function for Length . | |
Re: Hi, you can use File.GetCreationTime (Path) to get the File creation time. Ex [CODE=C#] MessageBox.Show(File.GetCreationTime("C:\\Path.txt").ToString ()); [/CODE] Then Check the Date and Time If it old then delete or move it | |
Re: To create array the Syntax is DataType [] ArrayName = new DataType [Size]; Ex [CODE=C#] double [] array1 = new double [10]; [/CODE] To initialize DataType [] ArrayName = new DataType [Size] { Initialize data }; Here Size is optional Ex [CODE=C#] double [] array1 = new double [] {1.0,2.0,3.0,4.0}; … | |
Re: Hi, you can Use ORDER BY FieldName SQL in Queries. This will sort and Display in sorted order in DataGridView. Syntax [CODE=SQL] SELECT fieldlist FROM table WHERE selectcriteria [ORDER BY field1 [ASC | DESC ][, field2 [ASC | DESC ]][, ...]]] [/CODE] Ex [CODE=SQL] SELECT LastName, FirstName FROM Employees ORDER … | |
Re: Yes, I agree dmf1978 points, Property is a special feature in VB6. It encapsulates a private member variable inside a class. For Ex 'in a Class [CODE=VB] Private mLength As Integer Public Property Get Length() As Integer Length = mLength End Property Public Property Let Length(ByVal vNewValue As Integer) mLength … | |
Re: I think no way. VB6 Doesnot provide a way to initialize array (as in other languages) | |
Re: Hi, I cannot understand completely, but i guess your problem [CODE=VB] For i = 0 To b - 1 Do While Not .EOF If ProductID(i) = rsId.Fields("ID") Then 'Update Your Field Here 'Ex rsId.Field ("Field Name") = a ( i ) rsId.Update End If rsId.MoveNext Loop rsId.MoveFirst Next [/CODE] or … | |
Re: Hi, You made a small mistake Change [ICODE] for (Match match2 = new Regex("123").Match(richTextBox1.Text); match2.Success; [B]match2.NextMatch()[/B]) [/ICODE] as [ICODE] for (Match match2 = new Regex("123").Match(richTextBox1.Text); match2.Success; [B]match2 = match2.NextMatch()[/B]) [/ICODE] ie [COLOR="Green"][B]match2 = match2.NextMatch()[/B][/COLOR] Not [COLOR="Red"][B]match2.NextMatch()[/B][/COLOR] | |
Re: Hi, I think no error here. I check it out. But try this [CODE] ADODB.Connection 'Instead of using Connection [/CODE] Also try ADODB.RecordSet | |
Re: Hi, Apparently we know why FileNotFoundException. I think System.Windows.Forms.dll is not located or may not readable. Please check it. | |
Re: Hi, Open With and Command Line Prompt means? Can u specify more? | |
Re: Hi, Instead of specifying the field name use field index and a loop. For Example [CODE=VB] Dim sAdd as String Dim i as Integer For i = 0 To rekod.Fields.Count - 1 sAdd = rekod.Fields(i) & vbTab Next MSFlexGrid1.AddItem sAdd [/CODE] But it cannot be in order unless you specify … | |
Re: Hi, this thread may help to you [URL="http://www.daniweb.com/forums/thread40204.html"]http://www.daniweb.com/forums/thread40204.html[/URL] But the thread discussed about SpeechSDK 4 version. Also refer or Download SpeechSDK 5.1 from [URL="http://www.microsoft.com/downloads/details.aspx?FamilyID=5e86ec97-40a7-453f-b0ee-6583171b4530&DisplayLang=en#filelist"]http://www.microsoft.com/downloads/details.aspx?FamilyID=5e86ec97-40a7-453f-b0ee-6583171b4530&DisplayLang=en#filelist[/URL] It also includes SpeechSDK Sample. Install it and try it. | |
Re: Hi, Try [CODE] Process.GetProcesses(MachineName) function. It will return array of Processes. or To get single Process Process.GetProcessesByName(ProcessName, Machine name) or by ID Process.GetProcessById (ID, MachineName) [/CODE] | |
Re: Hi, I think in vb6 you cannot do this using Shell () function. It just executes the exe files. You can use Win 32 APIs (CreateProcess(), WaitForSingleObject() ...) for this. | |
Re: Hi, I dont have idea about this. but you must know about the image format. | |
Re: Hi, First get the input from the user Say (sName) and use Field Names in your coding not as input. Example [iCODE] Recordset.Find "Name'=" & sName & "'" [/icode] Here you only give the condition (sName or txtName.Text that is Input) and Field name is predefined by your coding. | |
Re: Hi, Use Split() function to split the strings Syntax [CODE] Split(expression, delimiter) Ex. dim Obj as variant Dim sSTring as String sString = "#-0.6 ........" Obj = Split (sString, "|") ..... [/CODE] | |
Re: Hi, [QUOTE]when we write website address in address bar then when we press enter the go buttons click event is must be called[/QUOTE] Use Keydown Event of TextBox(Address Bar) Code for Ctrl + Return [code=vb] Private Sub cmdGo_Click() 'Code to Navigate the Address End Sub Private Sub txtAddress_KeyDown(KeyCode As Integer, … | |
Re: Hi, To use array in property u can specify the Property type as array [CODE=VB.NET] Dim mWalkable as Boolean() ' OR Dim mWalkable() as Boolean Public Property Walkable() As Boolean() Get Return mWalkable End Get Set(ByVal value As Boolean()) mWalkable = value End Set End Property [/CODE] Example for array … | |
Re: Hi, Timer will solve your problem. 1) Use a flag variable that indicates bigger to smaller and smaller to bigger as form level. [iCODE] Dim bBigToSmall as Boolean Dim iNoOfTimes As Integer Private Sub Form_Load() bBigToSmall = False Timer1.Interval = 100 Timer1.Enabled = False End Sub [/ICODE] 2) Inside timer, … | |
Re: Hi, GetPixel() returns the combination of Red, Green and Blue. So the Color you are checking [iCODE] clr = GetPixel(pic1.hdc, i, k) If clr = vbGreen Then [/iCODE] This will check only Red is 0, Blue is 0 and Green is 255. But you may need to separate the Color … | |
Re: [QUOTE=arun_kumar112;652346]Hi All, I am new programmer, I have to create list of item which are selected from list box . It should be displayed like " a,b,c,d,e,f " How can I do ? it can be in a string or numeric . only selected Item is required to display displayed" … | |
Re: Hi, If you read in format (String, String, Number , Number ...) ie you know exact size what you need to read and write, then use Random Access Files. That is Make a Structure for this Ex [CODE=vb] Type ReadData ....... Text1 As String * 255 Text2 As String * … | |
Re: First Dont make the Login form as MDI Child. When Showing Login Form Use ShowDialog () Instead of Show() to Show the Form Modally and Set Owner is MDI Ex[CODE] LoginForm.ShowDialog(MDIMainForm); [/CODE] | |
| |
Re: [QUOTE]Suppose If I want to delete the Record 1^^Neha. Then the Error is coming??[/QUOTE] Hi, this mean you want to raise error, while delete this record?. [QUOTE]how to delete that record from the TextFile Cz I have no idea how to do it??[/QUOTE] One idea You are loading the records … | |
Re: Hi, TreeNodeCollection is a Collection of Nodes and your object treeNodes does not refer any collection. so you getting that error Do you want like that [CODE] Dim treeNodes As TreeNodeCollection treeNodes = TreeView1.Nodes [/CODE] Or Are you want to copy all the nodes to your own collection or another … | |
Re: you can use for loop for this [code=vb] Dim L1 As Long Dim i As Integer, iT As Long 'Last Control's Top and Height iT = Label1(Label1.UBound).Top + Label1(Label1.UBound).Height For i = 0 To 1 L1 = Label1.UBound + 1 Load Label1(L1) 'First Control's Left property and Total Width Label1(L1).Move … | |
Re: Hi, To relate code and object, class module can be useful. Inside a class module have a reference of Form or Picture box. [code] 'In class Module Dim A as Form1 'or Dim A as PictureBox so you can use 'If it is Form A.Picture1.BackColor = vbRed 'If it is … | |
Re: -> Draw ContextMenuStrip (ContextMenuStrip1) from the ToolBox -> Make Form (or any control) ->ContextMenuStrip to ContextMenuStrip1 | |
Re: Hi, Rnd () function generates random number. [CODE=vb] Dim iNumber As Integer Randomize iNumber = Int(2 * Rnd) If iNumber = 1 Then 'Head Else 'Tail End If [/CODE] This code generates 0 or 1 randomly | |
Re: yes, my suggestion is to select TextBox with lock property to True because you can copy from textbox but ListBox and Combobox not having this facility. | |
Re: Add two columns ID and Name [CODE=C#] dataGridView1.Columns.Add("ID", "ID"); dataGridView1.Columns.Add("Name", "Name"); [/CODE] First String for reference , second for display This should be in form load. To add Details [CODE=C#] dataGridView1.Rows.Add("001", "Name of Player"); [/CODE] | |
Re: Hi, i think GraphicsPath class may also helpful |
The End.