|
The forum is for asking questions and getting solutions - NOT ABUSE!
|
|
|
|
|
Member 14721179 wrote: NOT ABUSE! We are not abusing you. All you have said is "somebody do all my work for me." You are the one trying to abuse us.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
ZurdoDev wrote: Booo! You're no fun. As weird as it can sound, I would like to be able to be fun at any time. I must confess I often fail, though.
"Five fruits and vegetables a day? What a joke!
Personally, after the third watermelon, I'm full."
|
|
|
|
|
asked for few solutions. Didn't ask you to complete the whole code.
|
|
|
|
|
You didn't ask anything at all. You just posted a bunch of "requirements" for an application and left it at that.
You never defined what you meant by "help".
There is nothing in this app that is complicated at all. It's just an input, an if statement, loops, and printing. Every piece of this app would have been covered in your class.
|
|
|
|
|
You basically dumped your requirements but told us nothing about which part you are having troubles with. Remember we know nothing about your current knowledge, we cannot access your mind, so without any issue description your "question" only looks like a 'please do it for me' type of question.
I'm really not trying to be harsch. Maybe reading How to get an answer to your question - Visual Basic Discussion Boards[^] would give you some clues about why we need you to be as specific as possible when you post a question.
"Five fruits and vegetables a day? What a joke!
Personally, after the third watermelon, I'm full."
|
|
|
|
|
Quote: asked for few solutions. Didn't ask you to complete the whole code. Then what are you asking us for?
You've titled your post "cant get Ascii art to display after the RLE file" but haven't shown us any of your code.
So to show you any way of doing this we would have to write (all) the code from scratch. This is not a code writing service. Show us that you have at least tried something and we are usually more than willing to help, but posting angry faces in reply is not a way to gain our good favour
|
|
|
|
|
What did you want from us?
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
I'm trying to create a CustomBorderlessForm and paint myself. I've gotten the basic functionality
to work but have this issue.
I have derived a TestForm from the custom BorderlessForm and when dropping a menustrip
or toolstrip onto the TestForm, these controls dock at the top of the form overlaying
the title area which I draw myself. I have tried a number of solutions with no success
and now I am just trying to do the simplest thing I can think of.
I have created a property on the BorderlessForm to Enable or Disable showing a MenuStrip.
When Enabled on the derived TestForm, I create a MenuStrip and place it on the TesForm at a specific location.
This works but I cannot edit the MenuStrip from the Designer. Below is code for a custom
ParentControlDesigner in which I am trying to EnableDesignMode to allow editing of the MenuStrip.
However it still does not work.
I have tried debugging into BorderlessFormDesigner below but the Designer does not hit the break point within Initialize(). To do this I have setup the project in MyProject to execute a new instance of VS and load the project. Within the new instance of VS I open the TestForm in the Designer but the Designer does not hit the break point. I've tried setting a break point in both the
first and second instance.
I've done this sort of thing before with other projects with success. I'm guessing maybe these
controls to not support this type of functionality.
If this is possible I would appreciate some advice.
Thank you.
Here is the code excluding the BorderlessForm.Designer.vb code.
Imports System.ComponentModel
Imports System.ComponentModel.Design
Imports System.Runtime.CompilerServices
Imports System.Windows.Forms.Design
Imports System.Windows.Forms.Design.Behavior
<ToolboxItem(False)> _
<Designer(GetType(BorderlessForm.BorderlessFormDesigner))> _
Public Class BorderlessForm
Const ConstGridBorderlessTitle As String = "BorderlessForm"
Private _MenuStrip As MenuStrip
<DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _
Public ReadOnly Property MenuStrip1() As MenuStrip
Get
Return Me._MenuStrip
End Get
End Property
<CategoryAttribute(ConstGridBorderlessTitle), _
EditorBrowsable(EditorBrowsableState.Always), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Visible), _
Browsable(True), _
[ReadOnly](False), _
BindableAttribute(False), _
DefaultValueAttribute(GetType(Boolean), "False"), _
DesignOnly(False), _
DescriptionAttribute("Show/hide MenuStrip.")> _
Public Property EnableMenuStrip() As Boolean
Get
Return (Me._MenuStrip IsNot Nothing)
End Get
Set(ByVal value As Boolean)
If value = True Then
If Me._MenuStrip Is Nothing Then
Me._MenuStrip = New MenuStrip()
Me._MenuStrip.BackColor = Color.LightSteelBlue
Me._MenuStrip.Dock = DockStyle.None
Me._MenuStrip.Location = New System.Drawing.Point(6, 24)
Me._MenuStrip.Name = "BFMenuStrip"
Me._MenuStrip.Size = New System.Drawing.Size(336, 24)
Me._MenuStrip.TabIndex = 0
Me._MenuStrip.Text = "BFMenuStrip"
Me.Controls.Add(Me._MenuStrip)
End If
ElseIf Me._MenuStrip IsNot Nothing AndAlso Me.Controls.Contains(Me._MenuStrip) = True Then
Me.Controls.Remove(Me._MenuStrip)
Me._MenuStrip = Nothing
End If
End Set
End Property
Public Class BorderlessFormDesigner
Inherits System.Windows.Forms.Design.ParentControlDesigner
Private HostControl As BorderlessForm = Nothing
Private ActionUiService As DesignerActionUIService = Nothing
Public Overrides Sub Initialize(ByVal component As System.ComponentModel.IComponent)
MyBase.Initialize(component)
If Me.Control Is BorderlessForm Then
HostControl = DirectCast(component, BorderlessForm)
EnableDesignMode(HostControl.MenuStrip1, "BFMenuStrip")
End If
End Sub
End Class
End Class
modified 30-Jan-20 13:16pm.
|
|
|
|
|
Hi All,
I have a MS Word fillable form template that has many fields I wold like to have an interactive QR Code to incode three fields [Account Number], [Form Name] and [Date] that once the user fill out the form the QR will capture the data entered and generated like pdf forms.
I have downloaded a free QR Code font but unfortunately, it generate many qr for each character not combine to one.
Is there any work around by useing VBA to combine them to one QR?
By the way I found a built-in QR in MS Word 2013 but I do not know how to use it.
Any suggestions would be appreciated.
Thanks in advance.
|
|
|
|
|
I've no idea how many chars fit in a QR-code; but that may be important before you decide to encode three fields.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
As far as I know, you cannot create a valid QR code using only a font.
A QR code is data encoded into a specific visual format. You're going to need some app or extension for Word to create the QR code image and embed it into the Word document.
I don't know of any as I have no need for anything like this.
|
|
|
|
|
I have 80 email addresses separated with comma in a textbox. I also have four empty textboxes. How can I share the 80 email addresses equally among the four textboxes? I have not tried any thing because I no idea on how to start. A sample code can help.
|
|
|
|
|
|
Good morning, all -
I'm trying to write some code in an Excel macro to allow me to rename files on an SFTP site before downloading them using wininet.dll.
I've managed to get a simple block written that works well against a test server, but it fails when I try to access the actual server I need.
I suspect that it's because this server uses Port 22, not the standard Port 21. But, I can't see how to change that Port address to what I need.
In InternetOpenA, I've tried setting dwAccessType to INTERNET_OPEN_TYPE_PROXY (3) and lpszProxy to ftp=ftp://Proxy1:22 (with my specifics replacing the placeholders). But, no good. InternetConnectA refuses to connect. InternetOpenA works fine and returns a valid handle, but I just can't get a connection.
So, since this code worked on the test server using the defaults, I figure I'm not modifying the Port properly for use on my specific server.
All that being said, my question, I think, is; how do I change the port address in the InternetOpenA function?
Oh, an afterthought - would that this is an SFTP, not FTP, be an issue?
Thanx in advance for any assistance!
|
|
|
|
|
|
That's what I did. I tried populating nServerPort with my port address, but no good. Then, further searching informed me that nServerPort is not an actual address, but a flag with values 0-5. I tried using 5 and then set up the address in dwService with port 22 specified, but InternetConnectA still returned 0.
|
|
|
|
|
|
Unfortunately, my programming fu is not as up to the task as I would like. I didn't do any error checking as, well, it wasn't returning an error, as best I could tell. It just wasn't making a connection. As far as the code was concerned, it was doing what it was supposed to do.
Of course, this is all assumption on my part. I'll look at the link you provided, see if I can wrangle out an error code and see what it may be.
But, as I said, the code worked fine with an FTP test site - test.rebex.net - using the default port, 21. The server I'm trying to get to works fine with FileZilla, so the site works, but I think the problem is just the port address; especially as I can't find any way to change it.
I'm wondering if, because it's an SFTP server, if that may be causing an issue, too.
Well, I'll see if I can get an error code and go from there.
Thanx!
|
|
|
|
|
CKinTX wrote: it wasn't returning an error That is why you should use GetLastError : to find out why it failed.
CKinTX wrote: I think the problem is just the port address That should be easy to test by using the ftp prompt from a command window.
|
|
|
|
|
Based on results when I searched on how to utilize GetLastError, I found that it was not recommended because basic makes a lot of other API calls that will displace the error. So, the suggestion was to use Err.LastDllError.
I did that and got an error of 12002, Time out. So, that seems to verify my presumption that it's the port address setting.
Port 21 is failing, because the server isn't listening to that port - for security reasons - and I'm not successfully changing the port address to 22, the one it is listening to.
So, I guess my bottom line question is, how do I change the port address using InternetConnectionA in wininet.dll? The methods that I tried all failed, so I'm doing something wrong.
|
|
|
|
|
Looking at the documentation it appears that you can't, which is pretty damn stupid on Microsoft's part. So I am afraid it looks like you are going to have to find some other way around this, probably by switching to a language like C,C++ or C# which will allow you greater control. However, take a look at SFTP Client Libraries - SFTP.net[^].
|
|
|
|
|
The observation on Microsoft is spot on.
I've come across several snippets of code while doing my searches that specify a port address in nServerPort and, they claim, it works for them. Of course, that presumes that everything you see on the internets is accurate and without error.
I mean, it is, right?
But, there must be a way. For example, FileZilla does it, so there is some way to change the ports. Given that the wininet library is for C and VBasic, I figure, if C can do it, VBasic should, too. 'Course, that idea is rapidly sinking into the murk.
I'll look at your link, but C is not an option for me, as far as I know. This code is for an Excel macro as part of a data processing routine and I don't know that Excel macros can use C.
Thanx for your help, though. It's far better than I've gotten from the SQL Server community or MrExcel.
|
|
|
|
|
I expect that FileZilla, and similar apps, do not use the wininet library, but use basic Windows sockets. But I don't think you can do that from VBA. Sorry, I cannot help more.
|
|
|
|
|
*sigh*
The more computers make things convenient, the more they make them inconvenient...
Thanx, though, for your help!
|
|
|
|
|