Label display ignoring form boundaries - vb.net

Is the following possible and if so, what do I do.
I have multi-line text on a hidden label. When a user clicks a button, the label is displayed under a Textbox (It is re-hidden by a second button click). This works fine. However, if the label text is very long, the label is truncated by the form border(s). Is there a way to "ignore" the form borders as a context menu does? I cannot seem to find a property, or method, to accomplish this. I tried BringToFront but that did not help at all.
I used a label as one project form has 3 labels of this type. Also, I am open to suggestions as to a better way of displaying help then a custom label.

Related

VB Form Not Holding Format

In the design window, I have my controls formatted one way, but when I run my program, the formatting changes. The window looks larger and the digit button is no longer aligned. I have no clue how to fix this. I am taking an intro level course, so I can't fix this with code. When I wrote my first couple of programs, I didn't have an issue with resizing, but for the last two or three, they never hold their size.
My Program
the above issue please check the anchor tag of each control it should be Top left.
To hold the control position
1 Add panel control to form then dock it to form
2 Add the other
control it will hold the control position as well

How to handle in place text editing in VB.net

I have a program that dynamically draws rectangles and then draws the string (name and description) inside the rectangles. My intended behavior is when a user clicks on any of the rectangle, it should show the typing cursor and allow the text to be edited.
What I have tried so far is create a textbox overlay the rectangle the user clicked on. This seems to work ok but I feel as if this isn't the best way to handle it. Does anyone have an alternate solution/idea?
its a bit complicated and maybe not worth it but,
you can listen to user keyboard and when is clicking the rectangle start inputting the text from keyboard to a label (on top of the rectangle)...

How to center label text when length varies in VB?

I have recently started a new project in Visual Basic which requires me to have a Preferences box where a user can enter his own text which will display in a label on the main form of the application, once the user has clicked the apply button in the Preferences box.
Whenever I test it out, the label and/or the writing in it shifts over to the right or the left...
I have tried to anchor it to the sides or top but it doesn't work.
How do I set the label up so that the text, no matter how short, always perfectly aligns to the top middle of the application even when the text is then changed to a new one of a different length?
Just like clicking the label and selecting 'Format', then 'Center in Form', then click on 'Horizontally' in the Menu of Visual Basic. But instead of aligning text of new length manually, I want it to automatically do this whenever the user clicks the apply button in the Preferences.
Any ideas will be greatly appreciated. Thanks
Another possible solution would be to perhaps use a Textbox and set it to Read-Only.
Why?
Because the Textbox offers the TextAlign property:
Public Property TextAlign As HorizontalAlignment
Refer link
Change the TextAlign property of the label to TopCenter. Anchoring doesn't justify the text, but rather resizes the label control relative to the change in form dimensions.
Try setting the AutoSize property of your label to "False", then setting TextAlign property to "MiddleCenter" (or wherever it's supposed to align to). Then set the Anchor property to "Left, Right". This worked fine for me. If you need any more information, feel free to reply.

Want To Create A Floating Speech Bubble Form

Wondering if someone could help me....
I have a small .NET application where I have an Edit button on a main form. When the user clicks the Edit button, I want to popup a small form right next to it (on top of the main form) with a speech balloon tail attached on the side of the form pointing to the Edit button. So it gives the effect of a floating form pushed out from the Edit button.
I don't want the appearance of a normal speech bubble, I want it to look like an actual borderless form (with square corners). It could be a custom control or anything (however, I am not yet familiar with creating my own custom controls), but I need to add Text Controls, Pictures, Label Controls, etc. to this floating form.
Any help would be appreciated.
Thanks
UPDATE
I am trying to create something to this affect:
So imagine the ? being the Edit button and the other being a form with custom controls.
Like this?
To get this behavior:
Select an image which will represent your speech bubble. Put a PictureBox on the form, make it use this image. Place two labels, as above, adjust the font.
Pick your transparency key (color). Your image background and form background need to be set to that. I used black for demo purposes, which is a bad choice if you plan to have any black or text in your speech bubble. Set form's TransparencyKey property to this color in designer. More about TransparencyKey on MSDN.
(final step, not shown on the screenshot). Set FormBorderStyle = None.
Also make sure you have other ways to close your bubble, because X will be unavailable.
The final result may look something like the following:
Note: You may notice some drawing artifacts, most images on the internet have smooth borders, and transparency key does not support shades, has to be exact color. If you are fine with these minor artifacts, feel free to leave it at that. Or, edit it to get rough borders. Or find another one that better suits your needs.

Creating a view for user to fill up a form

I'm creating a view which provides some fields for the user to fill in - address, phone number etc.
I've seen apps that have populated fields with grey text like 'Fill in your name here' on the Name field, and when the user taps on it the text is gone, a keyboard appears and the view is zoomed in to the textfield(or whatever it is). Also, after filling up that field tapping the 'Next' button on the keyboard brings the user to the next field. I'm trying to do the same but I have no idea where to get sources on this. Pardon my poor googling skills ;p
Tried UITextView and UITextField but there isn't anything related to this on the Interface Builder. Figured it lies with the codes?
It'd be great if I can get some explanation or some links on how this works (: Thanks!
EDIT: okay I played around with the Interface Builder a lil more and realized I could set placeholder as the grey text.
It is in fact a UITextField.
You can get the greyed out text by setting its placeholder property.
I am not sure what you mean by zooming but usually they do use a scroll view or adjust the frame so that it isn't blocked by the keyboard.
The Next button is made available using a UIToolbar instance as the text field's inputAccessoryView. However the implementation is one's own and is not framework provided. You can look at this example to get started.