For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
I would like to make a multi Series chart in vb.net how many of series depends on the department and the data gathered from a data-table which is collected from a DataGridView.
The table is shown as follow:
Department Period_Shown Rate_Int
EMW 2018 0.94
EMW 2019 0.55
ACH 2015 0.29
ACH 2016 0.52
ACH 2017 0.56
ACH 2018 0.63
ACH 2019 0.57
It have error on my code and it made the server freeze. Here is the warning message: Using the iteration variable in a query expression may have unexpected result. Instead create a local variable within the loop and assign it value of the iteration variable.Here is the source code for the chart control. Can anyone help me to fix it?
Dim dtRate AsNew DataTable("dtRate")
'Add columns to DataTable.ForEach cell As TableCell In GridView1.HeaderRow.Cells
Next'Loop through the GridView and copy rows.ForEach row As GridViewRow In GridView1.Rows
For i AsInteger = 0To row.Cells.Count - 1
dtRate.Rows(row.RowIndex)(i) = row.Cells(i).Text
NextNextDim Departments As List(OfString) = (From p In dtRate.AsEnumerable() _
If RateChart.Series.Count() = 1Then
EndIf'Loop through the Departments.ForEach UserDepartment AsStringIn Departments
'Get the Shown_Period for each Department.Dim x AsInteger() = (From p In dtRate.AsEnumerable() _
Where p.Field(OfString)("Department") = UserDepartment _
Order By p.Field(OfInteger)("Shown_Period") _
'Get the Num_Int of Orders for each Department.Dim y AsInteger() = (From p In dtRate.AsEnumerable() _
Where p.Field(OfString)("Department") = UserDepartment _
Order By p.Field(OfInteger)("Shown_Period") _
'Add Series to the Chart.
RateChart.Series(UserDepartment).IsValueShownAsLabel = True
RateChart.Series(UserDepartment).BorderWidth = 3
RateChart.Series(UserDepartment).ChartType = SeriesChartType.Line
RateChart.Legends(0).Enabled = True
RateChart.Visible = True
btn_Print.Visible = TrueEndSub</<prelang="vb">
I need some guidance and advice to build a questionnaire system similar to Google forms that include two parts,
the first part is a desktop system with vb.net or c# and separate SQL server database (it must be a desktop system because it will be part of a vb.net old system, The new project will be called from within the main interface of the old project )
and the second part is a web system, and the two systems are linked to one SQL server database through a local network and a local server
the desktop system builds multiple questionnaires forms and each questionnaire is associated with a specific user to answer these questions through the web system via the username that will be assigned to him by the desktop system... Here, I would like to note that each user has a different questionnaire from the other...
The desktop system will also use the answers to build a dashboard has charts and report based on the analysis of the answers
My questions ...
1- What is the best way to design (questionnaire builder) if I want it to work and similar to Google Forms method and user interface of building questions if each user has its own questionnaire that contains an unlimited set of questions, the new question is added through the Add button and each question is specified by the admin It determines the nature of the answer and the answer and contains a tool to choose a specific classification from a group of classifications that are added to the system, and each question contains in addition to the answers a field of notes and evaluation from 1 to 5, and after building this questionnaire for a specific user it is permanently saved and linked with this user and there is a possibility to edit these questions on This questionnaire for the future.
Is the User Control method the best way to build a question-building interface, or is there a better way and how?
2- What are your tips and directions that help me to build a better design for such a system?
Helo, acording to this code (In Visual Basic for word):
The code works for me, but it is not what I want...
The problem is: I only wont to select a colored text (example -> A text colored in Red), selecting all the words colored by Red.
I am very frustrated because I have tried everything but it does not work for me.
My goal is taking that colored text to another word document. The most important colored text i have in the document is colored in blue sky.
Sorry for the writing and thank you for your trouble.
//Replace text color//
Selection.Find.Font.Color = wdColorRed
Selection.Find.Replacement.Font.Color = -603914241
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchByte = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
The code you have shared works perfectly - it finds all text coloured red and replaces it with blank. Which according to the "comment" in the code, and the title of your post, is what it is meant to do.
If you want to get a collection of all of the text in red to do something else with it then try something like this
'Based on example from Microsoft Support'https://support.microsoft.com/en-gb/help/306338/sample-macro-that-uses-a-loop-to-find-text-in-word-documentsDim c As Collection
Set c = New Collection
.Font.Color = wdColorRed 'Search for red text'Loop through all red text one item at a timeDoWhile .Execute(Forward:=True, Format:=True) = TrueWith .Parent
If .End = ActiveDocument.Content.EndThenExitDoElse
EndIfEndWithLoopEndWith'Collection c now contains all the text in red'<<<< replace from here with paste to another document >>>>>Dim s AsVariantForEach s In c
i am using vb6 source code for sending sms via gsm modem but problem occurs when Mobile set is changed now i want to use HSDPA usb device but problem is that message seam to be sent but recipient does not receive message
i am using AT commands please help me
I'm writing you to try to solve a problem,I'm sending some hex value using a serial port to an external device.
It answer to my status request , but instead to show the value of 0x01 in the middle of the data packet it show 0x00.
I'm using a simple vb.net winform on VS2012.
Here the code i'm using:
Public Class Form1
Dim value As Byte
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
SerialPort1.Encoding = System.Text.Encoding.GetEncoding(1252)
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim array(6) As Byte
array(0) = &H3
array(1) = &H1
array(2) = &H1
array(3) = &HA4
array(4) = &HA5
array(5) = &HB2
SerialPort1.Write(array, 0, array.Length)
Label1.Text = ""
For i = 0 To 10
value = SerialPort1.ReadByte()
Label1.Text += value.ToString("x2") + " "
I'm receiving that :
03 01 01 A4 A5 B2 00 00 03 00 FC
But as from the device datasheets I must receive:
03 01 01 A4 A5 B2 01 00 03 00 FC
Using a port sniffer I see that the device answer correctly with the value of 0x01.
Somebodys has an idea why from my application I read the byte 6 as 0x00 and not 0x01?
The problem seems to be only with the value 0x00 and 0x01 ....others value are readed correctly(I suppose).
I successfully added controls to my FlowLayoutPanel but they are not named(see code snipped).
This does not work
Player.name = "Player" & +1
So far this works:
PrivateWithEvents Player As AxAXVLC.AxVLCPlugin2
PrivateSub Button1_Click(sender AsObject, e As EventArgs) Handles Button1.Click
Player = New AxAXVLC.AxVLCPlugin2
'each click adds a new player but the name is "Player" for all players not like "Player1, Player2..."EndSub
What do i need to do do give every new Control a name?
and how can i mention them like player1 gets this URL and player2 gets an other URL?
player1.playlist.a... wont work because player1 is not declared.
I need to call a method (returning void) in an async method.
I have problem with the syntax of the Task.Run() in VB.
I have a working example in C#.
So it's just another: "Parse-this-line-from-C#-into-VB-and-it-should-work".
Console.WriteLine("Start of Run")
Console.WriteLine("End of Run")
Dim arg = "LEET 1337"Await Threading.Tasks.Task.Run(Function() Foo(arg)) ' This line fails...EndSubSub Foo(ByVal asdf AsString)
Console.WriteLine("Start of Foo")
Console.WriteLine("End of Foo")
staticvoid Main(string args)
Console.WriteLine("End of Run");
var arg = "LEET 1337";
await Task.Run(() => Foo(arg)); // This line works.
staticvoid Foo(string asdf)
Console.WriteLine("End of Foo");
i'm already developement console application using vb.net 2010 and run smoothly in windows 10 / 7 desktop.
Unfortunately when install this console application on my Windows Server 2008 , it running but when to insert into Oracle database 11g R2 it fail.
Already install oracle client 32 / 64 bit on server, when i try to connect using ODBC Administrator it can be done... anyone got idea how to settle this issues? ..
thank you in advance..
Last Visit: 26-Nov-20 20:36 Last Update: 26-Nov-20 20:36