449 Posted Topics
Re: set in the comboxbox properties the dropdownstyle to dropdownlist | |
Re: i've tried something similar and found out that the "TopMost" property from the application will not show the form while you are ingame. i found two possibilities. 1. create a directX/openGL (depends on your game) window to overlay your game or 2. do the easy way (which i did choose) … | |
Re: the following code is working if the datagridview properties are set as follow: Multiselect = false SelectionMode = FullRowSelect [code=vb] Private Sub DataGridView1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.SelectionChanged Try TextBox1.Text = DataGridView1.SelectedRows(0).Cells(1).Value Catch ex As Exception 'catch exception while filling the DGV End Try End Sub … | |
Re: i have done smt similar long time ago...here is the code: [code=vb] Private Sub TCP_Receive(ByVal filename As String) Try '---get the local IP address Dim localAdd As System.Net.IPAddress = System.Net.IPAddress.Parse(ips.AddressList(0).ToString) '---start listening for incoming connection Dim serverSocket As New System.Net.Sockets.TcpListener(localAdd, 15000) serverSocket.Start() '---read incoming stream Dim clientSocket As TcpClient = … | |
Re: the easiest and savest way would be to use Radiobuttons instead. Group them in a groupBox and the user is only able to select one of them. the way with checkboxes u can do the following thing: [code=vb] Private Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged … | |
Re: i would say thats pretty dangerous to block windows hotkeys. coz sometimes they are your last chance :p anyway first i thought using the unregisterhotkey API would be the way to go but realised thats impossible to get the atomID of each hotkey so i did some google and found … | |
Re: to remove the blank lines on reading it ou could do: [code=vb] Dim tmp() As String = My.Computer.FileSystem.ReadAllText("C:\test.txt").Split(vbNewLine) For Each newStr As String In tmp If newStr.Length > 2 Then TextBox1.AppendText(newStr & vbNewLine) Next[/code] if you want to update the textbox you could do: [code=vb] Dim tmp() As String = … | |
Re: you never assign "output" output = PhoneNumberWordsListBox.Text in your code means Nothing = nothing try this: [code=vb] For i As Integer = 0 To 2 Dim word As String = "" For Each s As String In phoneNumber word = word & DirectCast(arrayL.Item(CInt(s)), Char())(i).ToString Next PhoneNumberWordsListBox.AppendText(word & vbNewLine) Next [/code] | |
Re: frmnewform.show() me.close() else the application will shut down if his properties are set to "shutdown when startupp form closeing" | |
Re: ok stupid question: did u set a password for user sa? i think it have a password by default. | |
Re: no. me.refresh will just update its actually depends on what exactlly you wish to reset like textboxes, checkboxes and so on. you could do an function like: [code=vb] private sub ClearCtrl for each ctrl as control in Form1 try if typeof(ctrl) is checkbox then ctrl.checked=false if typeof(ctrl) is textbox then … | |
Re: you could hand over the file name in the call of your class. just create an overloaded New procedure like Public Sub New (byval _file as strng) 'your code' End Sub and you call this calss just like dim myClass as New Class1(_myfile) | |
Re: there pops 3 questions up in my head... what is "transaction" (struct?, your own class? or what?) secod question is ... what is the exact error you get? and last question is ... you only want to read the first line of the text file? (just to be sure) [code=vb] … | |
Re: set the dropdownstyle to DropDownList for the combobox | |
Re: think windows gonna group the applications (ofc if it set up by the user to this) by itself. | |
Re: in your case you can change Any to String. since you wanna read and write to ini files it makes sense since the keyName and the lp[B]String[/B] are always strings. | |
Re: wait a minute... you want to keep the old array aswell? so actually you want an array of arrays? | |
Re: it means what it says. the upgrade function couldnt convert these variables. so its your turn to set the correct type to these variables. to be honest it might be an good idea to sit down and learn about data types instead of just converting VB6 code. | |
Re: there is an option in Visual Studio for converting vb6 to VB.net go to Tools -> Upgrade VB6 Code inster your code and click Upgrade note: it will give you some warning. please read them and follow the instructions to solve the warnings. | |
Re: dont know if that matters on ASP but your onlick event starts with an space. might ends up as an error coz it dont find that function then. But better ask in the ASP.NET forum here on that site | |
Re: yeah for these things you have to include a installer class into your setup project and put your code into the install event. | |
Re: you could create an overloaded New function in your form just like [code=vb] Public Sub New (byval frmName as string) 'what ever you wanna do with the name End Sub[/code] and you call that form by doing [code=vb] Dim newFrm as New Form2(myName) newForm.Show[/code] | |
Re: [code=vb] Public Function Tgl_Max(ByRef _month As Short, ByRef _year As Short) As Short Tgl_Max = CShort(DateAndTime.Day(DateSerial(_year, _month + 1, 0))) End Function[/code] | |
Re: remove the New from the declaration and inititialise the generic list on load or whenever you start needing it. btw i cant find piclist.Add(Picboxer) in the code you have posted o.O | |
Re: you shouldnt close the writer (which is your socket.getstream) inside the loop. that closes the connection | |
Re: im not sure but doesnt SQL server only installs if the requiered servicepacks are installed? mibby one of the SP is missing? just a guess but thats mostly why my installer stops after re-installing windows (without updating) | |
Re: well you never start to read the lines try this code: [code=vb] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try Dim Filereader As New IO.StreamReader("Test.txt") Dim CurrentLine As String = Filereader.ReadLine While Not Filereader.EndOfStream CurrentLine = Filereader.ReadLine If CurrentLine.Contains("Name=") Then username = CurrentLine Exit While … | |
Re: i remember that kind of topic was few weeks ago already on that forum. did u use the search function on that site before posting? | |
Re: [code=vb] Private Sub SaveAsDoc() dlgSave.FileName = txtAcc.Text 'Sets the filename for saving dlgSave.ShowDialog End Sub Private Sub dlgSave_FileOk(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles dlgSave.FileOk Me.Text = txtAcc.Text & " - " & txtUser.Text & ".txt" 'Sets the name of the form SaveDoc() 'Runs the routine SaveDoc() End … | |
Re: [code=vb] Private Sub RemoveDir(ByVal _path As String) For Each mDir As String In IO.Directory.GetDirectories(_path) My.Computer.FileSystem.DeleteDirectory(mDir, FileIO.DeleteDirectoryOption.DeleteAllContents) Next End Sub[/code] if the given path has no content then ofc not get deleted | |
Re: its just a guess but it might does the trick after Form2.Show do a while loop for checking if the Form2.Handle is not intptr.Zero before hiding form1. or u set Form2 to topmost | |
Re: try this: [code=vb] Public Sub ResizeImage(ByVal pathToImg As String, ByVal pictureCtrl As PictureBox, Optional ByVal SizeMode As PictureBoxSizeMode = PictureBoxSizeMode.CenterImage) Try pictureCtrl.Image = Nothing pictureCtrl.SizeMode = SizeMode If System.IO.File.Exists(pathToImg) Then Dim imgOrg, imgShow As Bitmap Dim g As Graphics Dim divideBy, divideByH, divideByW As Double imgOrg = DirectCast(Bitmap.FromFile(pathToImg), Bitmap) divideByW … | |
Re: you have to add it first to your dataset. and then you can add this row. here is some sample code that you need to adjust a bit but it gives you the idea [code=vb] Dim rwNewData As DATASETRujukanRekod.RekodAnggaranRow Dim daNewdata As New DATASETRujukanRekodTableAdapters.RekodAnggaranTableAdapter rwNewData = DATASETRujukanRekod.Tables("whatTable").NewRow rwNewData.ItemArray = New … | |
Re: [code=vb] If cmbJPembayaran.Text = "Bulanan" Then lblPremiumJP.Text = CDbl(lblPremium.Text) \ 12 ElseIf cmbJPembayaran.Text = "3 Bulan" Then lblPremiumJP.Text = (CDbl(lblPremium.Text) \ 12) * 3 ElseIf cmbJPembayaran.Text = "6 Bulan" Then lblPremiumJP.Text = CDbl(lblPremium.Text) \ 2 Else 'whatever End If [/code] | |
Re: thats now depends... if you want to save the settings permanently then i would suggest to use the application settings. if its just for the current run of the form then you can set the properties or information in the form2.load event based on Form1. if none of my answers … | |
Re: try this: [code=vb] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click treeDir.Nodes.Clear() CreateDirTree(Nothing, Environment.SystemDirectory) End Sub Private Sub CreateDirTree(ByVal fromNode As TreeNode, ByVal basePath As String) Dim newDir As TreeNode Dim subDir As String For Each singleDir As String In My.Computer.FileSystem.GetDirectories(basePath) subDir = My.Computer.FileSystem.GetName(singleDir) If fromNode … | |
Re: yes because you should do an for each loop on the records. | |
Re: the code that snake posted is exactlly what you wanted. just add this code in your form.load event of your main form and its doing its job as requested. | |
Re: you can create a form, add a label to this form. set the label.text prpertie to the textbox content and show the form as dialog. | |
Re: or do it via the VS GUI go to your project properties and change the startup form to the form you want. | |
Re: [code=vb] Dim myprocess As New Process Dim StartInfo As New System.Diagnostics.ProcessStartInfo StartInfo.FileName = "mp3hddecoder.exe" 'starts cmd window StartInfo.Arguments = "-if """ & input & """ -of """ & outputlocation & "wav""" StartInfo.RedirectStandardInput = True StartInfo.RedirectStandardOutput = True StartInfo.RedirectStandardError = True StartInfo.UseShellExecute = False 'required to redirect StartInfo.CreateNoWindow = True myprocess.StartInfo … | |
Re: the following example is not complete. but it gives you an idea how to start. Ofcourse you still have to "mix" the letters to get ALL possible words. [code=vb] Sub Main() Dim phoneNumber As String = GetNumber() 'check if the number contains 0 or 1 While phoneNumber.Contains("0") Or phoneNumber.Contains("1") phoneNumber … | |
Re: hmm how about this? [code=vb] Dim floating As Double = 10761.937554 TextBox1.Text = floating.ToString("N02") [/code] seems more dynamic in case you have just 1000 or 1000000 | |
Re: i really dont know where the problem is o.O just tested it with .NET 2.0 created two forms and added this code: [code=vb] Private Sub Form1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Click Form2.Show() End Sub[/code] works like a charm. I think you guys mixed the forms with … | |
Re: create a new project and choose Class Library from the dialog. do your coding and compile. it creates a dll file. | |
Re: [code=vb] If TextBox1.Text.ToLower.Chars(0) <> "a" Then MsgBox("word should start with A") End If [/code] | |
Re: its just how many entries the table summary has. and checking if the table is empty. | |
Re: if you could post the "upload" part here then we might be able to give you a good solution. Right now i would suggest to create an byte array and use writeStream. | |
Re: Since you want use 2 keys for the shortcut you could do following thing... [code=vb] Private ctrlPressed As Boolean = False Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click MsgBox("procedure goes here") End Sub Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown … |
The End.