I am wondering if anyone has any idea how to make the controls stack and fill up the available space left by a control if the control is hidden or removed from the UltraGridBagLayoutPanel.
If I hide [Textbox 3] as of now, it will disperse the space left equally and pad the remaining text boxes with the space. However, I would like it to do this...
[Textbox 1] [Textbox 2] [Textbox 4] [Textbox 5]
Where all the text boxes will move up and [Textbox 4] will completely consume the space left by [Textbox 3].
how to apply shortcut keys (like control+c and control+v) in visual basic There was a thread on this I found but I tried all the codes and variations but nothing worked, like nothing would happen when I pressed the keys could someone give me the code about how to activate a "control+t" and a "control+r" control?
My server has two LAN cards, 192.168.0.10 and 192.168.1.10. The below codes yield the same results (192.168.0.10) but neither of them returns the correct IP address (192.168.1.10). What do I need to do to retrieve the correct (desired) IP address? [code]
My server has two LAN cards, 192.168.0.10 and 192.168.1.10. The below codes yield the same results (192.168.0.10) but neither of them returns the correct IP address (192.168.1.10).What do I need to do to retrieve the correct (desired) IP address?
Private Sub test1() ' Get IP address 'Determine name of current computer (client) and display it
I have a problem detecting whether one of the arrow keys is pressed, all the other keys seem to be detected apart from the arrow keys??? I have set key preview to True........ It detects the arrrow keys BUT ONLY if I have NO other controls on the form??? example..
Me.Text = e.keycode
It works, but then if I add a button for example, it stops.
How to control a progres bar from left to right, right to left, bottom to top and top to bottom ? and i have a problem: see code below 'for an example :: when a text changed from 4000 to higher value ,bar show a movement slowly but when a text changed from 4000 to lower value the progres bar change directly
Private Sub lp1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Does anyone know of a good example of TCP, in C# or VB.NET?
The problem I have with the majority i've found is that they send data once, receive data once, and end. This isn't a workable example. Even MSDN's example does this.
My main question:
Every example reads incoming data into a buffer (byte array), usually 512 bytes. If two packets are received in a row, how do I know where one packet's data ends and another's begins? What if a single packet has more than 512 bytes of data?
All TCP examples i've found work in a rather procedural way.
I've created another header row for a gridview programmatically. In this row I have a few controls including a label that I want to align all the way to the left of the cell. The one cell has a columnspan of 7 so it runs across the entire gridview. how do i align that label programmatically?
Dim cell As New TableCell Dim lblfilter As New Label Dim row As New GridViewRow(-1, -1, DataControlRowType.Header, DataControlRowState.Normal)
I've created another header row for a gridview programmatically. In this row I have a few controls including a label that I want to align all the way to the left of the cell. The one cell has a columnspan of 7 so it runs across the entire gridview. how do i align that label programmatically?
Dim cell As New TableCell Dim lblfilter As New Label Dim row As New GridViewRow(-1, -1, DataControlRowType.Header, DataControlRowState.Normal)
Normally I can get the webbrowser control in my vb.net application to scroll using the following code after the webpage loads into the webbrowser control: WebBrowserPageView.Document.Window.ScrollTo(50, 50)
But when the webpage uses the dom to update the page after the page loads, the scroll bars will scroll for half a moment to 50,50 but then snap back to 0,0.
I created an application in vb.net I have a user control having datagridview and some other controls. Grid rows is not fixed and so size is calculated dynamically so that grid do not have scroll bars . when I run my application on different desktops it works perfectly. But when I open the application on laptop for same resolution it shows the scroll bar. Do I need to write different code for laptop and desktop for user control size or any property which need to be set to check it. one more thing Grid is set dock and user control is also set as dock in a panel So I do not wrote about anchor property.
I know a little about using a user specified type IE IIf(Of ReturnType)(ByVal expression as Boolean, ByVal TruePart As ReturnType, ByVal FalsePart As ReturnType) As ReturnType...Which works, however I've been trying to get this to work, but can't..
Protected Function InverseSign(Of ReturnType)(ByVal value As Double) As ReturnType Dim result As String Select Case Math.Sign(value) Case -1: result = "+" & Math.Abs(value).ToString()
[code]....
Using try cast just gives me the error saying ReturnType has no class-constraints? whatever that means..But my goal here is to be able to return either a string or double.. However every method I've tried to convert my result string to the ReturnType doesn't work.I've also tried simply overloading the function, but I can't because they only differ by return type. So that didn't work either.
I wrote a program for a stopclock with button control. The button control is to start and stop the clock. How can I use the arrow keys, instead of the mouse click on the button, to start stop the stopclock.
I've already tryed using the case key event handler, but I must be using it the wrong way, because VB 2008 express (what I'm using) produces a bunch of errors("Type expected" as well as it won't work). This is what I've tryed:
Private Sub GameField_KeyDown(ByVal Sender As Object, ByVal E As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown Select Case E.KeyCode
I'm working on a game for school, and having a bit of trouble getting keys to control movement properly. When I press down the correspondant arrow key to move the picturebox, it moves the picturebox once, then stops, waits, and then starts moving again continuously (like when you hold down a key in a word processor and it stalls for a bit before repeating the character).the code I'm currently using to move the picturebox is (moving it left as an example)
Private Sub Form1_KeyPress1(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress If e.KeyCode = Keys.Left Then Dim x, y, x2 As Integer
[code]....
how to remove the delay and head straight into the consistant movement?
If a tab is highlighted and you hit the left/right arrow key, it goes to the previous/next tab. I want to remove this functionality. I only want the user to be able to change tabs with the mouse click.
I want to make a Pac-man game, or something close to it, but I don't know how to make the image of Pacman rotate and move when different arrow keys are pressed. How would I go about making a code that moves an image when an arrow key is pressed?
I came across a post a while back which showed a custom rich textbox control which had line numbers in its margin. Similar to what you woudl see if you we coding in the VB designer and you had your line numbers viewable.
I think it was two controls in one (i.e. two textboxes: one for the numbers, and the other for the text). However I cannot remember where I saw it.
How can I get x and y coordinates of a control's location on a form relative to the Screens Top Left corner?
For example, if I have 3 labels on a form and I want label2 and label3 to display the x and y of label1 relative to the screens top and left corner.
When running the app, as the form's possition is changed label 2 and 3 update the coordinate of Label1's possition relative to the top left of the screen.
I have created my own web browser by dragging the web browser control into a form using Visual Basic 2008 in order to host my ASP.Net pages. However, it is a requirement of the project I am working that users should not be able to use hot keys, especially print screen, ctrl P, ctrl C, and ctrl V. There are no other controls on my form, so how can stop users using these keys, but only in this browser? Further, my asp.net page uses an iframe tag to show a word document, and again, I need to stop them from copying and pasting from the word document into another word document through the browser. Can I stop them in my browser in app stack?
so I've begun developing another little rpg like game w/ visual studio 2010. I'm trying to have the arrow keys control a little square in the form but I've searched all over the internet and haven't found too much useful info. So first thing's first, how can i make a key perform an action, and then, if you know how, what code do i use to make it move the square on the form.
Is there a way to override/modify/create the left-side shortcut buttons in the SaveFileDialog or OpenFileDialog controls? Defaults are "My Recent Documents", "Desktop", "My Documents", "My Computer", "My Network"... how would I change "My Recent Documents" to "My Super Cool Folder"?
i am trying to develop a program which will:to beging with, allow a user to use the left and right arrow keys to control the panning of a particular sound on loop. the actual panning dosent have to be programmed i could just instruct the program to play out the corresponding pre recorded panned sound?once achieved i hope to then develop the program to test a users ability to pan one sound to match a stationary sound at a given angle. i will need to record the time taken to achieve this, the number of key presses made and how accurate their answer was.i am using visual studio 2005 to build my program?