|
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
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.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
|
I have developed an HR system in MS Access and want to use a camera attached to the computer to capture staff pictures on the form to store in a table with link as staff number of employee.
I asked once and I was directed to a sample code which I copied and used but it does not work.
can someone be of help?
|
|
|
|
|
|
|
Private Sub OpenFolder_Click(sender As Object, e As EventArgs) Handles OpenFolder.Click
FolderBrowserDialog1.ShowDialog()
FolderPath.Text = FolderBrowserDialog1.SelectedPath.ToString()
loadfiles()
End Sub
Private Sub loadfiles()
Dim filepath As String() = Directory.GetFiles(FolderPath.Text)
Dim dt As DataTable = New DataTable
dt.Columns.Add("Product")
dt.Columns.Add("Serial No")
dt.Columns.Add("Extension")
dt.Columns.Add("Size")
dt.Columns.Add("Creation Time")
For item As Integer = 0 To filepath.Length - 1
Dim file As New FileInfo(filepath(item))
Dim dr As DataRow = dt.NewRow()
dr(0) = file.Name.Split.Distinct
dr(1) = file.Name
dr(2) = file.Extension
dr(3) = file.Length
dr(4) = file.LastWriteTime
dt.Rows.Add(dr)
Next
DataGridView1.DataSource = dt
End Sub
|
|
|
|
|
Quote: I was thinking About anything in particular?
|
|
|
|
|
How I can use the datagridview1 results after applying filters and file names to copy from Folder A to Folder B.
|
|
|
|
|
|
Opening an existing vb.net winforms solution and out of nowhere is generating over a hundred errors, most of which are like BC30456 'Black' is not a member of 'Color, or 'SelectedIndex' is not a member of 'VisualStyleElement.ComboBox'. Normal elements. Also a smattering of some BC30311 Value of type 'TextBox' cannot be converted to 'VisualStyleElement.TextBox'.
Seemingly hit and miss errors in some 10k lines of code. Updated, built, and published on Saturday with no issues.
Anyone else seen anything like this?
|
|
|
|
|
Are you getting errors on Using statements at the top of the code files? You're probably missing a reference to a library, like System.Windows.Forms.dll.
|
|
|
|
|
Hey Dave,
You're a lifesaver
VS had self-added (???) these to the main form:
Imports MS.Internal
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
Libraries in this haven't changed in two years, so I never thought to give this a look. Those two were responsible for all the errors.
Where they came from? My only guess is that on Saturday, that computer was in 'update hell'; meaning it had downloaded an update but needed a reboot and I didn't notice it. For unrelated reasons, it runs 24/7. It took three times to get the update flag cleared, and I'm pretty sure I opened the project after the first update said it was done.
I should have known better, since I know VS doesn't use the in-memory loaded libraries in update hell, but was doing a few different things on different computers so I missed it. Though in the past, I've never seen it add libraries on its own; it normally throws "missing" errors.
Thanks again for the clue.
Mike
|
|
|
|
|
Please, I am using crystal report version 13 for Visual Studio 2019 and I followed the steps to create a watermark as follows
I inserted the watermark image in the Page Header and went to Report > Section Expert and highlighted Page Header in list of sections on the left and marked the Underlay Following Sections checkbox and Clicked OK.
I previewed the report but did not see any watermark. Please what could be the problem?
I have tried so many means to get this done but to no avail. The wartermark refuses to show up. Please I need your help. Thanks.
|
|
|
|
|
Benniit wrote: Please what could be the problem? Crystal Reports.
Simple solution; print it beforehand. I assume that a background picture didn't work?
Bastard Programmer from Hell
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
It's been 15 years since I did anything with VBA (in Excel) and I've been asked to document for non-technical users what an Excel Macro is doing. I can do that but it's going to be very time consuming not only b/c it's been so long since I messed with VBA but because the macro consists of many functions so a lot of jumping around and the author opted to not use parenthesis so when looking at the code you don't know if the thing on the right side of = is a variable or a function.
Since ChatGPT is being promoted as being able to do just about everything I figured it should be able to do this yes? If anyone does know do you know what the proper request would be? What I would ask it to do and how it would get the VBA code to document it?
Thanks
|
|
|
|
|
Perhaps ask in the lounge?
Not that I mind but I think that question is more about ChatGPT rather than VB.
And more likely to get a response there.
|
|
|
|
|
Can an existing post be moved to another forum or do you have to just delete and re-create?
|
|
|
|
|
You really need to ask ChatGPT.
Also, I think you will find that most people here have a fairly low opinion of ChatGPT's abilities.
|
|
|
|
|
Considering I've not touched VBA in 15-20 year sand I didn't write the macro so I don't have any idea what it's supposed to do, yes. It's not that I couldn't do it but that it's a huge time suck that if I could pass off onto Chat GPT to do it I'm more than happy to.
|
|
|
|
|
YSLGuru wrote: I've not touched VBA in 15-20 year Interesting, about the same as me.
|
|
|
|
|
Than I'm sure you can appreciate why one if they could avoid it would ass off documenting someone else's Excel Macro. It's one thing when it's your code but another when it's someone you don't even know; aren't familiar with how they code. And to top it off there is of course ZERO notes/documentation in the macro. I know that even a year from now I'm not always going to remember everything important about some code I created so I document it extensively going so far as to also include my thinking of why I choose to do something the way I did and that has saved my butt more than once. This wasn't ion VBA but some SQL code where my boss had me change some logic and a year later it was an issue and he wanted to know why it had been changed and because I documented that in the script I was able to say "because you told me on XX date to change it".
|
|
|
|
|
UPDATE:
I found where someone else had used ChatGPT to document an Excel macro so I used the same question (with code pasted after) as they did and it worked. I still have to doublecheck it but according to the person who used it before me the thing correctly detailed every macro. That said I'm guessing the better the quality of the code the more likely ChatGPT will correctly document it.
|
|
|
|
|
me.datagridview_1.rows.add("ColumnName",stringvalue)
or
me.datagridview_1.rows.add(string1, string2,string3)
The above does not add an additional line
If I load a form and populate the obj the above is fine
I need to add an extra line(s) manually, say either with textbox controls or other vars
|
|
|
|
|
|
1st attempt at creating a control. i have a class, that Inherits PictureBox
here are some custom properties
<Category("Boarder"), Description("Border Size")>
Public Property BorderSize As Integer
Get
Return borderSizeField
End Get
Set(ByVal value As Integer)
borderSizeField = value
Invalidate()
End Set
End Property
<Category("Boarder"), Description("Border Color")>
Public Property BorderColor As Color
Get
Return borderColorField
End Get
Set(ByVal value As Color)
borderColorField = value
Invalidate()
End Set
End Property
<Category("Boarder"), Description("Border Color2")>
Public Property BorderColor2 As Color
Get
Return borderColor2Field
End Get
Set(ByVal value As Color)
borderColor2Field = value
Invalidate()
End Set
End Property
If i select "Categorized" in the property grid of the control when i place it on the form, my properties are grouped together.
However, when i select "Alphabetized" they are not grouped.
Question: How can i have them grouped when "Alphabetized" is selected. Just like the Location property is on the picturebox control
|
|
|
|