|
Dim tempString As String = String.Empty
Dim item As String
For Each item In ListBox1.Items
tempString &= item
Next
Or
Dim tempStrings As String() = Array.CreateInstance(GetType(String), ListBox1.Items.Count)
ListBox1.Items.CopyTo(tempStrings, 0)
Dim resultString As String = String.Join(", ", tempStrings)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can anyone help me???
how to send file (eg powerpoint slide, flash, video etc) from server to client in .net remoting in vb.net.
Thank you!!!
|
|
|
|
|
Remoting is not the best method for sending files. A better choice would be something dedicated to the task, such as FTP, BITS, or your own custom written implementation.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a calendar that comes up over a combo box(which is how I want it), but the combo box shows through the middle of the calendar? Probably an easy fix I'm sure.
|
|
|
|
|
hi,
in control panel > internet connections > connections > lan settings > proxy
i can define what should go through proxy i choose, then i can write what will bypass it...
is there a way to define only one port/remote ip request that will go through the proxy and all other will bypass it ?
thx.
|
|
|
|
|
If I understand your question correctly, no, there isn't. The proxy settings in IE only work down to the IP address/hostname, not the port level.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi,
how can i capture keys pressed on keyboard without having focus on program form ?
is there an event for it ? i can only capture keys on form..
i use VB6, anyone can help ?
thx.
|
|
|
|
|
You have to use a global hook
'app.hInstance is this module '0 = all threads to it's global.
HookPtr = SetWindowsHookEx(WH_KEYBOARD_LL, AddressOf LowLevelKeyboardProc, App.hInstance, 0&)
Your LowLevelKeyBoardProcedure has to grab the raw data and then decode it.
Public Function LowLevelKeyboardProc(ByVal nCode As Long, ByVal WParam As Long, ByVal LParam As Long) As Long
Private Type KBDLLHOOKSTRUCT
vkCode As Long 'a virtual-key code in the range 1
'to 254
scanCode As Long 'hardware scan code for the key
Flags As Long 'specifies the extended-key flag,
'event-injected flag, context code,
'and transition-state flag
time As Long 'time stamp for this message
dwExtraInfo As Long 'extra info associated with the
'message
End Type
Dim KeyInfo As KBDLLHOOKSTRUCT
Call CopyMemory(KeyInfo, ByVal LParam, Len(KeyInfo))
'Now can grab the raw key code
KeyInfo.vkCode
Keep in mind there is an up key event and down key event. You want to do most of your processing on only on the down key event since that will allow you to grab CTL + Key or ALT + Key or Shift + Key combinations.
|
|
|
|
|
hi guys!
need urgent help
i m facing very strange problem
i m loading Crystal report using ado.net datasets
fist i create datasets and then in the form i use the following code:
Dim rpt As New WAnalysisReport 'The report I created.
Dim myDS As New AnalysisDst 'The DataSet I created.
==============================================
'all objects are declared
myDS.Clear()
Try
myConnection = New SqlConnection("Data source=localhost;initial catalog=complaint;uid=sa;password=;)
MyCommand.Connection = myConnection
MyCommand.CommandText = "SELECT c.*,a.* from complaint_detail as c,actiontaken as a where c.complaint_id=a.complaint_id order by a.complaint_id"
MyCommand.CommandType = CommandType.Text
myDA.SelectCommand = MyCommand
myDA.Fill(myDS, "complaint_detail")
myDA.Fill(myDS, "actiontaken")
rpt.SetDataSource(myDS)
'crystalreportviewer1.
CrystalReportViewer1.ReportSource = + "c:\\Program Files\WAnalysisReport.rpt"
CrystalReportViewer1.ReportSource = rpt
Catch Excep As Exception
MessageBox.Show(Excep.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
===========================================================
this code works fine in my app. but gives a database login prompt in another application and didn't load the report.
i have checked the connection string .it is correct.
can any one tell me how to overcome that Data base login window.
bi
abhinav
|
|
|
|
|
Hi everyone, I've been trying to print several HTML files and what I want to avoid is displaying the print dialog for every HTML file to print. I'd like to somehow save the printing settings and pass them to the printing method I'm using.
The code so far is as follows (within a "for" loop):
Dim print As SHDocVw.OLECMDID = SHDocVw.OLECMDID.OLECMDID_PRINT
Dim PromptUser As SHDocVw.OLECMDEXECOPT = SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER
If i = 0 Then
PromptUser = SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER
End If
AxWebBrowser1.ExecWB(print, PromptUser)
I'm displaying the print dialog only once, but I don't know how to maintain or pass the same settings to the next HTML print.
PLEASE, SOMEONE HELP!!
Alita
|
|
|
|
|
Hello,
I am stroring querry string values in a hidden input html code. ((((( )))))
***I am using the values for parameter input for ddls.
Example: When the pageload event happens i store some of the values in an input (((((
))))) so they can be used for post back,, accosiated with ddl selections.
And i am accessing them throught the code behind ((((( Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
hdnProductID.Value = Request.QueryString("IDProduct")
hdnAttributeCategoryTapeColorID.Value = Request.QueryString("IDAttributeCategoryTapeColor")
End If
End Sub))))
I have run debug and all of the value are just where they need to be.
My question here is, the value are there for the first postback: however, the values are not accessable for the next post back.
My question here is, what should i implement so that the values will be avaliable for the entire lifetime of the page?
Erik....
***I have implemented this with and with out the not.pageis postback
|
|
|
|
|
This question would be better handled in the ASP.NET Forum since this is a Web Forms related question.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am new at writing vb.net code I am a student and I am having a hard time understanding how code works and how to properly use it. My current project consists of creating an assignment grader. I have no clue how to work out the code I have several books but I am not getting it for some reason. Is there someone out there that can give me some guidance on how to write code. Here is a link to what it should look like. Any help would be appreciated.
Thanks.
https://mycampus.aiu-online.com/courses/itp410/LE2.gif
|
|
|
|
|
Ok, I don’t want to give you all the code, but let me give you some hints.
1.Draw your form and declare 3 form level variables one for the test score, one for the extra credit, and one for the timeliness
something like private mintExtraCredit as integer
2.in the checked change event of the radio buttons, write code that assigns the value for the timeliness or the extra credit as appropriate.
something like
Private Sub radExtraCreditNone_CheckedChanged(sender As Object, e As EventArgs)
mintExtraCredit = 0
End Sub
3. In the click event of the button write code that takes the value of the numeric up down box, Ill call nudTestScore and adds it all together, or what ever math was needed to be done on those numbers, and displays in the label box, Ill call it lblFinalGrade be sure to use the tostring method like below.
like
Private Sub btnComputeGrade_Click(sender As Object, e As System.EventArgs) Handles button1.Click
mintTestScore = nudTestScore.Value
lblFinalGrade.text=(mintExtraCredit+mintTimelyness+minTestScore).ToString()
End Sub
I hope this helps!
|
|
|
|
|
tazbird,
I declared the 3 form level varibles but when I debug it, it still shows errors. I would like to list it on here so that maybe you or someone else can help I have already turned in the project unfinished so I will take a major hit on my grade. I really just do not understand how to piece it all together so it will work. I cant even write proper code. I have the beginners guide to writing code but all it does is give me examples writing code. It doesnt explain why you write what you write in code. I feel like a 5 year old trying to learn to read. I will post my project in zipped file for all to see what I have managed to figure out with my books I have now. Maybe someone here can give me some more insight as to what I am doing wrong.
Thanks again tazbird for you help it does help me a little bit.
Mtate32
|
|
|
|
|
tazbird here is my last project I was forced to turn in unfinished
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub RadioButton5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton5.CheckedChanged
rad5_1_2daylate_checkedchanged()
Dim gdb1_2Late = -5
End Sub
Private Sub TextBox1_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Show(Dim_A,B,C,D,E,F As String)(A=>90_B=>=80_C=>=70_D=>=60_F=>=50)
End Sub
Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
rad4_ontime_CheckedChanged()
Dim gdbOntime = 0
End Sub
Private Sub RadioButton6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton6.CheckedChanged
rad6_2daylate_checkedchange = -100
Dim gdb2daylate = -0
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
rad3_Aboveaverage_Checkedchange = +5
Dim gdbExtraCredit(Aboveaverage = +5)
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
rad2_Average_Checkedchange = +3
Dim dbExtraCredit(Average = +3)
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
rad1_None_Checkedchange = 0
Dim gdbNone = 0
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
btnCompute_Click(total)(numericupdown1_Groupbox1_Groupbox2 = TextBox1)
End
alphanumericgrade_A,B,C,D,F (A=>90_B=>80<90_C=>70<80_D=>60,70_F=>50,60)
End Sub
End Class
As you can see I still have no real clue what I am doing.
Mtate32
Me.RadioButton4 = New System.Windows.Forms.RadioButton
Me.Button1 = New System.Windows.Forms.Button
Me.Label2 = New System.Windows.Forms.Label
Me.TextBox1 = New System.Windows.Forms.TextBox
CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox1.SuspendLayout()
Me.GroupBox2.SuspendLayout()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(32, 16)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(64, 16)
Me.Label1.TabIndex = 0
Me.Label1.Text = "Test Score"
'
'NumericUpDown1
'
Me.NumericUpDown1.Location = New System.Drawing.Point(96, 16)
Me.NumericUpDown1.Name = "NumericUpDown1"
Me.NumericUpDown1.TabIndex = 1
Me.NumericUpDown1.Value = New Decimal(New Integer() {100, 0, 0, 0})
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.RadioButton3)
Me.GroupBox1.Controls.Add(Me.RadioButton2)
Me.GroupBox1.Controls.Add(Me.RadioButton1)
Me.GroupBox1.Location = New System.Drawing.Point(16, 72)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(120, 120)
Me.GroupBox1.TabIndex = 2
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Extra Credit #1"
'
'RadioButton3
'
Me.RadioButton3.Location = New System.Drawing.Point(8, 88)
Me.RadioButton3.Name = "RadioButton3"
Me.RadioButton3.TabIndex = 2
Me.RadioButton3.Text = "Above Average"
'
'RadioButton2
'
Me.RadioButton2.Location = New System.Drawing.Point(8, 56)
Me.RadioButton2.Name = "RadioButton2"
Me.RadioButton2.Size = New System.Drawing.Size(88, 24)
Me.RadioButton2.TabIndex = 1
Me.RadioButton2.Text = "Average"
'
'RadioButton1
'
Me.RadioButton1.Location = New System.Drawing.Point(8, 24)
Me.RadioButton1.Name = "RadioButton1"
Me.RadioButton1.Size = New System.Drawing.Size(56, 24)
Me.RadioButton1.TabIndex = 0
Me.RadioButton1.Text = "None"
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.RadioButton6)
Me.GroupBox2.Controls.Add(Me.RadioButton5)
Me.GroupBox2.Controls.Add(Me.RadioButton4)
Me.GroupBox2.Location = New System.Drawing.Point(224, 72)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(110, 120)
Me.GroupBox2.TabIndex = 3
Me.GroupBox2.TabStop = False
Me.GroupBox2.Text = "Timelines"
'
'RadioButton6
'
Me.RadioButton6.Location = New System.Drawing.Point(8, 88)
Me.RadioButton6.Name = "RadioButton6"
Me.RadioButton6.TabIndex = 2
Me.RadioButton6.Text = "2+ Days Late"
'
'RadioButton5
'
Me.RadioButton5.Location = New System.Drawing.Point(8, 56)
Me.RadioButton5.Name = "RadioButton5"
Me.RadioButton5.TabIndex = 1
Me.RadioButton5.Text = "1-2 Days Late"
'
'RadioButton4
'
Me.RadioButton4.Location = New System.Drawing.Point(8, 24)
Me.RadioButton4.Name = "RadioButton4"
Me.RadioButton4.TabIndex = 0
Me.RadioButton4.Text = "On Time"
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(16, 216)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(96, 40)
Me.Button1.TabIndex = 4
Me.Button1.Text = "Compute Grade"
'
'Label2
'
Me.Label2.Location = New System.Drawing.Point(152, 224)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(64, 16)
Me.Label2.TabIndex = 5
Me.Label2.Text = "Final Grade"
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(224, 224)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.TabIndex = 6
Me.TextBox1.Text = ""
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.LightSkyBlue
Me.ClientSize = New System.Drawing.Size(360, 277)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.GroupBox2)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.NumericUpDown1)
Me.Controls.Add(Me.Label1)
Me.Name = "Form1"
Me.Text = "Assignment Grader"
CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).EndInit()
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox2.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
End Sub
Private Sub RadioButton5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton5.CheckedChanged
rad5_1_2daylate_checkedchanged()
Dim gdb1_2Late = -5
End Sub
Private Sub TextBox1_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Show(Dim_A,B,C,D,E,F As String)(A=>90_B=>=80_C=>=70_D=>=60_F=>=50)
End Sub
Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
rad4_ontime_CheckedChanged()
Dim gdbOntime = 0
End Sub
Private Sub RadioButton6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton6.CheckedChanged
rad6_2daylate_checkedchange = -100
Dim gdb2daylate = -0
End Sub
Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
rad3_Aboveaverage_Checkedchange = +5
Dim gdbExtraCredit(Aboveaverage = +5)
End Sub
Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
rad2_Average_Checkedchange = +3
Dim dbExtraCredit(Average = +3)
End Sub
Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
rad1_None_Checkedchange = 0
Dim gdbNone = 0
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
btnCompute_Click(total)(numericupdown1_Groupbox1_Groupbox2 = TextBox1)
End
alphanumericgrade_A,B,C,D,F (A=>90_B=>80<90_C=>70<80_D=>60,70_F=>50,60)
End Sub
End Class
As you can see I still have no real clue what I am doing.
Mtate32
|
|
|
|
|
OK I am not asking you to do my homework for me but I really need help understanding what I am doing so here is my next project due this comming sat.
Design and develop a program that validates the value a user enters into a TextBox control to ensure that the entry is a valid telephone number. The application should accept a maximum of 12 characters. When the user clicks a button, the program should determine if the entry is of the form 999-999-9999, where the character 9 represents any number.
If the entry is determined to be a telephone number, display an appropriate message, along with the separate substrings that compose the telephone number without the dashes. If the entry is not a telephone number, then display a message as to the reason why the entry is not a valid telephone number, clear the TextBox control and set focus to the TextBox control. Use String class methods to solve the problem.
Here are a few hints to help you code the String methods:
1. Check that the user has entered two dashes in the appropriate spaces.
2. Break the string into 3 substrings, represented as 999,999, and 9999.
Use the Visual Basic .NET IsNumeric() function to determine whether each substring is a valid number. The function accepts one parameter and returns a True or False value.
Here is some information about the IsNumeric function:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vafctisnumeric.asp
|
|
|
|
|
I'm like you chief. This class is kicking my butt. I found something that might help you but not sure I can post it in this particular forum. I haven't quite figure it out but it gives you a great start, I think.
Believe me guys, I am totally confused.
|
|
|
|
|
I will try to see if I can work this out with what link you gave me here it is for anyone else who may be in the same boat??????
http://www.vbcity.com/forums/topic.asp?tid=72607&highlight=telephone%7Cnumber[^
Ok all I hope I make it through this one.....
|
|
|
|
|
Help! Its URGENT!! I'm using u.are.u 4000 fingerprint sensor to link with my vb.net application via the USB port. I cant get the original format of the picture captured via that device. The original format of the captured picture should be bmp format, 500 width and 550 height, 700 resolution. But, What i get is a png format, 105 width and 137 height with 96 only for resolution.
This is the sample code provided by the vendor in vb:
Private Sub RegSample_RegSample(SamplePicture As stdole.Picture, CurFingerIndex As Integer)
Image1(CurFingerIndex).Picture = SamplePicture
End Sub
I found that value for "SamplePicture" is an integer random number, for example, 671419403, -1475865658 and so on. I'm stuck here. Anyone can help me to get or keep the original format of the captured image? If you do have any solution, do remember to email me at sscome@yahoo.com
I really pray to get valuable replies and assistance from anyone who have knowledge about this. Its urgent!....thanks
|
|
|
|
|
You're going to have to contact the manufacturer of the device for help on this one. It would appear that their library is not behaving as documented.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I have a databound combobox on the form. In the formload event the combobox is connected tot te datatable (created in a class).
By every change of the selected value, the program makes 4 new datatables and has has to populatie listvieuws, datagrids and other comboboxes.
When I run the program with an breakline on the selectedvaluechanged event of the first cobo box I see that these precedures are executed several times.
I takes a long time before the form is shown.
How can I make that the first time that the selectedvaluechanged event is triggerd after the form is showed ?
|
|
|
|
|
1. need help for using ANSI code with VB6 for Language
Conversion
2. need help for using UNICODE with VB6 for Language
Conversion
Please Help
With Any one Option.
most urgent
|
|
|
|
|
I want to create a form with no FormBorder. I then want the form to move when the user clicks and holds the mouse (MouseDown), then moves the mouse. Any clues on how to accomplish this?
|
|
|
|
|
|