Avoid Doubling In Combobox?

Aug 10, 2010

I have following code that is generating random no. between 1 to 10. This is working fine. But, I do not want doubling in combobox (cmbRnd is my combo box). How can I avoid it?

Private Sub cmdRnd_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdRnd.Click
Dim random As New Random(), i As Integer = 1

[Code]....

View 2 Replies


ADVERTISEMENT

Avoid Closing Of Custom ComboBox Popup Window In DataGrid?

Jan 31, 2012

I was trying to block the closing of a custom combo box popup window in my custom DataGrid. The popup window comes by pressing F4 or ALT+DOWN keys in my datagrid which is getting closed if I press the down arrow for the first time, after showing the first value in the combo box as selected. Next time onwards, if I press the F4 key and down arrow, I can move to any item in the popup window and select the item using keyboard and in that case, the popup window is not getting closed till I press the ENTER key or selection using the Mouse.

View 2 Replies

.net - Crystal Doubling Up On T's

Jun 23, 2010

I've written a vb.net application to populate a Crystal report and output it to PDF. The problem is that every text box in which I have the letter "t" is being printed out to the PDF as "tt". eg, instead of "customer", it prints "custtomer". The design time layout is perfect. And this only happens with text boxes on the report; value fields that contain the t character print out correctly.

View 2 Replies

Why Values Are Doubling When Use Structures

Oct 7, 2009

I have my public structure in a separate module:

Imports System
Public Structure BezierSpline
Public PointsCount As Integer

[Code]....

View 6 Replies

Doubling Image With Edge Detection?

Mar 16, 2011

I have a function to do edge detection that works fairly good with one pass and without using a convolution filter. The only thing is that it will shift by one pixel the resulting image when I runt it from top to bottom and from left to right. I can live with that. Just a curious thing that I got when I ran it several times in a loop to see the effect of applying it several times on the resulting image.A deformed image appears at the beggining and then, bit by bit it splits appart and after shifting it the width of the original image I get a double image. I wonder how the computer keeps track of the first image and is able to separate the two after several iteractions.I know that in electronics you can have several signals in a circuit and you can separate them with frequency filters, or you can simultaneously download several files with the same modem aand the two computers will synchronize each one, but this surprissed me.

Here is a simplified version of my function

Private Function Preview(ByVal Thumb As Image) As Image
Dim bm As New Bitmap(Thumb)
Dim X As Integer
Dim Y As Integer

[code]....

I have tried with more complicated images and with larger sizes, but to make upload smaller I includes these two images of simpler and smaller size. A view of the GUI and an animation of the process:reload to see the animation.

View 1 Replies

Keyboard Event Doubling Events?

Oct 15, 2010

Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If e.Modifiers = Keys.Control AndAlso e.KeyCode = Keys.A Then

[Code]...

And whenever I click control-b (on keyboard) it inserts the bold tag twice.why does it do that? i use to have that code in a button, and the keyboard event would lead to button1.performclick but now when putting the button code in the keyboard it adds the tags twice

View 4 Replies

Any Way To Avoid UnauthorizedAccessException

Jan 21, 2010

Is there any way to avoid UnauthorizedAccessException, i get it every time when I try to do this:[code]Is there any way to make that script read-write?

View 10 Replies

C# - How To Avoid Using Enums

Feb 15, 2010

Until asking a question on here I never considered (enums) to be a "bad thing." For those out there that consider them not to be best practice, what are some approachs/patterns for avoiding their use in code?

Edit:

public Enum SomeStatus
Approved = 1
Denied = 2
Pending =3
end Enum

View 5 Replies

Asp.net - Re-use An Ado.net Datatable So As To Avoid Re-querying?

Jun 11, 2011

Is it possible to re-use a DataTable in .net? Here's an example from code-behind:

[Code]...

View 3 Replies

Avoid Adding A Or B Or C Twice To The Datagrid?

May 13, 2009

i have a list of items in a listbox:-

A
B
C

and i have a button that adds these items by selecting them to a datagrid how can i avoid adding A or B or C twice to the datagrid?

View 2 Replies

Avoid Another Instance Of Application?

Jan 14, 2010

I can cheack another instance running r not then i closed the newly created instance

but nw my problem is i need to show the previously running instance if the previous instance minimized or hided

i m using the foolowing code to find the previous instance[code]...

View 7 Replies

Avoid Deleting When None Selected

Sep 2, 2011

My [code]...

But how i avoid when you selected nothing, you can delete.

View 2 Replies

Avoid Duplicate Value In Datgrideview?

Nov 11, 2010

How can I Avoid Duplicate values In datagrideview. IF found dublicate values in will change the row backcolour and show me the rows.

View 1 Replies

Avoid File Is Being Used By Another Process?

May 27, 2011

I am trying to check whether file exists or not. if not create and write something into it.The file is getting created but not updating and getting error message says it is being used by another processCode snippet:

Public shared sub MyXml()
If Not System.IO.File.Exists("configfile.xml") Then
Dim writer As New System.Xml.XmlTextWriter(fullPath.ToString + "configfile.xml", Nothing)

[code].....

View 1 Replies

Avoid Public Key Spoofing?

Aug 26, 2011

I am doing an activation server which will enable users to activate their software. The problem is that they own the public key.. the verification method needs the public key to check signature of the license file. My concern is that someone could generate their own license file using two key (public and private) and then change the public key on the client which would spoof his current license.

Is there any way of avoiding this ? Where should the public key be stored ? You have to take into consideration that the checkup is done on client and the signature is created on server.

View 2 Replies

Avoid Rounding Off Numbers?

Apr 20, 2011

how to avoid rounding off numbers

Code below

Dim acc = 0
Dim i
Dim x() = {699.68, 632.70}

[Code].....

View 2 Replies

Avoid The Changing The Date?

Jan 3, 2012

I would like to ask about how to code datetime in CONSOLE vb.net. I already got the format but my problem is after I inputted another data today to the database. In this image,my data retrieval was error. The ID (1,2,3,4,5,6)should be jan 2. Unfortunately, the output was today after Ive put new data to the database. I was confused on how to code to avoid changing the date.

[Code]...

View 2 Replies

Delay To Avoid Garbage?

Jun 15, 2009

I'm trying to introduce delay to my code so that it would read in the noise or garbage data.
I'm receiving the data from RFID to pic thru RS232.Is there any simple delay that i can use? I seriously don't understand threading.

View 1 Replies

How To Avoid A Null Reference

Jan 8, 2011

I have been trying to use sockets in VB.NET and once I cannot understand how to avoid a null reference. [code] I have tried introducing sock as 'New Socket', but this gives me 'Overload resolution failed because no accessible New can accept this number of arguments'.I also cannot simply add '= Nothing' onto the end of my declaration since this still gives a null reference.

View 6 Replies

How To Avoid Blank Lines

Sep 21, 2010

i have coded as below but once the record deleted and when the application write to text file again it gives an error says index was outside the bounds of the array any solution?

Dim stream As New IO.StreamWriter("C:Documents and SettingsAdministratorDesktopBill PaymentBillPaymentRecords.txt", False)
stream.WriteLine("")
stream.Close()

View 2 Replies

How To Avoid If ... Else And Switch Cases

Aug 3, 2010

I have been programming for alot of time. Generally i program in some languages like PHP, ASP.net, Java, JavaScript and others. In all languages i have to use alot of if else statments . Like if value= 10 then ... if i review my code then i find alot of if conditions. So i would like to minimise them but how not sure. one point was using classes somewhat minimised but still they are more... like task, cat, sec and type:

[Code]...

View 9 Replies

How To Avoid Loops In Networks

Aug 14, 2010

I have a matrix for example (10 x 10) which represents 10 nodes. The matrix called MyMat(9,9) The rows of this matrix represent the source node (From Node) and the columns represents target node (To Node). It has 14 links which are randomly distributed. The non zero values represent the connections between nodes.

[Code]...

View 6 Replies

How To Avoid Overlapping Of PictureBoxes

Jun 13, 2012

I am making an application in which number of pictureboxes created at runtime but they do not overlap to each other. I wrote a code bt its only for two pictureboxes.How can i do that for number of pictureboxes..

Public Class Form1
Dim pic1, pic2 As Rectangle
Dim drag, iscollided As Boolean
Dim mousex, mousey As Integer
Private Sub pic_Mousemove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
[Code] .....

View 1 Replies

How To Avoid Radiobutton To Autoselect

May 14, 2009

I need the user to choose one on a group of RadioButton controls. The problem is that on form load, one RadioButton is automatically selected. I does not want one selected, unless the user checks it, but cannot find how to disable automatic selection.

View 2 Replies

IDE :: Avoid Open A Project Twice?

Dec 1, 2009

it happened to me a lot - i double click a solution file and open it - change it and find out that its openned twice on my computer. IN VB6 - you could not open the same vbp twice - how can I do that in vb.net 2005/2008

View 3 Replies

Jquery - Avoid Refreshing A Div If The Div Has Been Used?

Jul 29, 2011

i have a div inside a iframe. It will be refreshing very 10 seconds.the div place holder has 4 text boxes controls. if any of the textbox is used then i want to not to refresh the div.

View 1 Replies

Want To Avoid A Number In List

Apr 21, 2011

[code] I am getting a run time error for this code. How can I change it. and how to limit the loop to print number from 1 to 42 and not 5 in the list ?

View 2 Replies

Asp.net - Avoid Reloading All XML Data For Each Repeater?

Jan 26, 2011

I am trying to place a repeater within a repeater using xml data. I have it working exactly as I want, but the method I have used reloads the data for each repeater. I think I need to cast as an XmlNode but I'll be honest - I have no idea where to start. Here is my code - I'd like to keep everything in the code behind if possible.

[Code]...

View 2 Replies

Avoid Adding In Database That Has Been Already Save?

Mar 15, 2012

how can i avoid data duplicate in the database?i mean if i add in the fields that has been already save it will still save.i don't know how to query or filter not to add the same info.i have the code below but it still save if i input same as already in the database.[code]i want is to query first before it add the data to avoid same info.

View 6 Replies

Avoid Assembly.LoadFrom Blocking?

Jul 31, 2011

I create a .net dll on the fly with codedom then I load it with Assembly.LoadFrom like this:

Private Sub Test()
Dim ASM As Assembly = Assembly.LoadFrom("test.dll")
'Do some stuff with the loaded assembly...

[code]....

View 1 Replies







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