405 Posted Topics
Re: Hi Kavitha, Please clearly specify what you trying to do. | |
Re: [QUOTE]how can i make a circular form by using c#[/QUOTE] Hi, I posted a code (Forms in Different Shapes) in code snippet. i believe this code snippet may helpful for you. [URL="http://www.daniweb.com/code/snippet899.html"]http://www.daniweb.com/code/snippet899.html[/URL] | |
Re: To execute t he Corresponding Query first Generate you SQL by checking the Checkbox. [CODE] Dim sSQL as String Dim con As ... .. .. sSQL = .... 'Your Default Query If CheckBox1.Checked = True Then sSQL = .... End If If CheckBox2.Checked = True Then sSQL = .... End … | |
Re: Hi, There is no way to color the particular row of DBGrid Control. It is very rigid. I think the error at [iCODE] If Val(Text1.Text) <> "" Then and If Val(Text2.Text) <> "" Then [/ICODE] because you are converting text1.Text to Numbers and Checking with Strings so the Type Mismatch … | |
Re: Hi, Are you using any loop? Then use [B]DoEvents [/B]inside the loop. If you call DoEvents in your code, your application can handle the other events. Ex [CODE] For ............ DoEvents ................ Next [/CODE] | |
Re: Yes, This control is ListView. To draw the Similar, as Jx_Man said insert Component (Microsoft Windows Common 6.0(sp6)) into your project and Change the Following property. [I]View - Report (lvwReport) Gridlines - True (To show Gridlines) ColumnHeaders - To add the Column Headers[/I] | |
Re: One way to do this, Register you hot key in Registry. Or Hook the Keyboard Procedure. The second one is hard. | |
Re: I give algorithm you try it in C# [B]HCF (GCD) Algorithm[/B] GCD ( M, N ) { If N > M then return GCD ( N, M ) else If N = 0 then return M else return GCD ( N, MOD ( M, N) ) } It is simple … | |
Re: Use Timer to Change the Time. The appreciated interval is 1000 (1 Sec). Inside Timer_Tick Event do your Coding. [CODE=C#] private void tmrTime_Tick(object sender, EventArgs e) { //Periodically update the values //Your Coding } [/CODE] | |
Re: You can access the button thru form2 object instance after changing the modifier as public like [CODE] private void button1_Click(object sender, EventArgs e) { FrmAdvocaat form2 = new FrmAdvocaat(); form2.Show(); [B]form2.BtnAdvocaat.Enabled = false;[/B] } [/CODE] | |
Re: Yes, DateDiff() function will find the Difference between two Dates or two Times. [B][COLOR="Blue"]Syntax [/COLOR][/B] Function DateDiff( Interval As String, Date1 As Date, Date2 As Date) Interval may be d -Day, y -Day of year, h -Hour, n -Minute, m -Month, s -Second, w -weekday, ww - week, yyyy -Year … | |
Re: To display username in Status Bar [CODE] StatusBar1.Panels(1).Text = Username [/CODE] | |
Re: [QUOTE=santoo;607342]Hi, Can anyone let me know how to list all the users from a windows active directory using C#. thanks. santosh.[/QUOTE] Hi, First include System.DirectoryServices.dll. Then try this code [CODE=C#] DirectoryEntry directoryEntry = new DirectoryEntry("WinNT://" + Environment.MachineName); string userNames="Users : "; foreach (DirectoryEntry child in directoryEntry.Children) { if (child.SchemaClassName == … | |
Re: Hi, To get the Hover Item, Use MousePosition property and CheckedListBox.IndexFromPoint Function. Ex [CODE=VB.NET] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load For i As Integer = 0 To 10 CheckedListBox1.Items.Add(i) Next End Sub Dim iInd As Integer Private Sub CheckedListBox1_MouseMove(ByVal sender As Object, ByVal e … | |
Re: Hi, You can use Microsoft XML, Version 2.0 or any to parse XML FIles. Include Microsoft XML, Version 2.0 or any Type Library in to your project > Project > Reference > Microsoft XML, Version 2.0 or any version This below link will help u [URL="http://msdn.microsoft.com/en-us/library/ms766564%28VS.85%29.aspx"]http://msdn.microsoft.com/en-us/library/ms766564%28VS.85%29.aspx[/URL] | |
Re: HI, I hope this website tutorial may help you [URL="http://www.functionx.com/vb/fileprocessing/introduction1.htm"]http://www.functionx.com/vb/fileprocessing/introduction1.htm[/URL] | |
Re: This example may help you [CODE=vb6] ' In Module1 Public Sub CallMe(sValue As String) MsgBox "This is CallMe + " & sValue End Sub 'In Form1 Public Sub CallToCallMe() CallMe "Hi" End Sub Private Sub Command1_Click() CallToCallMe End Sub [/code] | |
Re: [code] Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean) Me.Hide ' or Me.Enabled = False End Sub Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant) Me.Show 'Me.Enabled = True End Sub [/code] This … | |
Re: Hi, You can use ListIndex to get the Selected Index of ListBox or ComboBox. [QUOTE]How to copy an item selected in a Listbox present in Form1 into a Combobox present in another form-Form2. [/QUOTE] [CODE] If ListBox1.ListIndex >= 0 Then Form2.ComboBox1.AddItem Form1.ListBox1.List(ListBox1.ListIndex) End If [/CODE] If you want all the … | |
Re: I think You want your program should not be display in TaskBar? I Hope, [B][COLOR="Green"]Form.ShowInTaskbar[/COLOR][/B] Property may Help you. Set This property to false, your application will not show in the TaskBar | |
Re: [QUOTE]cSS[] subskill = new cSS[5];[/QUOTE] This allocate only memory for Array object subskill not for its elements. So you need to allocate memory for each elements. [QUOTE]subskill[0] = cSS(id, name, effect, bought, cost);[/QUOTE]Instead use [iCODE] subskill[0] = new cSS(id, name, effect, bought, cost); [/ICODE] | |
Re: Use BeforeNavigate Event and NavigateComplete Event. Ex. Draw a Command Button (Command1) and PictureBox (Picture1) Draw WebBrowser Control (WebBrowser1) inside PictureBox [CODE=VB6] Private Sub Command1_Click() WebBrowser1.Navigate ("www.google.co.in") End Sub Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, … | |
Re: To calculate after 30 days you can use DateAdd() function Example Draw two MaskEdit Controls and One Command Button [CODE=VB] Private Sub Command1_Click() Dim FormatDate As String Dim DateAfter30Days As Date DateAfter30Days = CDate(MaskEdBox1.Text) DateAfter30Days = DateAdd("d", 30, DateAfter30Days) FormatDate = Format(DateAfter30Days, "dd/MM/yy") MaskEdBox2.Text = FormatDate End Sub Private Sub … | |
Re: Hi, I am also having this problem. but i solved this using Printer.PaintPicture. To print invoice, you draw lines and text in any picture box then use this Printer.PaintPicture Method to print the invoice. The picture box or form you are using to draw invoice must represent the real unit. … | |
Re: My Suggestion for VB.NET [URL="http://www.functionx.com/vb/index.htm"]http://www.functionx.com/vb/index.htm[/URL] | |
Re: [QUOTE=buzincarl;640001][ICODE]Private Sub Form_Load() Dim tmp() As String Dim i As Integer Open App.Path & "\links.txt" For Input As #1 tmp() = Split(Input(LOF(1), 1), vbCrLf) Close #1 For i = 0 To UBound(tmp) DL.Download tmp(i), App.Path & "\" & ExtractFileName(tmp(i)), "k" & i Label2.Caption = "Connecting..." Next i End Sub Private … | |
Re: U can use, Adding Reference to your project or Adding items to your toolbox (ActiveX Control) according to the ActiveX Object. | |
Re: Hi, Change the Modifier of TextBoxes to Public in the User Control. Or Make Appropriate Properties to Access the Textbox for example In usercontrol [CODE=VB.NET] Public ReadOnly Property MyTextBox1() As TextBox Get Return TextBox1 End Get End Property [/CODE] Then [ICODE] Usercontrol1.MyTextBox1.Text = "Something" [/ICODE] | |
Re: Hi, To select a particular item use ListIndex property [CODE] combo1.ListIndex = rset.field ( "id" ) [/CODE] Its enough, but to protect from errors [CODE] Dim iV as Integer ' To avoid Null of record and Convert it to integer iV = Val ( rset.Fields( "id" ) & "" ) … | |
Re: Hi, Please Replace [CODE] Private Declare Function SetCurDir Lib "kernel32" Alias "SetCurrent[B][COLOR="Red"]D[/COLOR][/B]irectoryA" (ByVal lpPathName As String) As Long [/CODE] instead [CODE] Private Declare Function SetCurDir Lib "kernel32" _ Alias "SetCurrentdirectoryA" (ByVal lpPathName As String) As Long [/CODE] The API function name(SetCurrentDirectoryA) is case sensitive. | |
Re: Hi, To calculate percentage [CODE] Private Sub Command1_Click() Dim MyValue1 As Integer Dim MyValue2 As Integer MyValue1 = Int((20 * Rnd) + 1) MyValue2 = Int((20 * Rnd) + 1) Label1.Caption = MyValue1 Label2.Caption = MyValue2 Label3.Caption = "" Text1.Text = "" Text2.Text = ctr ctr = ctr + 1 … | |
Re: Hi, warun. I think for your three questions, 'no' is the answer. But Separate ImageCombo is available. ImageCombo is available in Microsoft Common Controls 6. | |
Re: Hi, ComboBoxes in vb6 dont have OnChange() Event, it has Change () event occurs only when typing on the Text of Combobox. Whenever change the items in Combobox it triggers Click () Event. So u can place your code insite Click() event. [CODE] Private Sub Combo1_Click() ' YourCode 'Dim name … | |
Re: Hi i dont know how to embed a .wmv into your .exe. but you can use Absolute path (App.Path) to represent your file name in your coding. You should have your file in the directory where your exe file is located. For Example [ICODE]Dim sPath as String sPath = App.Path … | |
Re: Hi, I think, it is possible when u use MSOffice Type Library. To read word file, you need Microsoft Word (Version No) Object Library. To add reference [B]> Project -> Reference -> Microsoft Word (Version No 11 or 12) Object Library [/B] Now Try the coding Create Word File as … | |
Re: Hi, Draw a Combobox(ComboBox1) [CODE] ComboBox1.AddItem "Mr" ComboBox1.AddItem "Mrs" ComboBox1.AddItem "Miss" [/CODE] | |
Re: Hi Try [COLOR="Red"][B]Application.StartupPath[/B][/COLOR], It Gets the path for the executable file that started the application, not including the executable name. Your Code might be [CODE] MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Application.StartupPath & "\Lensesdb.mdb;" [/CODE] | |
Re: Hi, This thread [URL="http://www.daniweb.com/forums/thread116513.html"]http://www.daniweb.com/forums/thread116513.html[/URL] may help u. | |
Re: Hi, Make few changes in your coding. First, [code] Private Sub Command1_Click() Dim MyValue1 As Integer Dim MyValue2 As Integer [B][COLOR="Red"]Randomize[/COLOR][/B] MyValue1 = Int((20 * Rnd) + 1) MyValue2 = Int((20 * Rnd) + 1) End Sub [/code] Second, [CODE] Private Sub Command2_Click() Dim aa As Integer Dim bb As … | |
Re: To select ListItems you can use ListView1.SelectedItems. This is a collection of Selected List Items. You can refer first selected item as ListView1.SelectedItems(0) [ICODE] if ListView1.SelectedItems.Count > 0 then Dim selection As ListViewItem = ListView1.SelectedItems(0) ' Your Selected code End If [/ICODE] | |
Re: Hi [QUOTE]Dim obj As New Form1[/QUOTE] This creates everytime a new Form1 object so ListView must be clear.Each time you referring different object instance of Form1. If you want previous value then you have to have "obj" as Form member not a local object. ex [CODE] Class Form2 Dim obj … | |
Re: Hi, When creating package of your application , you can add your file like VBRuntime OLE, any Activex ctrls, any dll. U can see Add button on the Right side. Use this and Add ur database. In the installation Location of wizard dont forget to chrck the location is $AppPath … | |
Re: Hi, I think There is no method of StreamWriter.WriteLine ( string, FileMode, FileAccess); But you can open File in Append Mode in Constructor [B]StreamWriter ( string file, bool Append) ;[/B] You Change the code as [CODE] //Append Mode [B]private StreamWriter outputfile = new StreamWriter("c:\\testfile.txt",[COLOR="Red"] true[/COLOR]);[/B] public void SetFile() { this.outputfile.WriteLine("Test"); … | |
Re: Similar to Veena, I give another way [CODE=VB] Dim TDate As Date TDate = Date MsgBox TDate + 15 [/CODE] Still same result [B][COLOR="Red"]Note:[/COLOR][/B] Date object plus number will work only for days addition, but DateAdd() function will work for any interval | |
Re: Hi, You can use DateAdd () Function [B][U]Syntax[/U][/B] [I] DateAdd ( Interval As String, Number As Double, DateValue As Date ) As Date[/I] [B][U]Parameters[/U][/B] [B]Interval [/B]- String expression representing the time interval you want to add Give interval as "ww" for week [B]Number [/B]- Floating-point expression representing the number of … | |
Re: Hi, Do u ask you have to receive your keypress event even the form is not visible and not having focus? | |
Re: Hi, When create the textbox give unique name. And in Click event you receive the sender object, Typecast it to textbox and check the name you want. Ex [CODE=C#] TextBox[] textArray; public Form1() { InitializeComponent(); textArray = new TextBox[10]; for (int i = 0; i < 10; i++) { TextBox … | |
Hi Friends, I've chosen my mini project as Voice Recognition. basically i dont have any idea about voice recognition except Microsoft Speech SDK. It is well for english language, but i dont know how to use this for my language (Tamil - South Indian Language). Is this can be applicable … | |
Re: Hi, I think you cannot merge your sound file into exe file by the way of your compilation. but can add these files in deployment. Also instead of giving the Full Path ("c:\additional\loktar.wav") , u can give the relative path. First you place the wav files (or directory) to the … | |
Re: Hi, yilmazhuseyin was given good idea. My Suggestion, instead of changing the visible property of pictureBox, change the picture using timer. For Ex: [ICODE] private bool change = true; private void timer1_Tick(object sender, EventArgs e) { if (change == true ) pictureBox1.Image = Image.FromFile ("c:\\a.bmp"); else pictureBox1.Image = null; change … |
The End.