- Strength to Increase Rep
- +11
- Strength to Decrease Rep
- -2
- Upvotes Received
- 78
- Posts with Upvotes
- 72
- Upvoting Members
- 47
- Downvotes Received
- 5
- Posts with Downvotes
- 5
- Downvoting Members
- 5
I don't fit in just a nutshell ;)
- Interests
- coding and gaming
449 Posted Topics
Re: as the_carpenter already mentioned ... the Form/application load event you call the method (which you have of course fill with your requirements) to get your settings. Saving the settings most likely should happen either on application shutdown OR when the user presses the "save settings" button (which you also have … | |
Thread title sounds weird, but what i meant is following thing: For the sake of Karma i am not willing to help users, who need help with coding trojans, viruses, worms and other harmful things, and also users who are not willing to mark their threads as solved (not talking … | |
Re: Here is a sample module i used in one of my projects.... [CODE=vb] Imports System.Net.Sockets Imports System.Text Module Module1 Sub Main() Console.WriteLine(RconQuery("11.111.111.11", 20100, "myRcon", "status")) End Sub Friend Function RconQuery(ByVal ip As String, ByVal port As Integer, ByVal rcon As String, ByVal cmd As String) As String Using udpClient As … | |
Re: [CODE=vb] If Me.txtLine2Rcon.Text = "" Then MsgBox("Please insert a running condition for Line 2 before you add it to the database", vbOKOnly) return end if Dim NewLongDesc As String ... [/CODE] | |
Re: [CODE=vb] Dim p() As Process = Process.GetProcessesByName("notepad") For Each proc As Process In p Console.WriteLine(proc.MainWindowTitle) Next[/CODE] Will print all notepad window names. The EnumWindows is mostly used for getting the child windows of a process (which is not the case for notepad anyway) | |
Re: [QUOTE]I tried the below code.[/QUOTE] I dont think so... The code you posted is c# and not VB.Net Please post the code you have so far (not some random copy) and im sure someone will help you. | |
![]() | Re: You declared the function as Integer but you returning a string. Change the function return type to String: Public Function analyzeTotalFilesSize(Path) As String |
Re: in my oppinion the easiest way would be to create an overloaded New and call it with parameter (byval caller as From) example: [code=vb] Public Sub New(ByVal caller As Form) InitializeComponent() Select Case caller.Name Case "Form2" Case "Form1" Case Else End Select End Sub[/code] and call the new form like … | |
Re: Dim thisDate1 As Date = Now Debug.Writeline(thisDate1.ToString("dd/mm/yyyy")) | |
Re: Have you considered to just sort the datatable by "Time" ? If this is an option for you then check out this link: [Click Here](http://msdn.microsoft.com/en-us/library/zk13kdh0%28v=vs.71%29.aspx) | |
Re: Kinda weird question to be honest. As .NET IS MICROSOFT. If you wont use Visual Studio then you could try => http://www.mono-project.com/Main_Page If you won't use .NET at all then you still code in VB6. | |
Re: Hello, If you have added the type of exception then you could expect a bit better help.So first of all I would advice you to add a Try/Catch block around the line which causes the error and read the exception message. For now I assume you get an "ArgumentOutOfRangeException". Try … | |
Re: I don't want to be rude but based on the questions you ask'd I have some doubts you have the knowledge (of coding and understanding) to prevent any hacker from hacking. I am really sorry but securing a computer needs knowledge about computer structures and ofc coding. /me is takes … | |
Hey guys, I am desperated right now. Im my application i want to export some data from an entityset to excel. So far so good. But i want to exclude some properties. So i thought creating a custom attribute for those properties is might a good idea to make things … | |
Re: are u sure its "user id" instead of "uid" ? | |
Re: this might give you an idea [CODE=vb] Imports System.Xml.Linq Dim xmlFile As XDocument = XDocument.Load("C:\Users\GeekByChoiCe\Desktop\test.xml") Dim _content As IEnumerable(Of XElement) = xmlFile.Root.Elements("word") ListBox1.DataSource= (From g In _content Select g.@id).ToList ListBox2.DataSource= (From g In _content Select g.@def).ToList [/CODE] | |
Re: Please show us your code that you have so far. You can't expect us to write the complete code for you. | |
Re: are you closing teh socket when client discoonnects? mibby this link helps: [url]http://msdn.microsoft.com/en-us/system.gc.addmemorypressure.aspx[/url] the error System.OutOfMemoryException means exactly what it says. so check if you create/open any files and not disposing them (like client information, hashtables, datareaders and so on). are you synclock the stream? check the stack trace of … | |
Re: If you talking about a Console Application then Console.readkey() is the way. | |
Re: Please post the EXACT error you get. Also make sure you have the correct .NET version installed on your Win7 machine | |
Re: Shouldn't you clear the databinding BEFORE you add a new binding? [CODE] cboOrganization.DataBindings.Clear() cboOrganization.DataBindings.Add(New Binding("SelectedValue", ds.Tables(bsTableName2), "OsID")) [/CODE] | |
Re: Is a timer added to your Form? If so, set its Interval to something bigger that 0. Else check all your controls, you have added to your form and see which control has a Value of 0 and change it to 1. | |
Re: You should put the whole connect/sending process into a backgroundworker to keep the UI responsible. Also you should add a try/Catch block around catching the SocketException, which occurs if the client is not online or IP address not reachable. | |
Re: no. but if you use any custom references (like a ftp.fll) then you have to ship that dll with your application. [QUOTE]Button 2...I get an error (my own 'failed' message)[/QUOTE] does not really help. post the code where the error pops up. | |
Re: It is not quite clear to me what exactly you try but here is maybe the solution: [CODE=vb] Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim target As String = TextBox1.Text Dim index As Integer = Array.IndexOf(LetterArray, target) If index = -1 Then MsgBox("text not found") Else … | |
Re: add a click-event handler for your linklabels inside the handler you just do myConstVariable = ctype(sender, linklabel).Name | |
Re: Maybe this small example gives you an idea: [CODE=vb] Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load For i As Integer = 1 To 10 ListBox1.Items.Add("Value " & i) Next End Sub Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles ListBox1.SelectedIndexChanged ListBox2.Items.Clear() For i As Integer = … | |
Re: strsql = "select * from books where title='" & cmbTtle.SelectedValue.tostring & "'" | |
Re: Based on your xml you want to store only the information of ONE plugin in this xml file. If so then you can use this code: [CODE=vb] Dim xdoc As XDocument = XDocument.Load("C:\Users\GeekByChoiCe\Desktop\plugin.xml") Dim sb As New StringBuilder 'asuming you have more than 1 plugin in the xml file Dim … | |
Re: [CODE]TextBox8.Text += Convert.ToDouble(ds.Tables(0).Rows(0)("Price"))[/CODE] will do the trick | |
Re: [QUOTE] con.ConnectionString = str TextBox8.Text = 0.0 adp = New SqlDataAdapter("select Count,Item,Price from Bill where Id = '1'", con) adp.Fill(ds) DataGridView1.DataSource = ds.Tables(0) TextBox8.Text = Convert.ToString(ds.Tables(0).Rows(0)("Price")) + Val(TextBox8.Text) [/QUOTE] On line 2 you set the textbox value to "0.0" and at the end you add this value to your database … | |
Re: If the Primary key is of datatype integer and auto-incrementing, then just delete that field from your "insert" and "Update Set" command. Mysql will take care of it. | |
Re: "Password" is a protected word in ACCESS (actually in all Databases) Use instead: cmd.CommandText = "update tblUsers SET [Password] = @Password where ID= @ID" | |
Re: Riteman... You didn't mentioned with a single word that you are using a Gridview, so you can't expect an answer for it. Also your post is very vague. [QUOTE]Now the question is that, I need to create an access db for each bank account. For the above mentioned details, pls … | |
Re: or even easier: [CODE=vb] Dim thisDate As String = "30.12.2011 5:26:45 AM" 'switch to PM and see the difference Dim myDate As DateTime = DateTime.Parse(thisDate) Debug.WriteLine(String.Format("{0},{1},{2},{3},{4}", myDate.Month, myDate.Day, myDate.Hour.ToString("G", Globalization.DateTimeFormatInfo.CurrentInfo), myDate.Minute, myDate.Second)) [/CODE] | |
Re: I guess Tuition is nothing. so Nothing.tostring will raise this kind of exception. I suggest to do MsgBox(SQL) just before your Try block and see how your SQL Query looks like. eventually even take this string and execute it directly against the database to validate the result. | |
Re: [CODE=vb] AddHandler DataFilter2.OnFilterAdded , AddressOf DataFilter2_OnFilterAdded [/CODE] | |
Re: If your project increase the file version each time you build your project then the settings are back to default. The "my.settings" are stored in the file "user.config" at the following path: C:\Users\<your user name>\AppData\Roaming\<your company>\<your project>\<version number>\user.config As example: C:\Users\GeekByChoiCe\AppData\Roaming\Multiplayer Gaming Solutions\GV_ACS\3.0.1.0\user.config in most cases the company name in … | |
Re: As VB.[B]NET[/B] already says it in its name... your application need to inject .NET code at runtime (which C++ don't need to) Beside that, the speed is also the result of a clean and productive coding style. Means if the coder have unnecessary loops, checks or using a hell of … | |
Re: Use the KeyUp event instead... example: [CODE=vb] Private Sub TextBox1_KeyUp(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp MsgBox(e.KeyCode.ToString) End Sub [/CODE] | |
Re: The problem lays in your BackgroundWorker1_ProgressChanged procedure. You can NOT access controls (which were created in the main thread) from any other thread without using delegates. Check out this thread => [url]http://www.daniweb.com/software-development/vbnet/threads/400426[/url] Same problem + solution. | |
Re: Create a function: [CODE=vb]Private Function FormatString(Byval txt as string) as String Return StrConv(txt, VbStrConv.ProperCase) End Function[/CODE] And on saving the data you do for each string you need to format: Instead of txtName.Text you use FormatString(txtName.Text) I wouldn't do it on every keypress or leaving the control. | |
Re: Just add a Panel to your form. Dock it parent window. Inside this Panel you add a pictureBox, choose the image you want to use as watermark, dock it to the parent container. After this you can add your usual controls on this panel. The Picturebox will function as background … | |
Re: Your database path setup looks a bit odd. do a [CODE] MsgBox(dbconn.DataSource)[/CODE] just before the dbconn.open() command and see if the database is stored at the path that is shown in the messagebox. | |
Re: I think this will give you an idea how to do it... [CODE=vb] Private Sub buttonloop_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Dim dummy() As String = New String() {"Value 1", "Value 2", "Value 3"} For i As Integer = 1 To 3 'we start with button1 CType(Me.Controls.Find("Button" & … | |
Re: Not sure what exactlly you want but try this: Debug.writeline(sum) This will print out the current value of sum in your output window. | |
Re: Try this code: [CODE=vb] While DR.Read If TreeView1.Nodes.ContainsKey("tvNode" & index) Then 'check if a node with that name already exist TreeView1.Nodes.Item("tvNode" & index).Nodes.Add(DR("product_name").ToString) 'add product to this node Else Dim parentNode As TreeNode = New TreeNode() With {.Name = "tvNode" & index, .Text = DR("category_name").ToString} 'create a new node with … | |
Re: try: Dim FileSize As Integer | |
Re: I really wonder why you ignore the advice you got from your other thread => [url]http://www.daniweb.com/software-development/vbnet/threads/400475[/url] | |
Re: Is form1 still open while Form2 is open? If so then simply do Me.Close in the cancel button.click event. |
The End.