5,346 Posted Topics
Re: You might want to read a discussion - [URL="http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.dotnet.languages.vb&tid=f10dcbbe-908d-45b2-ac11-0819f89d714f&cat=&lang=&cr=&sloc=&p=1"]Bound vs unbound controls.[/URL] | |
Re: [b]>What harm could making the bool variable public do?[/b] Here is a blog, explaining some differences.[URL="http://www.codinghorror.com/blog/archives/000654.html"]Properties vs. Public Variables[/URL] SUMMARY: [LIST] [*]Reflection works differently on variables vs. properties, so if you rely on reflection, it's easier to use all properties. [*]You can't databind against a variable. [*]Changing a variable to … | |
Re: Use Parameterized query. [code] Public Function ReturnEmployee(ByVal empid As Integer) As Employee Dim name As String name = "janet" Dim sqlconn As SqlConnection = New SqlConnection("server=127.0.0.1;user id=sa;password=;database=northwind") Dim sqlDA As SqlDataAdapter = New SqlDataAdapter("select firstname, lastname, title from employees where employeeid= @empid and lastname=@lastname", sqlconn) sqlDA.Parameters.AddWithValue("@empid",10) sqlDA.Parameters.AddWithValue("@lastname",name) Dim dt As … | |
Re: Find() method of DataView return the row index. [code] ds.Tables("employees").DefaultView.Sort = "sno" Me.BindingContext(ds.Tables("employees")).Position = ds.Tables("employees").DefaultView.Find(TextBox1.Text) [/code] | |
Re: You need to show effort, and what better way than posting the code that you have tried so far? Read [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]member rules[/URL]. | |
Re: [QUOTE]From the [URL="http://msdn.microsoft.com/en-us/library/fs2xkftw%28VS.71%29.aspx"]MSDN [/URL]article:[/QUOTE] Dispose will be called automatically if the form is shown using the Show method. If another method such as ShowDialog is used, or the form is never shown at all, you must call Dispose yourself within your application. | |
Re: Take a look at this [URL="http://social.msdn.microsoft.com/forums/en-US/vbgeneral/thread/15c12a31-5511-4854-af24-dc0820948cbd/"]thread.[/URL] | |
Re: PrimaryKey property of DataTable. [code] ds.Tables("tableName").PrimaryKey=new DataColumn(){ ds.Tables("tableName").Columns("fieldName")} [/code] | |
Re: ToString() method, [code] str1=DateTimePicker1.Value.ToString("dd") str2=DateTimePicker1.Value.ToString("MM") str3=DateTimePicker1.Value.ToString("yy") [/code] | |
Re: [b]>Is it possible without database.? [/b] Yes. Create [URL="http://en.wikipedia.org/wiki/Comma-separated_values"]CSV[/URL] file and have an [URL="http://msdn.microsoft.com/en-us/library/system.net.mail.attachment.aspx"]email attachment[/URL]. | |
Re: [URL="http://msdn.microsoft.com/en-us/library/ms998314.aspx"]Role-Based[/URL] security with Forms-Based Authentication in Your ASP.NET Application. [QUOTE]SUMMARY: This How To shows you how to use the ASP.NET 2.0 role manager. The role manager eases the task of managing roles and performing role-based authorization in your application. It shows how to configure the various role providers for use … | |
Re: [b]>I wondered if there was a equally simple way to save![/d] [code] ... ds.WriteXml("filename.xml"); // OR ds.Tables["tableName"].WriteXml("filename.xml"); ... [/code] | |
Re: [URL="http://www.daniweb.com/forums/showthread.php?t=170265&highlight=scanner+vs+bufferedreader"]Here[/URL] is good discussion. Please read thoroughly. | |
Re: Parameters? [code] Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click Dim Con As OleDb.OleDbConnection Dim strConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Documents and Settings\Pfectrol\My Documents\Visual Studio 2008\db\CoolMate.mdb;" Try Dim strSQL As String = "INSERT INTO Equipment (Port_Number,Display_Name, Equipment, Tonnage,User_Privilage) VALUES (@Port_Number, @Display_Name, @Equipment, @Tonnage, @User_Privilage)" Dim … | |
Re: [code] Private Sub arandomname(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles stripMenuItem.Click If IsNothing(f) OrElse f.IsDisposed Then f = New Form() f.MdiParent = Me f.Show() End If End Sub [/code] | |
Re: [code] <pre> <%# DataBinder.Eval(Container.DataItem, "ACCOUNT_NAME") %> </pre> [/code] | |
Re: Take a look at this thread - [URL="http://www.daniweb.com/forums/thread249491.html"]http://www.daniweb.com/forums/thread249491.html[/URL] | |
Re: EOF is not a character nor a value that exists at the end or middle of a file. It is a macro defined as an int with a negative value. It is a return value of functions that perform read operations (fgetc() and getchar()). For example, The prototype of fgets() … | |
Re: To specify a 64-bit integral (long long) type, use the LL or ll suffix. [code] .. std::cout << 9999999000LL; .. [/code] | |
Re: Welcome, We strongly encourage all posts to be in full-sentence English. Please do not use "leet" [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]speak [/URL]or "chatroom" speak. I think you want to pass some data from one window to another window. Write a public method that takes some arguments. | |
Re: We only give help to those who show effort. You might want to read the [URL="http://www.daniweb.com/forums/announcement58-2.html"]homework[/URL] policy if you run into problems and want to ask for help here. | |
Re: [b]>i will bind it but how to store data in to array[/b] [code] string []lines=System.IO.File.ReadAllLines("filename"); [/code] | |
Re: [b]>Gridview without loading whole page[/b] AJAX-extension update panel. | |
Re: Handle the [b]CellFormatting[/b] event, [code] Sub Sample() Dim dt As New DataTable dt.Columns.Add("No", GetType(Integer)) dt.Rows.Add(10) dt.Rows.Add(-1) dt.Rows.Add(22) dt.Rows.Add(-12) DataGridView1.AutoGenerateColumns = False Dim Col1 As New DataGridViewTextBoxColumn Col1.DataPropertyName = "No" AddHandler DataGridView1.CellFormatting, AddressOf Test1 DataGridView1.Columns.Add(Col1) DataGridView1.DataSource = dt End Sub Sub Test1(ByVal s As Object, ByVal e As DataGridViewCellFormattingEventArgs) If e.ColumnIndex … | |
Re: Take a look at some open source projects : [URL="http://csharpopensource.com/"]http://csharpopensource.com/[/URL] | |
Re: [b]>need help with loggin the process list and saving it as a text file.[/b] Use the methods of [b]System.IO.StreamWriter[/b] class. | |
Re: [b]how I need to call another childform_No2 from childform_No1 to the panel in MDIparent.[/b] [code] .... Form a = new Form(); a.MdiParent = mdiObj; a.Parent = mdiObj.panel1; a.Show(); ..... [/code] | |
Re: [b]>help me on how to write a code in vb2005 to create an sql database.[/b] [URL="http://msdn.microsoft.com/en-us/library/aa258257%28SQL.80%29.aspx"]CREATE DATABASE[/URL] statement. | |
Re: Parameterized query. [code] String query = "Select * from Member where username=?uname"; MySqlCommand cmd = new MySqlCommand(query, conn); cmd.Parameters.Add("?uname",TextBox1.Text); MySqlDataReader print = cmd.ExecuteReader(); bool read = print.Read(); string password = print.GetString(2); [/code] | |
Re: [b]>is there anyway to embedded an excel file into a vb.net project?[/b] Yes. Add -> Existing Item -> then selecting the .xls file. Then edit the properties of file [b]BuildAction[/b] with embedded resource. | |
Re: Showing your code might help. [b]>I then would calculate the number of actual working hours[/b] Use TimeSpan and Date objects. | |
Re: [b]>how can i Connect DB in C#???[/b] Learn the basics of ADO.NET provider classes. | |
Re: If you are looking to launch an app on the users desktop when they click a link or button on a webpage, and your desktop apps are in .NET then you may want to look into using [B]ClickOnce [/B] to deploy the apps. | |
Re: Take a look at [URL="http://www.boutell.com/newfaq/creating/streaming.html"]FAQ[/URL]. | |
Re: We strongly encourage all posts to be in full-sentence English. Please do not use "leet" [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]speak [/URL] or "chatroom" speak. [b]>How To RollBack or undo my sent message !!!![/b] Read this blog - [URL="http://blogoscoped.com/archive/2007-12-13-n84.html"]http://blogoscoped.com/archive/2007-12-13-n84.html[/URL] | |
Re: Why don't you tell us what you're trying to do. You need to show effort, and what better way than posting the code that you have tried so far? | |
Re: [b]>i want to make a video streaming server or a Video Lan chat programe in VB.net.[/b] Use VideoLan [URL="http://forum.videolan.org/viewtopic.php?f=32&t=52021&start=30"]Wrapper[/URL] or Managed Direct show for video capture and streaming. | |
Re: [b]>won't be any repeated images appearing[/b] Delete that row. [code] .... IF DS.Tables(0).Rows.RowState<>DataRowState.Deleted Then PictureBox1.Image = GetImageFromByteArray(DS.Tables(0).Rows.Item(intPic).Item(0)) PictureBox1.Visible = True PictureBox2.Image = GetImageFromByteArray(DS.Tables(0).Rows.Item(intPic).Item(2)) PictureBox2.Visible = False DS.Tables(0).Rows.Item(intPic).Delete() End If [/code] | |
Re: [b]>i want to capture the image when user clicks the snapshot button available on webcam.and then dispaly the image in picture box[/b] Use Windows Image Acquisition ([URL="http://msdn.microsoft.com/en-us/library/ms630373%28VS.85%29.aspx"]WIA[/URL]). Take a look at codeproject article - [URL="http://www.codeproject.com/KB/dotnet/wiascriptingdotnet.aspx"]http://www.codeproject.com/KB/dotnet/wiascriptingdotnet.aspx[/URL] | |
Re: [b]>how i'm going to keep going deeper into a directory and still manage to search other folders.[/b] Use, [code] System.IO.Directory.GetDirectories("path", "pattern", System.IO.SearchOption.AllDirectories); [/code] | |
Re: An easy way to persist drawn images is to do the drawing onto a separate Bitmap object, and then set the PictureBox's Image property. Suppose that the center has coordinates (c,d), s is the scaling factor in the x direction and t is the scaling factor in the y direction. … | |
Re: Initialize a [b]Connection[/b] property of command object. [code] ... OleCommand_Update.Connection=Connection_Update Connection_Update.Open() OleCommand_Update.ExecuteNonQuery() ..... [/code] | |
Re: [b]>HTTP Error 403 - Forbidden !!![/b] You can receive this Http error 403 - Forbidden status code if the Web site has no default document set, and the site is not set to allow Directory Browsing. | |
Re: Welcome, Why don't you tell us what you're trying to do and we can tell you how to go about it. We only give help to those who show effort. You might want to read the [URL="http://www.daniweb.com/forums/announcement58-2.html"]homework[/URL] policy if you run into problems and want to ask for help here. | |
Re: [b]>can u help me how to send sms from pc to mobile in vb.net[/b] Take a look at this thread - [URL="http://www.daniweb.com/forums/showthread.php?t=9537&highlight=SMS+using+vb.net&page=2"]http://www.daniweb.com/forums/showthread.php?t=9537&highlight=SMS+using+vb.net&page=2[/URL] | |
Re: [URL="http://www.daniweb.com/forums/thread251019.html"]http://www.daniweb.com/forums/thread251019.html[/URL] Do not flood the forum by posting the same question more than once (ie in multiple forums). | |
Re: ExecuteNonQuery() method is required, [code] ... insertcommand.Parameters.AddWithValue("@PolicyNumber", customer.Policynumber) connection.Open() insertcommand.ExecuteNonQuery() connection.Close() .... [/code] | |
Re: A [URL="http://sunsolve.sun.com/search/document.do?assetkey=1-66-246387-1"]security[/URL] vulnerability in the Java Runtime Environment may allow code loaded from the local filesystem to access localhost: I suspect you're running the applet from a local HTML (say, sample.htm) file. | |
Re: [b]>and it did not work if it have errors.[/b] Try to execute javac.exe as a subprocess using [b]Runtime.exec method[/b] and get error output of subprocess using [b]Process.getErrorStream()[/b] method. [code] String []cmd={"javac.exe","Sample.java"}; Process proc=Runtime.getRuntime().exec(cmd); java.io.InputStream in=proc.getErrorStream(); [/code] | |
Re: Try to save image or any uploaded file into sub-folder under your webapplication root. For example, [code] IF FileUpload1.FileBytes.Length<>0 Then Dim target as String ="~/images/" & FileUpload1.FileName FileUpload1.SaveAs(MapPath(target)) Image1.ImageUrl=target End If [/code] |
The End.