449 Posted Topics

Member Avatar for Umarmai
Member Avatar for samir_ibrahim
0
124
Member Avatar for Maulth

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

Member Avatar for GeekByChoiCe
0
855
Member Avatar for hemchantra

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 …

Member Avatar for hemchantra
0
137
Member Avatar for murid

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

Member Avatar for murid
0
146
Member Avatar for sgleason

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 …

Member Avatar for sgleason
0
96
Member Avatar for bigtreeworld

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 …

Member Avatar for bigtreeworld
0
102
Member Avatar for blackknight469

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

Member Avatar for samir_ibrahim
0
1K
Member Avatar for perumar

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]

Member Avatar for GeekByChoiCe
-1
123
Member Avatar for leroi green

frmnewform.show() me.close() else the application will shut down if his properties are set to "shutdown when startupp form closeing"

Member Avatar for adam1991
0
116
Member Avatar for Atove
Member Avatar for Atove
0
121
Member Avatar for babbu

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 …

Member Avatar for sknake
0
2K
Member Avatar for staticvoyager

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)

Member Avatar for staticvoyager
0
139
Member Avatar for staticvoyager

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

Member Avatar for sknake
0
205
Member Avatar for k.vijayakumar
Member Avatar for DGULLIVER

think windows gonna group the applications (ofc if it set up by the user to this) by itself.

Member Avatar for GeekByChoiCe
0
102
Member Avatar for hery

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.

Member Avatar for kvprajapati
0
3K
Member Avatar for Nada_ward

wait a minute... you want to keep the old array aswell? so actually you want an array of arrays?

Member Avatar for kvprajapati
0
98
Member Avatar for hery

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.

Member Avatar for GeekByChoiCe
0
109
Member Avatar for hery

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.

Member Avatar for GeekByChoiCe
0
460
Member Avatar for Ana D.

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

Member Avatar for GeekByChoiCe
0
82
Member Avatar for tjfitz68

yeah for these things you have to include a installer class into your setup project and put your code into the install event.

Member Avatar for tjfitz68
0
142
Member Avatar for Merovingian

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]

Member Avatar for EvolutionFallen
0
185
Member Avatar for hery

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

Member Avatar for benson waweru
0
97
Member Avatar for stormshell

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

Member Avatar for Arunabh Nag
0
100
Member Avatar for murid
Member Avatar for murid
0
352
Member Avatar for mania_comp

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)

Member Avatar for sknake
0
200
Member Avatar for yorro

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 …

Member Avatar for yorro
0
152
Member Avatar for doomfrawen

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?

Member Avatar for doomfrawen
0
209
Member Avatar for Sylenas

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

Member Avatar for kvprajapati
0
139
Member Avatar for ramabala

[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

Member Avatar for sknake
0
1K
Member Avatar for yorro

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

Member Avatar for yorro
0
405
Member Avatar for tomtetlaw

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 …

Member Avatar for tomtetlaw
0
86
Member Avatar for ggl0rd

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 …

Member Avatar for GeekByChoiCe
0
120
Member Avatar for ggl0rd

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

Member Avatar for ggl0rd
0
111
Member Avatar for vaq

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 …

Member Avatar for vaq
0
102
Member Avatar for Ole Raptor

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 …

Member Avatar for GeekByChoiCe
0
146
Member Avatar for ggl0rd
Member Avatar for hery

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.

Member Avatar for sknake
0
98
Member Avatar for LillyPooh

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.

Member Avatar for GeekByChoiCe
0
105
Member Avatar for hery
Member Avatar for sathishmarappan

or do it via the VS GUI go to your project properties and change the startup form to the form you want.

Member Avatar for GeekByChoiCe
0
113
Member Avatar for defiant91

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

Member Avatar for GeekByChoiCe
0
131
Member Avatar for miketeebo

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 …

Member Avatar for GeekByChoiCe
0
142
Member Avatar for hery

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

Member Avatar for samir_ibrahim
0
6K
Member Avatar for hery

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 …

Member Avatar for GeekByChoiCe
0
461
Member Avatar for hery

create a new project and choose Class Library from the dialog. do your coding and compile. it creates a dll file.

Member Avatar for GeekByChoiCe
0
88
Member Avatar for k.vijayakumar

[code=vb] If TextBox1.Text.ToLower.Chars(0) <> "a" Then MsgBox("word should start with A") End If [/code]

Member Avatar for GeekByChoiCe
0
108
Member Avatar for chanlichin

its just how many entries the table summary has. and checking if the table is empty.

Member Avatar for Piya27
0
115
Member Avatar for just_looking

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.

Member Avatar for GeekByChoiCe
0
112
Member Avatar for soeppp

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 …

Member Avatar for Stevoni
0
2K

The End.