Can't Get A SOLID Line In .NET, Just Hashed
Oct 14, 2010
I'm trying to draw a solid line if VB.NET the way I can in VB.What I WANT to do is set the pentype to solidcolor, but it says pentype is read only and you have to instantiate the brush as the pen type that you want, SO ... I do this:
Public myBrush As New SolidBrush(Color.Red)Public p1 As New Pen(myBrush, 5)
And what I get when I draw a line is a pen type that is hashed. It's a bit weird, too. The line I'm drawing is between captures of the mouse position and if I move the mouse really fast, I get an almost solid line, but if I move the mouse slowly, I get a hashed line.
View 10 Replies
ADVERTISEMENT
Aug 22, 2010
I am graphing using Visual Basic graphics and it works. I would like to know how to draw a DASHED line instead of a solid line. Could someone help me with this?gphFormGraphics.DrawLine(Pens.Green, pt2, pt1)
View 4 Replies
Feb 23, 2012
I am using word 2010 VBA to clean up a "dot matrix" looking report. One thing I want to do is replace a row of dashes with a solid line. I think the code would look something like this:
count strings = "-------------------"
for each strin (i)
select string
delecte selection
move up
insert solid line
next (i)
Or if it can be done as a find and replace all that would be even better, but I cannot find how to replace a row of dashes (text) with a line object.
View 1 Replies
Jan 31, 2012
I see that the Line method is replaced with DrawLine, however; it seems like DrawLine must treated as an object as follows:
Private Sub Form1_Paint(ByVal sender As Object, ByVal e _
As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Draw a solid black line 25 pixels from the top of the form.[code].....
When I attempt to use this code (call it), I must somehow bring about an event, but I haven't found how to do that.How do I "call" this sub?
View 13 Replies
Mar 24, 2009
I want for the local intranet user with limited rights to be able to update Active Directory from his own limited account. For this, we created a separate Windows account as an intermediary, which has appropriate Domain Admin permissions. Now we want to use these credentials (account name, password) in the client program (a Windows Forms application) the user will work with to update Active Directory.
The problem is... it seems DirectoryEntry object in .NET 2.0 only accepts plain passwords. Hashed passwords (I tested MD5) don't work.
Is there a way to configure DirectoryEntry so that it would work with hashed ones? Something to do with authentication types?
Below is my sample code that works with plain passwords but rejects hashed:- - -
Dim Entry As DirectoryEntry = New DirectoryEntry(ActiveDirectoryServer, sUserName, sHashedPasswordUsingMD5)
Dim Searcher As New DirectorySearcher(Entry)
[Code].....
View 1 Replies
Oct 15, 2011
I'm attempting to create a program where the login and password will be verified on an SQL database of user information. I keep getting the error "SQL Execution was unhandled" I marked the code that was causing the error in red. I'm using Visual Studio 8.
Public Class Form1
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
[Code].....
View 1 Replies
Mar 8, 2010
I wrote some code to encode data using hashed technique,
HTML
Dim strPlainText As String = "admin"
Dim hashedbytes As Byte()
Dim encoder As New UTF8Encoding()
[Code]...
View 3 Replies
Apr 1, 2012
I failed finding a really simple Windows FTP client that any user could use, that would just prompt the user for the host + login + password, then use OpenDialog to select one or more files to upload, and just let it go. Since this tool could be used to upload files up to 10GB, it must have solid support for resume. I checked a bunch of them, and found them way too complicated.So it looks like I'll have to write my own in VB.Net but I'm no stellar programmer.Does VB.Net provide a solid FTP client component? If not, are there other (free/affordable) controls I should know about?
View 4 Replies
Jun 9, 2011
I want when I color a shape ,that color does not wipe the background picture.I want it be transparent not solid :S I tried Opticity property :-/ but it is just for the whole form :icon_sad: ,it does not available for the color.
View 3 Replies
Feb 13, 2010
I am making a solid effort to upconvert myself from VB6 to VB 2008 Professional. My current issue is with querying and updating to SQL 2008 Express. In VB6 this was a simple matter of adding an ADODC to the form and creating set queries in DataEnvironment that you reference in the code.Now, I don't suppose there is anything like that method in VB2008 (if I'm wrong and there is, then yippee!) so if possible I'd like a link to a straightforward methodology of querying and updating data in a SQL Database.
Please note, I am not yet down with alot of the abbreviated code references that generally gets used in VB2008 for dealing with SQL connectivity.
View 10 Replies
Apr 1, 2010
url...it doesn't do very much for images without text. I am specifically trying to auto deskew an image of a book with solid edges, but minimal text.
View 1 Replies
Aug 23, 2010
I need to have a solid border around a series of comboBoxes. The properties for the control do not have a border. Is there a way to create one?
View 1 Replies
Nov 13, 2009
How can I programmatically reset my form background from a picture to a solid color. I have no trouble changing it to a picture or even changing it to another picture, but when I try to change it back to a solid color, it won't work.
me.backcolor=color.red 'OK
me.backgroundimage=my.resources.dog 'OK
me.backgroundimage=(none) 'error
me.backgroundimage=my.resources.none 'error
How do I reset it back to a color? It's stuck in a picture mode.
View 2 Replies
Jun 1, 2011
I am implementing a system where the user can Reset their password if they have forgotten it.Once it is reset I want to give them the option of changing the password so that it will be something more memorable to them.The password is hashed and if i enter in the correct old password and new password the password does change.If I enter in the wrong old password and new password the password doesnt change.Is there a way to match the old password with the old password field in code behind so I can throw up an error to the user to tell them what is wrong? [code]
View 1 Replies
Jan 29, 2012
[URL] That way if the string that is not recognised that is passed to Color.FromName it returns a SolidColor of
Color.Black = Color.FromARGB(255,0,0,0)
That way, Forms and controls that only support SolidColors are supported.Installing VB6 on Windows 7?
View 15 Replies
Oct 14, 2011
what i need to do is open a txt file, read line by line, decode each line into an array and display. Now all works ok apart from one line.
sTextLine = objReader.ReadLine() <-- Value of string cannot be converted.
full code here
-------------
Dim objReader As New System.IO.StreamReader(sOpenFile.Text)
Dim sTextLine As New ArrayList()
Dim sText As String = ""
Dim i As Integer = 0
[code]....
View 3 Replies
Jan 16, 2011
how to read text from a listbox line by line and put current line in a label?
View 3 Replies
Dec 1, 2011
How would i go about reading a file Line by Line that within that line The values are delimited by " Example of the data:
"bob" "cat" "1243"
"steve" dog" "6789"
I've started this with this code but not sure how to go about the next stage:
Using MyReader As New _
Microsoft.VisualBasic.FileIO.TextFieldParser(My.Application.Info.DirectoryPath & "Records28112011.jd")
MyReader.TextFieldType = FileIO.FieldType.Delimited
[code]....
View 9 Replies
Jul 5, 2010
I am trying to read in a TextBox line by line and take the first 7 characters of each line and output everything in another TextBox.This is what I have so far.
Dim line, lines() As String
lines = TextBox1.Text.Split(Environment.NewLine)
Dim i As Integer = 0
[code].....
View 1 Replies
Sep 16, 2010
i need the app to preview the line in textbox in timeintervalof 1 s (can be change)nd when it will reach to the end it close the text file and andreread it after let say 1 m ..
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim myStream As Stream = Nothing
[code].....
View 17 Replies
Feb 7, 2011
a user copies multiple lines of text (say, from an email) into the clipboard. Based on my observations, when one tries to paste the text into a single-line textbox, only the first line is actually pasted in. (I am aware that the "obvious" solution would be to set the Multiline property to True, but there are reasons I am looking to avoid this and to put multi-line data into a single line.)
In the TextChanged event handler, I wrote code that parses the clipboard data to successfully convert it to a single-line, comma-delimited format.
Private Sub txtMassTrackingNo_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles txtMassTrackingNo.TextChanged
[Code].....
View 5 Replies
Jan 29, 2009
Is there a way to show the line number of the line of code that caused an exception within a Try...Catch block?
View 5 Replies
Mar 17, 2010
I'm trying to read a file line by line into an array but It skips the item at index:3 I have it msgboxing just to make sure and it wont even touch it.
Dim Btn As Button = DirectCast(sender, Button)
Dim path As String = Application.StartupPath & "Libraries" & Btn.Text.Replace(" ", "_") & ".ipt"
Dim i As Integer = 0
Dim lines As String() = IO.File.ReadAllLines(path)
[code]....
View 3 Replies
May 16, 2012
How do i read through a textfile line by line checking for and removing duplicate values?
View 1 Replies
Apr 1, 2011
I'm having trouble with reading a .txt file line by line, converting it into a string, then putting it into a listbox. When I execute I get an error saying "IndexOutOfRangeException was unhandled" Here is my
[Code]...
View 5 Replies
Jun 29, 2009
i would like to store contents from a text file line by line to arrays before copying them to another text file. what i have is currently like this:
[Code]...
Currently I'm only able to store the whole content into one variable, would like to store the content line by line in arrays.
View 5 Replies
Jul 8, 2010
Is there an easy way to consume xml to access any of the nodes directly without reading line by line?Here is a sample set of the xml working with. It contains two records of data. I am trying to find a way to load it so if I wanted to get say PostalCode and say Site SID value quickly.
HTML
<?xml version="1.0" encoding="utf-8"?><MainSite><MainSites Found="201" Returned="20" Status="0"><Site SID="123456"><Relevance>0.985</Relevance><Title>JDoe</Title><DateModified Date="2010-01-29T01:05:00">1/29/2010</DateModified><DateCreated Date="2010-01-29T01:05:00">1/29/2010</DateCreated><PersonalData><Confidential>0</Confidential><Name><First>John</First><Middle>
[code]....
View 12 Replies
Sep 8, 2009
i have three textbox in my program
How do i update my textbox3 Data like this
textbox3 line1 = textbox1 line1 + textbox2 line1
textbox3 line2 = textbox1 line2 + textbox2 line2
textbox3 line3 = textbox1 line3 + textbox2 line3
textbox3 line4 = textbox1 line4 + textbox2 line4
textbox3 line5 = textbox1 line5 + textbox2 line5
View 2 Replies
May 29, 2010
I am using WebBrowser1.DocumentText to get a websites source code, and then parse a string. I am trying to view the source line by line, and doing it as follows:
[Code]...
However what is displayed is each character from the source code, rather than the line. I am making the client log into a website, and the needed value from the source code is then parsed, so I need to use the WebBrowser type to get the source code.
View 2 Replies
Jan 3, 2012
I have a picture in my picturebox. In that picture, I need to draw a straight line between two points and calculate the length of that line (probably in pixels). Is there any suggestion how to do it?
View 2 Replies