405 Posted Topics

Member Avatar for kavithabhaskar
Member Avatar for arupa

[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]

Member Avatar for selvaganapathy
0
72
Member Avatar for kavithabhaskar

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 …

Member Avatar for rohitbce
0
144
Member Avatar for chanthung

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 …

Member Avatar for chanthung
0
313
Member Avatar for nschessnerd

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]

Member Avatar for nschessnerd
0
89
Member Avatar for ochien

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]

Member Avatar for ochien
0
121
Member Avatar for Dell XPS

One way to do this, Register you hot key in Registry. Or Hook the Keyboard Procedure. The second one is hard.

Member Avatar for Dell XPS
0
251
Member Avatar for arupa
Re: HCF

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 …

Member Avatar for puneetkay
0
105
Member Avatar for mzd12111

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]

Member Avatar for selvaganapathy
0
89
Member Avatar for thijscream

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]

Member Avatar for thijscream
0
2K
Member Avatar for vw_eng

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 …

Member Avatar for selvaganapathy
0
111
Member Avatar for nanawan
Member Avatar for Jx_Man
0
109
Member Avatar for santoo

[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 == …

Member Avatar for selvaganapathy
0
2K
Member Avatar for sniper1983

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 …

Member Avatar for selvaganapathy
0
286
Member Avatar for karthiknv

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]

Member Avatar for karthiknv
0
235
Member Avatar for Ixeman

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]

Member Avatar for Ixeman
0
88
Member Avatar for veledrom

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]

Member Avatar for QVeen72
0
353
Member Avatar for mykar_88

[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 …

Member Avatar for mykar_88
0
171
Member Avatar for karthik1

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 …

Member Avatar for selvaganapathy
0
114
Member Avatar for reniies

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

Member Avatar for reniies
0
267
Member Avatar for Snipes

[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]

Member Avatar for selvaganapathy
0
74
Member Avatar for mykar_88

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, …

Member Avatar for selvaganapathy
0
127
Member Avatar for fa_hed

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 …

Member Avatar for selvaganapathy
0
206
Member Avatar for bhoot_jb

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. …

Member Avatar for selvaganapathy
0
1K
Member Avatar for SWdevelopment

My Suggestion for VB.NET [URL="http://www.functionx.com/vb/index.htm"]http://www.functionx.com/vb/index.htm[/URL]

Member Avatar for sierrainfo
0
171
Member Avatar for buzincarl

[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 …

Member Avatar for Jishnu
0
177
Member Avatar for jainendra.shah

U can use, Adding Reference to your project or Adding items to your toolbox (ActiveX Control) according to the ActiveX Object.

Member Avatar for selvaganapathy
0
74
Member Avatar for tirso

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]

Member Avatar for selvaganapathy
0
115
Member Avatar for veledrom

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" ) & "" ) …

Member Avatar for selvaganapathy
0
121
Member Avatar for Reg74

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.

Member Avatar for Reg74
0
438
Member Avatar for jbimontes

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 …

Member Avatar for Jx_Man
0
141
Member Avatar for warun

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.

Member Avatar for warun
0
101
Member Avatar for EddyLLC

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 …

Member Avatar for selvaganapathy
0
337
Member Avatar for ibesokewl24

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 …

Member Avatar for selvaganapathy
0
91
Member Avatar for apuamy

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 …

Member Avatar for apuamy
0
90
Member Avatar for veledrom

Hi, Draw a Combobox(ComboBox1) [CODE] ComboBox1.AddItem "Mr" ComboBox1.AddItem "Mrs" ComboBox1.AddItem "Miss" [/CODE]

Member Avatar for veledrom
0
191
Member Avatar for jaytheguru

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]

Member Avatar for regcure
0
353
Member Avatar for veledrom

Hi, This thread [URL="http://www.daniweb.com/forums/thread116513.html"]http://www.daniweb.com/forums/thread116513.html[/URL] may help u.

Member Avatar for veledrom
0
125
Member Avatar for jbimontes

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 …

Member Avatar for selvaganapathy
0
135
Member Avatar for ninjaimp

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]

Member Avatar for ninjaimp
0
209
Member Avatar for ruchika beddy

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 …

Member Avatar for selvaganapathy
0
125
Member Avatar for bhoot_jb

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 …

Member Avatar for selvaganapathy
0
204
Member Avatar for mrjoli021

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"); …

Member Avatar for mrjoli021
0
99
Member Avatar for chanthung

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

Member Avatar for chanthung
-1
1K
Member Avatar for era_chatterbox
Re: Era

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 …

Member Avatar for selvaganapathy
0
118
Member Avatar for Dajak

Hi, Do u ask you have to receive your keypress event even the form is not visible and not having focus?

Member Avatar for selvaganapathy
0
80
Member Avatar for KJBB

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 …

Member Avatar for KJBB
0
292
Member Avatar for selvaganapathy

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 …

Member Avatar for Jx_Man
0
135
Member Avatar for Siten0308

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 …

Member Avatar for selvaganapathy
0
207
Member Avatar for Gaurav arora

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 …

Member Avatar for Gaurav arora
0
2K

The End.