Prevent Remainder From Showing?

Jun 14, 2009

For example if I wanted my program to divide 13 by 4 how can I make it appear as just 3 and not show the remainder?

View 3 Replies


ADVERTISEMENT

Prevent A Context Menu From Showing?

Jun 18, 2010

I want to stop a context menu from showing if nothing is selected.

If lvCopiedText.SelectedItem Is Nothing Then
cmsText.Close()
End If

That doesn't work for some reason, i think its because that happens before the menu actually appears.

View 3 Replies

Asp.net - Prevent Numbers From Showing In Exponent Notation?

Oct 21, 2009

I've got an app that sometimes stores some decently small numbers, such as 0.000023425. These numbers get loaded up in TextBox controls for users to edit.

Dim number As Double = 0.000023425
someTextBox.Text = number.ToString() ' Shows "2.3425E-05"

As mentioned, the text that shows is 2.3425E-05, which isn't exactly intuitive for the user to see, plus I have numbers even more precise (out to 19 decimal places). I would like the output to be fixed point. Of course I could easily and cleanly do:

number.ToString("F20") ' Shows "0.00002342500000000000"

But then there's an annoying number of zeros left over. So, to fix that, I could do:

number.ToString("#,##0.####################") ' Shows "0.000023425"

Which is what I want, but is there any better way to do it than to have that giant ugly format string there? So, ok, it's not that ugly, but surely there's a different way, right? My goal is to show the raw value being stored in the DB in a friendly way, and I would rather not have to force a format on the number at all.I found that changing the underlying datatype to Decimal solves the issue.

Dim number As Decimal = 0.000023425
someTextBox.Text = number.ToString() ' Shows "0.000023425" instead of "2.3425E-05"

So it sounds like Doubles aren't precise enough to be displayed normally?

View 3 Replies

Prevent Flat Borderless Buttons From Showing A Box When Using The Tab Key?

Oct 12, 2009

I have flat buttons with a background image (.png, slightly rounded border appearance) and no border. When I use the tab key to move between items, a box shows up around the button. How do I prevent this?Also, when I use the tab key on any part of the form, and click on a button, the box appears.What I want is on the left, what happens with tab key is on the right[URL]..

View 2 Replies

Prevent Vb Program From Showing Up On The Task Manager?

May 25, 2010

How can I prevent my Vb program from showing up on the task manager and in the process tab in task manager?

View 5 Replies

[2005] - User Controls - Prevent Them From Showing Up In The Toolbox

Feb 1, 2009

I have created a series of custom user controls for a wizard interface that I am making. Each user control represents one step in the wizard and really shouldn't be used outside of the wizard. The thing that is bugging me is that each wizard step user control shows up in the toolbox of components to insert into a form.

Is it possible to hide a user control from the toolbox? Better yet is it possible to hide a user control from other classes not in the same namespace of an assembly? Is this a good approach or should I think of a different approach?

View 5 Replies

Create A Program That Wil Get The Remainder?

Oct 12, 2009

i have 4 textbox and 1 button

lets say
textbox1
textbox2
button
textbox3
textbox4

i want the user to input some numbers in textbox1 and textbox2 and when the user press the button the textbox1 will be divided by textbox2 and the answer will be in textbox3(including the remainder) and in textbox4 remainder only

[Code]...

View 7 Replies

VS 2010 : Get The Remainder Of The Division Of Two Integers?

Feb 17, 2012

How do you get the remainder of the division of two integers.

View 3 Replies

Find All The Divisors Of A Number That Leave No Remainder?

May 10, 2010

Is there an efficient way to find all the divisors of a number that leave no remainder? And by efficient, I don't mean dividing a number by every other number to see if the remainder is zero.

View 3 Replies

Simple Divide With Val(text) Not Giving A Remainder

Sep 8, 2009

If
strOperand = "/" Then
intLast = intFirst / Val(
Me.TextBox1.Text)

I'm not getting a remainder like I would have hoped. I'm new and I'm sorry for the lack of intelligence on the subject. To my understanding the Val( function will convert the string to a number, but when I divide it gives me a single number instead of an integer.

View 4 Replies

Why Is Model Only Showing One Make Of Car / Yet Cars Is Showing Full Lest

Mar 31, 2011

I have a problem with the combox its only displaying the first item in the list its being populated by a webserice call the drop down in question is comboboxmodel now the manufacture one is fine and sets as it should any reason as to why the comboboxmodel would not. [code]

View 1 Replies

How To Prevent Others Using Dll

Aug 16, 2010

Does anybody know how I can prevent others from referencing and using my VB.NET dlls?Because when I create a dll then I can easily reference it to my project and use the code in it. So my main concern is that when I distribute my application others can use these dlls.

View 8 Replies

Doesn't Prevent Pop Up

May 6, 2009

i coded a simple webbrowser and started surfing with it but i realise it doesnt prevent pop up advertisements.. how i prevent it?

View 1 Replies

Prevent A Number Being Used?

Apr 19, 2009

Im wondering, whats the code for looking up and preventing a number from being submited into, say a textbox?

View 2 Replies

Prevent GUI From Freezee?

Jan 3, 2010

Currently I have to retrieve over 2000 records from DB and bind with combobox. and then follow with another 3 retrieving (less than 20 records)My problem is when I call this function, my GUI became freeze.I try to use Application.DoEvents() method but it still didn't work.I read some post and pages, they mention about BackGroundWorker and .Net 2.0.But what i use it MS 2003 with 1.1 so i think i can't access BackGroundWorker.

View 6 Replies

Prevent Pop-ups While Using WebBrowser1?

Jan 10, 2009

How can I prevent pop-ups while using WebBrowser1? If possible, I would like the url to open within the WebBrowser - not in a new internet explorer browser window.

View 3 Replies

VS 2005 - How To Prevent To Run Same Exe

May 6, 2009

I have an client.exe, through contextmenu in windows explorer i run this client.exe. is working fine. How to prevent , if user clicks same client.exe while its already runs.

View 5 Replies

.net - Code Prevent SQL Injection?

Nov 25, 2009

I've been contracted to analyze an existing Data Provider and I know the following code is faulty; but in order to point out how bad it is, I need to prove that it's susceptible to SQL injection.

Question What "Key" parameter could break the PrepareString function and allow me to execute a DROP statement?

[Code]...

View 7 Replies

Add To TextBox, Prevent Scrolling?

Mar 25, 2009

I have a textbox to which text is continuously appended (every second new status data at the end).I would like to act it as follows:- When the cursor is positioned at the end: Stay at the end, scroll the textbox (text disappearing at the top).- When the cursor is positioned somewhere else (not at the end): Stay exactly there, don't move the cursor, don't scroll, don't change the top line of the textbox.This seems to be surprisingly difficult (tried quite several ways).This is how far i came:

Private Sub addToTextBox(ByVal daStrg As String)
Dim posAtEnd As Boolean, selPos As Long, selLng As Long
If myTextBoxForm.txBox.SelectionStart = myTextBoxForm.txBox.TextLength Then

[code].....

View 5 Replies

C# - Prevent The Conversion Of & To &amp Using XmlTextWriter?

Feb 1, 2010

The '&' in the text gets escaped and gets converted to & when creating the xml file using XmlTextWriter but i dont want the conversion to take place how to prevent it?

Is there any other way besides using WriteRaw func of xmltextwriter?

View 3 Replies

Deployment :: What To Prevent Anyone From Using DLLs

Feb 2, 2010

You developing a application named "DemoSoft" which is going to be a shareware or Premium, you use different DLL's in this project and some DLL's are owned by you, they are very useful and valuable, you are selling this software and are charging the customer for what the software does but since this software uses one of your Valuable DLL, actually few functions from it you have to deploy it and cannot additionally charge for the whole dll. since that would be unwize.now i want to ask what can you do so that This DLL in "DemoSoft" cannot be exploited, meaning end user could use my software but if some thief tries to use my supplied DLL in one of his own app he is unable to do it, in simple terms DLL should work only and only with DemoSoft.

View 5 Replies

Detect Changes To Registry Prevent Changes

Dec 29, 2009

How can you detect when the registry is changed? Furthermore, how can you prevent changes to the system registry? I want to create a security tool, but can't seem to find this anywhere.This is in vb.net.I know the registry is stored as files on your computer somewhere, but I have no clue where it is stored, though I could probably use a FileSystemWatcher component to check it.Then, for prevention, would simply duplicating the registry files and rolling back the changes work?

View 1 Replies

Encoding - Prevent .net From Differentiating à To A?

Mar 20, 2012

We know a tolower function will turn all A to a How to turn all à to a.The purpose is I am creating ids for databases and id need to be unique. Sometimes the same stores are written as à in one place and as a on other places. This will create duplicate id problem.So I need a function that will turn all à and all of it's variation into a. The same way ě should become e.

Basically I would use utf8_unicode collation on my databases. Letters that count as the same letter under that collation should map to the same character under this function.I need to make sure that all other east asian characers are not affected in anyway.

View 1 Replies

How To Prevent Form Resizing

Apr 26, 2011

I want to prevent from resize of form. I set false MaximizeBox and I set FormBorderStyle to FixedSingle. I couldn't change the MaximumSize of form at runtime. If the user double click on the Tiltebar of the form the form resized. I couldn't prevent that

Then I write the following code at size changed event
If FormLoaded Then
Me.MaximizeBox = True
Me.WindowState = FormWindowState.Maximized
Me.StartPosition = FormStartPosition.WindowsDefaultLocation
Me.Size = InitialSize
Me.MaximizeBox = False
End If

View 8 Replies

How To Prevent Program Being Started Twice

Apr 8, 2010

I have a small problem with my application. When the system starts up, the program starts with it, but runs hidden (registry key with paremeter). The program also has a GUI.I want it so that when the user clicks the desktop icon, it does not start a second instance of the executable, but instead reveals the currently running background process. Is that possible?i.e. when the application is started with the "-startup" paremeter, it loads a hidden form2, and closes form1. When the desktop icon is clicked, it loads form1, while form2 remains hidden.

View 4 Replies

How To Prevent Program Running Twice

Oct 24, 2011

i got 2 program here...exe and B.exe.. B.exe is external program.. how can i run my program just once at same time? all start from .exe.. if .exe running twice, a messagebox appear ".exe already running".. if .exe detect B.exe was running, a messeagebox appear "B.exe already running".. i'm using Visual Basic.NET..

View 2 Replies

How To Prevent Vertically Resize

Apr 19, 2010

Working with winforms I wonder if there is some way to prevent vertically resize of the form. I would like to allow user to resize form in all directions except vertically.Moreover I would like to allow vertically resize in upward direction, but not downward.

I have tried to use maximumsize by setting it to: Me.maximumsize = new size(0,me.height)

I set width to 0 because I want to allow user to change form width.

View 5 Replies

Prevent .exe From Accessing Internet?

Feb 17, 2012

Is there a simple way to do this without having to programme a complete application level firewall or using Windows firewall?I found this very interesting: Winsock Injector It disables the use of Windows Sockets (winsock) for selected processes.Can such an injector be done in VB.NET and does it work for everything?I tried the injector but it doesnt seem to work for certain applications?

View 1 Replies

Prevent A Form From Being Minimized?

Sep 12, 2011

I've got this little 'Sticky Notes' type of application and the form I have is a borderless, taskbarless form and for Windows 2000 compatability I'm using VS 2008 and targeting the 2.0 framework. One of the hurdles I have is that in XP, Vista & 7 when you click the Show Desktop button all of my note's windows get minimized and without a taskbar icon, it's not easy to get them back (at least not for a normal user) & I'm looking for a way to either right after the windows minimize I just have them all show again or if I can skip the minimizing message in the wndproc altogether

I've put together a test app that'll show the messages in a listbox for the form, but I'm not sure how to go about skipping sending the message to the form's base class. Here's a snippet, listMessages is the listbox on the form[code]...

View 8 Replies

Prevent A Keypress In Another Application?

Mar 17, 2011

We have 2 apps that we display at once for data entry. 1 taking up the left side of the screen, and 1 taking up the right side.

1 of those apps is the data entry application. The other app is for viewing scanned info. But they can't talk to each other directly.

So I'm creating a tool that runs in the background to intercept certain keys.

I want to be able to capture keys such of Ctrl + Home, Ctrl + Page Up, etc from the data entry application, and send it to the scanned image to rotate it or zoom, etc.

I believe I can do most of it, except 1 part.

Right now if I did Ctrl + PageUp, it will send the key press to both apps. How do I prevent a keypress from the originating application?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved