Forcing Re-sizing To Be An Odd Multiple Of 8?
Sep 11, 2011
I have a couple of split panels nested inside of each other. The problem is, I'm rendering an 8x8 tiled game inside of the center panel. Basically, the height and width of the panel need to be an odd multiples of 8 so I can find the center tile displayed easily.I need the width and height to be divisible by 8. The number 8 is multiplied by should be odd:EDIT AGAIN these numbers below do not refer to the size. They refer to two number being multiplied. I've changed them to a * to show this. These numbers below apply to both the height and width. One number should be odd, the other 8. 8*x
5*8 - Good
6*8 - Bad
View 2 Replies
ADVERTISEMENT
Mar 18, 2012
I am writing a control in vb.net that will allow a user to resize something. So far, resizing works, but I can't get moving to work properly, instead of moving where the mouse moves, it seems to flicker between two positions, but I can't figure out where these positions are coming from. It follows the mouse sort of. I know the explanation isn't very good so here is some code so you can see for your self: pastebin.Apologies for this bad quality (please point out the bad stuff so I can correct), but this is really giving me a nightmare and I couldn't figure out a clean way to write this.To clear the code up a little, the moving takes place where the selected handle is "m".[code]
View 2 Replies
Oct 27, 2010
Having many thousands of pictures, I made a screen saver with the functionality I want. If the LAN path goes away it reconnects later, bad pics can be deleted, rotated and saved, etc. Sometimes the pics don't size correctly and expand off the screen. The problem may be reuse of the same picturebox. What I might do is have a dedicated picture box with autosize left on, use that to obtain raw image size, then reload again into the picture box that will be displayed.
Private Function loadimage(ByVal pic As PictureBox, ByVal lab As Label, ByVal fname$) As Boolean
With pic
.SuspendLayout()
[Code].....
View 12 Replies
Jun 14, 2010
I've setup a listview with two columns. Both have a fixed width which totals the width of the control (to fill the control fully and not display a horizontal bar)This works fine as long as the form does not change, anything such as a font change on the system will cause the list view to look off alignment.LV2.jpg shows it in the designer, LV.jpg shows the same listview with a different font.Is there an easy method to fix the position or auto size the last column to the edge of the control?
View 4 Replies
Apr 15, 2012
I have a form with a TableLayoutPanel with the following properties changed from default:
[Code]....
This is a stripped-to-the-basics version of part of my app. I want to generate a vertical, scrollable array of buttons which will allow me to select groups of photos. Each button will represent a group of one or more photos in a collection. The app will scan a folder and determine which groups are present, and which files are in each group. I create the buttons (with AutoSize), then determine the width of the widest button (at the same time, setting the button anchor property to make all buttons the same width. I then set the form to accomodate the width of the widest button.
[Code]....
View 6 Replies
Feb 18, 2011
Suppose we have a form with a button and a textbox
The button code goes like this:
'
Dim NF as New Form
Dim NC as New Combobox
NF.size = New size (420, 30)
[Code]....
View 2 Replies
Aug 11, 2011
I have a datagrid and have added in some row headers:
[Code]...
However the row header width is very small and you cant read the header without adjusting it. What is the formatting command to automatically size the header to fit the text?
View 1 Replies
Dec 27, 2010
I have been searching for code and/or a tutorial on how to proportianally resize controls and fonts. For example if I design a form at 800 X 600 and the user maximizes the form to 1600 X 1200, I need the form and controls to grow to fill the screen almost like a zoom function.
View 11 Replies
May 20, 2009
I can get a user to locate and size a PictureBox by using the values from TrackBars but is there a way in which a user can do the same by dragging using the mouse?
View 3 Replies
Jan 31, 2011
I am successfully able to pull images into a picturebox in my program and manipulate them in a variety of ways. What i need to be able to do is the following.
1) Pull images into a picture box on my main form and dynamically resize either the picture box or the image so that the image doesnt lose its scale when it comes in
2) Have a method of pre-screening an image to be loaded before it comes in so that i can change its size without losing scale .. ex.
if my image is 1200x1200 i do not have that much room on my form so i would want to say something like
if getimagewidth()>600 then
me.picturebox.width = getimagewidth()/2
end if
View 6 Replies
May 30, 2012
i'm playing around with fore & background colors, putting text in different places so i thought i'd try to size and position the console window but Console.SetWindowSize(640, 480) gives me an error saying that it has to be less than 170? [Code]. Positioning the window to the center of my screen isn't working either?
View 2 Replies
Sep 19, 2009
I have an access 2003 database. I have VS2008 installed. I had SQL 2008 installed and with the problems upsizing I dumped SQL2008 and installed SQL2005. I would like to upsize the Access database to an SQL Express database. When I open Access 2007 and open database tool to do an upsize, I get ODBC-Failed.
View 3 Replies
Apr 7, 2012
why the title has "(con't)" is because of this Form Resize With Control Sizing... almost named it with another thread on here. And I wanted to post, but it was already a 'Zombie Thread'.Thanks to _HAWK_'s post #11, instead of declaring every control I use. Would declaring it an array (fast guess - Label<Array(how many - 1; aka - X)>) work? ... that was probably Java... My point has probably been made, or can I just do Label.Scale(variable)?I had already set my declaration of the form I need to do this on "Resize". I am not quite at this stage yet, but I see this saving a lot of time asking early.
The +1 extra question is:How can I be able to split of a form in 3 unequal sections? The initial form is 800*600-left side has 2 sections, each 400*300 right side is 400*600.I am already using 3 'GroupBox' and it looks ugly because I have each one colored differently.I looked into Splitter and SplitContainter and TableLayoutContainer.
View 2 Replies
Apr 23, 2009
I am wonderring if there is a way the panels and the datagrid would get bigger according to the form? I need the panel to fill up the form. Because I got the form sat to whatever the users resolution is to a full screen, controls should follow accordingly
View 2 Replies
Oct 26, 2011
I want the width of the item to be (lets say) 300 ... how do I do this? when I set the autosize property to false (so it doesn't size to the text) and then set the width to 300 it goes past the edge of the menu! This is what i mean ... in the designer as this shows you the width.. but the runtime version is the same:
View 1 Replies
Jul 16, 2009
I'm considering a personal learning project. Using .NET(preferably VB) I want to build a simple desktop app that's only function is to display comics, like CDisplay, but with more advanced navigation. I want to be able zoom in by clicking on certain areas of an image, individual panels for instance, and have the zoom area automatically snap to the panel and blow it up. The images are usually in a standard format like .jpeg, .png, etc..
Something like this is what I'm going for: [URL]
I'm not even sure what this is called? Image mapping? Tone mapping maybe? Is it possible to do this within .NET or would it require some kind of outside library? Code samples would be nice, but obviously this is pretty vague request.
View 1 Replies
Jan 23, 2012
I'm trying to create my own custom "inputbox" (can't think of VB.Net term for the VB6 input box).
Anyways, I'd like to have a label & a textbox on my form along with 2 buttons. I want to let the label to grow based on the text that is in it. I know it has an autosize feature to it, and guess I can use that, how do I limit the width so that once it hits that limit it goes to a new line so that if I have a message or a question to pose to the user, it doesn't get too wide. Kind of like MessageBox.Show.
It'll be Label at the top, textbox under that, and the two buttons under that. I'd like the textbox to move up/down based on the size of the label, and the buttons to do the same along with the window not becoming too wide.
View 1 Replies
Oct 8, 2011
I understand that I need to run ... corflags.exe /32BIT myapp.exe against my VB .Net app if I want to make sure it's associated 32 bit dll's will be forced to run as 32 bit on 64bit computers.
If this will work this looks like a good idea to me since I don't have the opportunity to recompile them on a newer Visual Studio that supports targeting 32bit. But I have a couple of questions...
Question 1:Is there an easier way to get the corflags.exe program without having to download the whole .Net Frameword 2.0 SDK?
I guess this is what I need to download if there is no easy way to get the corflags.exe file...
Download 1:Microsoft .NET Framework Version 2.0 Redistributable Package (x86)
[Code]...
View 3 Replies
Dec 24, 2009
How can I make it so that when I re-size my program all my buttons and text boxes move with it. I don't know how to explain it, but it's like if I have a button in the center of my form and I re-size my form I want my button to stay centered not just have the form stretch out.
View 1 Replies
Mar 1, 2012
I'm looking for help resizing a label's size and its font size based on its window size.That's to say when a window resizes, the label itself adjusts it font and background box to do the same.I know I'm triggering something on the Resize event of the form, but I don't know what.
View 2 Replies
Mar 25, 2011
I designed my form on my machine running 1282x1024. It works fine. I installed it on a client machine running 1024x768 and the form goes off the bottom edge of the screen. I set autoscale on the form to none, font, dpi, and inherited, changed my screen resolution and ran the program. It always looks the same, off the bottom os the screen. I tried Autoscroll on with no effect.
My reading of the documentation seems to indicate these two items are more for the system font size and the screen's dpi setting, not the screen resolution but I can't find anything else to work with. How do I make the form and everything on it change size based on the screen resolution?
View 4 Replies
Jun 22, 2010
I am creating a report in my asp.net application. The report outputs to excel using the excel interop. Some calculations in the report cause excel to display "Inf" or "NaN" I want to force these calculations to zero so that the report displays zero and NOT "Inf" or "NaN"
View 1 Replies
Jul 16, 2009
I have a date, myDate = 07/16/09 14:22I would like to arbitrarily force the time portion of it to a predetermined value like myDate = 07/16/09 18:00.
View 5 Replies
Oct 3, 2009
The only way I know to force a paint event in my pictureboxes is to do a 'Picturebox1.invalidate'. I read that this isn't the best way to do it though, so what's the best way to make my picture boxes repaint?
View 8 Replies
Jan 17, 2011
I am using VB.Net 2008 Express on Windows XP, and am trying to use WM_LBUTTONDOWN in one of my programmes.
CODE:
This appears to work correctly, in that it goes to the Exit button and I can see the effect of WM_LBUTTONDOWN and WM_LBUTTONUP, but the programme does not actually exit; it just sits there with the Exit button highlighted. I added all the TimeDelay() subs to see whether it needed the extra time.
I also made the following changes, and again, it goes to the Exit button and I know that it is on the button using Spy++, but the programme does not actually exit
CODE:
How do I force it to exit?
View 3 Replies
Jul 6, 2011
How can I, in VB.NET, force the focus to the desktop?
View 1 Replies
Jun 18, 2009
Is there a way to force a form to be active and shown?
From another form i am doing:
Me.Hide
Form2.Show
When this code is run, the Form2 is minimized.
I've also tried:
Me.WindowState = FormWindowState.Normal
in the load event, and it still loaded it in minimized mode.
View 1 Replies
Feb 4, 2009
I have console application embedded in a Panel on my Form. The problem is that the Vertical scrollbar of this application always stays at the top, and I would prefer that I was always able to see the caret (prompt) so I can see the latest info.
How do you force a Window to display the caret?
Do solutions give the option of the caret being at the top of the window or the bottom? I would prefer that the carat is at the bottom so I can see all the info immediately prior to the caret, as in this screenshot.
View 6 Replies
Sep 22, 2010
so ive set the size to be locked so you cant drag it around. is it possible to place a button and when i press it the size goes from 300,200 to 500,300?if yes, how would the code be?
if no, would it be possible at all with any settings?
View 3 Replies
Mar 14, 2011
way to have a launcher/updater app for a program I'm working on. It'll have people register, and not let them run the main program without registering. So, say, I have launcher.exe, and main.exe, and I open main.exe. I need it to exit and open launcher. I was going to use sockets to do a simple ping/pong type deal, but sockets are breaking my face in vb.net since I've only used them in vb6.
View 2 Replies