droping external image on picturebox


Hi I'm doing a catalogue sort of program.
For that I need to drag an external image (.jpeg ,.bmp etc ) and put it on a picturebox. I tried using Oledragdrop ,But not getting the answer.
Help Plz
This post has been edited by paritosh_sumrao: 24 December 2007 - 06:06 AM
Posted On: Monday 24th of December 2012 01:07:44 AM Total Views:  267
View Complete with Replies

RELATED TOPICS OF Visual Basic PROGRAMMING LANGUAGE




extracting a pattern and clue from sentence

I am not able to extract a pattern and clue that I have set in Ms SQL Server from a sentence. For example "Jones born in 1999", I would like to extract the pattern: born and clue: Jones, 1999 and eliminating the bad words: was, in. May I know how can I do that Can anyone help me with this
VIEWS ON THIS POST

190

Posted on:

Friday 2nd November 2012
View Replies!

How to get available width (in pixels) of the monitor

I need to know the available width of the monitor in pixels. I can use this to position my window programmatically in Visual Basic.
VIEWS ON THIS POST

111

Posted on:

Saturday 10th November 2012
View Replies!

activex dll creation and usage

please tell about the topic
VIEWS ON THIS POST

227

Posted on:

Saturday 10th November 2012
View Replies!

Project Origination

[font=Arial Narrow][size=4] Hi! I'm taking a VB programming class and am struggling a bit. a next project requires the writing of a Hangman game code, and I'm unsure how to structure its organization. any suggestions
VIEWS ON THIS POST

161

Posted on:

Saturday 10th November 2012
View Replies!

VB6 SP6 BUGS: MSComCtl Listview control cashes - REPOST

Reposted as the original is reported as deleted from the server. re: MSComCtl Listview control cashes after installing VB6/VS6 SP6 I have been advised that this problem has been reproduced and a hotfix has been prepared. The supporting KB article ...
VIEWS ON THIS POST

112

Posted on:

Sunday 11th November 2012
View Replies!

Query to find Latest Date

I have two tables that share a common field, GivIndex. One table contains names and other information. The second table contains dates, amounts, categories, etc. These records combine to provide contribution records for our church. Is it possible to write ...
VIEWS ON THIS POST

123

Posted on:

Sunday 11th November 2012
View Replies!

File writing

Hi Does anybody know how to write to a file so that the contents cannot be viewed by a text editor...
VIEWS ON THIS POST

201

Posted on:

Sunday 11th November 2012
View Replies!

Problem connecting to sql 2000 personal edition

iam having problem connecting to sql 2000 personaledition. The codes i'm using to connect areas follows: Private sub Command1_Click() Dim cn As Connect Set cn = New Connection With cn .Provider="sqloledb" .ConnectionString = "User ID=;Password=;Data Source=OSARUMEN;initial catalog=pubs" .Open End With End sub At runtime ".Open" is always highted when i click on debug,but i can't remember the error message. Kindly assist me. Thank you
VIEWS ON THIS POST

300

Posted on:

Sunday 11th November 2012
View Replies!

LINK WITH SQL

Im trying to make a connection between vb and sql but I cant see the database, I already introduced SQL SERVER on the ODBC so I dont know what to do. PLEASE SOMEBODY HELP ME...
VIEWS ON THIS POST

63

Posted on:

Sunday 11th November 2012
View Replies!

JDBC type 4 from VB

My question is simple, Is there a way to execute JDBC type 4 from Visual Basic and/or VBA I've searched the forum and have found no reference to it. We have requirements that prohibit us from using ODBC.
VIEWS ON THIS POST

56

Posted on:

Sunday 11th November 2012
View Replies!

User Agent for Inet control

Hi Using the INET control to extract data from web sites and was told that the user agent should really be spoofed to make it look like a browser, as search engines sometimes black list submitters who don't use ...
VIEWS ON THIS POST

64

Posted on:

Sunday 11th November 2012
View Replies!

Real Software: Just Another Corporate Terrorist!

Remember all good con people are good at one thing - they have the "gift of gab" - the ability to use words effectively to make them seem friendly and to trust them. Its their main tool to scam you, ...
VIEWS ON THIS POST

144

Posted on:

Tuesday 20th November 2012
View Replies!

Does VB6 have an equivelent to C++'s SetTopIndex for a ListBox, so I can always see the last String in the listbox?

I'm adding hundreds of strings to a listbox and I want the last added string to be visable to the user. In C++ there is a function SetTopIndex which does this, how do you do it in VB ...
VIEWS ON THIS POST

223

Posted on:

Tuesday 20th November 2012
View Replies!

Problem with Shell Command in VB 5.0

I have this line in my code that spits out (run time error 53, file not found). Running this program (project.exe) works fine if I do it through the command prompt or Run dialogue box on the Windows XP start ...
VIEWS ON THIS POST

89

Posted on:

Tuesday 20th November 2012
View Replies!

HttpWebRequest/Response (500) Internal Server Error

The target server is writen in Cold Fusion and i have no access to there. In addition i get only this error msg which is not very helpful: The remote Server returned an error: (500) Internal Server Error What can i do in order to come with a more friendly exception message Am i overlooking something obvious in my code myResponse.Close()
VIEWS ON THIS POST

81

Posted on:

Tuesday 20th November 2012
View Replies!

Encapsulation question - may not be possible

This is probably going to sound daft. I'm inheriting one server control from another and I'd like if it's at all possible to hide a property in the child class that's declared public in the parent class. Is this possible or am I having a moron moment
VIEWS ON THIS POST

216

Posted on:

Tuesday 20th November 2012
View Replies!

Cannot Create ActiveX Control

I have a web service running on Framework 2.0/Windows 2003 serverthat uses a third part component packaged as an ocx. We have three different iis boxes with this service installed - two of them throw the cannot create activex control, one works fine. are win 2003. Furthermore, the vendor cannot reproduce the error on his 2003 machines withour unregistering the dll. We suspect permissions/rights issues at some point, but cannot seem to track down the issue on the two machines in question. I know this is a rather ambiguos one, but any advice or suggestions for tools etc would be greatly appreciated.
VIEWS ON THIS POST

237

Posted on:

Tuesday 20th November 2012
View Replies!

ASP Stored Procedure and Disconnected Record sets.

ASP Stored Procedure and Disconnected Record sets. How in ASP (not ASP.net) is a disconnected record set created from a stored procedure This question has been asked before but i have not found a valid answer. Everything works fine ...
VIEWS ON THIS POST

180

Posted on:

Wednesday 21st November 2012
View Replies!

Compare two text files but not row by row

I have to compare two note pads but not row by row. Both contain 20 columns. At first i have to match first five columns , wherever first five columns are matched then rest of the 15 columns of that particular row will be compared. whatever is the difference should be written into third text file.
VIEWS ON THIS POST

118

Posted on:

Wednesday 28th November 2012
View Replies!

windows 7 switching between windows renames the window title

I have an application that renames the Page Title of an IE session if it is on a particular URL. (SendMessage objIE.hwnd, WM_SETTEXT, 0, ByVal new_caption) I have noticed that on win7 IE8 if you preview the running applications on the task bar the title shows the previous window title. If you click on the preview pane and switch to that IE session it renames the Page title back to what it was before it was modified. The same code running on winXP and ie7 works ok Is this the correct functioning of the preview window, the preview does not appear to be previewing the current open window, what is causing it to be renamed, is there some way round this behaviour, etc. is it an error on my behalf Am I not setting the title correctly that works in ie7 but not in ie8 Window_Caption = GetWindowTitle(objIE.hwnd) If Left$(Window_Caption, 6) = "Amdocs" Then new_caption = instancename & " - " & Window_Caption SendMessage objIE.hwnd, WM_SETTEXT, 0, ByVal new_caption
VIEWS ON THIS POST

310

Posted on:

Wednesday 28th November 2012
View Replies!

connectivity

send me the connectivity rdo to oracle and ado
VIEWS ON THIS POST

201

Posted on:

Wednesday 28th November 2012
View Replies!

picture view

is it possible to rezize a large picture and show it in a picture box and when clicking on the picture box view it in windows picture and fax viewer as in normal size This post has been edited by vbdoubt: 07 July 2010 - 10:19 PM
VIEWS ON THIS POST

77

Posted on:

Wednesday 28th November 2012
View Replies!

how to insert data from calendar to database

im doing some system now. my idea is when we click on the calendar it will save the date in the database.... can you give me an idea how to do it.
VIEWS ON THIS POST

216

Posted on:

Wednesday 28th November 2012
View Replies!

how can print a document using keyboard shortcut in vb.net

Hi! i have built a form application in vb.net... now i want to use keyboard shortcut CTRl+P for printing a report from the form... how can i do this.. what event shoud i need to do and how.. please help me.. its urgernt
VIEWS ON THIS POST

238

Posted on:

Wednesday 28th November 2012
View Replies!

Solitaire Question

I'm trying to randomize integers in an array of a deck of cards; simple, but I'm also trying to change the display of an array of images of the cards to reflect the randomization. It almost happends when I click the command start button, then does nothing; a window of cards start to appear, but the program freezes. Here's what I have so far: Warning; I'm kind of a newbie, so forgive please...LOL...thanks. CardCount = 1 Counter = 0 Do While CardCount < 53 And Counter < 53 CardVal = Int((52 * Rnd) + 1) If arrDeck(CardVal) = -1 Then arrDeck(CardVal) = CardCount Subnum = Counter Image1(Subnum) = Image1(CardVal) Image1(CardVal).Visible = True Counter = Counter + 1 End If Loop
VIEWS ON THIS POST

68

Posted on:

Wednesday 28th November 2012
View Replies!

VB code to produce following out put

Private Sub Command1_Click() Dim row As Integer, column As Integer For row = 1 To 11 For column = 1 To 11 If row > column Then picBox.Print "$"; Else picBox.Print "+"; End If Next column picBox.Print Next row End Sub how to prevent the +++++++++++ display in 1st line
VIEWS ON THIS POST

132

Posted on:

Thursday 29th November 2012
View Replies!

FRACTION CALCULATOR

NEED HELP FROM BEGINNING TO END
VIEWS ON THIS POST

45

Posted on:

Thursday 29th November 2012
View Replies!

Syntax error in my INSERT INTO statement

i get a snytax error on the following code and i cant work out why. Private Sub ProcAddItem() Dim MyConn As ADODB.Connection Set MyConn = New ADODB.Connection Dim MyRecSet1 As New ADODB.Recordset MyConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\Documents\A2 Computing Coursework\db1.mdb" MyConn.Open Set MyRecSet1 = MyConn.Execute("INSERT INTO tblItems (itemcode, description, vat charged, price) VALUES (text1.text, none, 17.89, 17.5)") MyRecSet1.Update MsgBox "Transaction Complete", vbCritical, "Transaction Successful" MyConn.Close End Sub the tblItems structure is as follows: Itemcode(PK): String Description: String VAT Charged: String Price: String at the moment im using all the fields as strings to make life easier
VIEWS ON THIS POST

87

Posted on:

Thursday 29th November 2012
View Replies!

printing text file in landscape

this is going to sound stupid but I am trying to print a text file I am not sure why this works but this code below prints the file but I need to get it printed in landscape and since printing in vb 2005 studio is way different that 6.0 I need all the help I can get Call tabfile() Dim piStart As New ProcessStartInfo With piStart .FileName = System.Windows.Forms.Application.StartupPath & "\tabhamlog.txt" .Verb = "print" .WindowStyle = ProcessWindowStyle.Hidden End With Process.Start(piStart)
VIEWS ON THIS POST

157

Posted on:

Thursday 29th November 2012
View Replies!

Subscript out of range; Error 9

, I'm working on a game engine, and I'm currently working on dev tools for ingame editing. In the admin panel, whenever I try to change x,y of the map (size), it throws this error. This is the section it debugs to Public Sub cacheRenderState(ByVal x As Long, ByVal y As Long, ByVal layerNum As Long) Dim quarterNum As Long ' exit out early If x < 0 Or x > Map.MaxX Or y < 0 Or y > Map.MaxY Then Exit Sub With Map.Tile(x, y) ' check if the tile can be rendered If .Layer(layerNum).Tileset Count_Tileset Then Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_NONE Exit Sub End If ' check if it's a key - hide mask if key is closed If layerNum = MapLayer.Mask Then If .Type = TILE_TYPE_KEY Then If TempTile(x, y).DoorOpen = NO Then Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_NONE Exit Sub Else Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_NORMAL Exit Sub End If End If End If ' check if it needs to be rendered as an autotile If .Autotile(layerNum) = AUTOTILE_NONE Or .Autotile(layerNum) = AUTOTILE_FAKE Or Options.noAuto = 1 Then ' default to... default Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_NORMAL Else Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_AUTOTILE ' cache tileset positioning For quarterNum = 1 To 4 Autotile(x, y).Layer(layerNum).srcX(quarterNum) = (Map.Tile(x, y).Layer(layerNum).x * 32) + Autotile(x, y).Layer(layerNum).QuarterTile(quarterNum).x Autotile(x, y).Layer(layerNum).srcY(quarterNum) = (Map.Tile(x, y).Layer(layerNum).y * 32) + Autotile(x, y).Layer(layerNum).QuarterTile(quarterNum).y Next End If End With End Sub More specifically, the 10th line Autotile(x, y).Layer(layerNum).renderState = RENDER_STATE_NONE If you need anything else, please ask. It's eating at me, and I'd like to know what I'm doing wrong!
VIEWS ON THIS POST

76

Posted on:

Friday 30th November 2012
View Replies!

how to put a text on form

hi\tcould you help me how to put a printing text on the form
VIEWS ON THIS POST

89

Posted on:

Friday 30th November 2012
View Replies!

Need Help Making a Program To Read Text Files

Hi , I'm a complete newbie here and to VB.net in general. My friend for his company has written a program to tell if machines within his workplace are actually doing anything. The results from this are then shown in a text file, which I will show a small part of now: Server to Check : AC01VS007c Date Stamp : 26/06/2009 Time Stamp : 08:15 SQL Script Used : C:\Support\ServerChecks\Opp_SQL_Script.sql -------------------------------------------------------------------------------------------------------- Name ------------------------------ CES Manager 3.08.012 Name ------------------------------ SIS Translator 20.2.1 Name ------------------------------ Name ------------------------------ Name ------------------------------ CDS 22.1 WHO TR3 TODAYS DECLARATIONS Number of Meetings ------------------ 19 Number of BTG_OPTYS ------------------- 199 ODEC MESSAGES RECEIVED Meetings ----------- 19 Events ----------- 195 -------------------------------------------------------------------------------------------------------- Server to Check : AC01VS014a Date Stamp : 26/06/2009 Time Stamp : 08:15 SQL Script Used : C:\Support\ServerChecks\Opp_SQL_Script.sql -------------------------------------------------------------------------------------------------------- Name ------------------------------ CES Manager 3.11.006 Central System 20.0.3.0 Name ------------------------------ SIS Translator 20.2.1.2 Name ------------------------------ PA Translator 22.0.5.0 Warning: Null value is eliminated by an aggregate or other SET operation. Name ------------------------------ Name ------------------------------ CDS 22.1 WHO TR3 TODAYS DECLARATIONS Number of Meetings ------------------ 0 Number of BTG_OPTYS ------------------- 0 ODEC MESSAGES RECEIVED Meetings ----------- 0 Events ----------- 0 -------------------------------------------------------------------------------------------------------- Server to Check : AS02VS035S Date Stamp : 26/06/2009 Time Stamp : 08:15 SQL Script Used : C:\Support\ServerChecks\Opp_SQL_Script.sql -------------------------------------------------------------------------------------------------------- Name ------------------------------ The problem with this is that it is very hard to read and takes unecessary time scrolling through to find whether it is working or not. If the meetings and events add up to 0 then obviously the machine isn't working. What he has assigned me to do is put this information into a form which is simple and easy to read. I have successfully created a DataGridView which shows the Name of Machine, Status, Date Stamp and Time Stamp. However, this is only reproduced by entering the data manually into the source code eg. DataGridView1.Rows.Item(n).Cells(4).Value = "26/6/2009" DataGridView1.Rows.Item(n).Cells(5).Value = "08:15" for Date and Time Stamps. So what I'm trying to do is be able to change the program so it can search the text file for the machine name, add up all of the events and meetings for that machine and store it as an integer which can be updated straight to the DataGridView, and do the same for the Date Stamp and time Stamp. I hope all of this makes sense and I would really appreciate your help because I don't have a clue of where to start.
VIEWS ON THIS POST

91

Posted on:

Friday 30th November 2012
View Replies!

How to make a Draw in Tic Tac Toe

I'm very new to programming, obviously.... I made a tic tac toe program and I have everything working fine, except I cannot figure out how I would make it show a draw if nobody wins... Anybody have any suggestions on how I could do this Here is the code I have. Public Class TicTacToeForm Private Sub xExitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles xExitButton.Click Me.Close() End Sub Private Sub xStartNewButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles xStartNewButton.Click Me.xR1C1Label.Text = String.Empty Me.xR1C2Label.Text = String.Empty Me.xR1C3Label.Text = String.Empty Me.xR2C1Label.Text = String.Empty Me.xR2C2Label.Text = String.Empty Me.xR2C3Label.Text = String.Empty Me.xR3C1Label.Text = String.Empty Me.xR3C2Label.Text = String.Empty Me.xR3C3Label.Text = String.Empty End Sub Private Sub ClickOnSquares(ByVal sender As Object, ByVal e As System.EventArgs) Handles xR1C1Label.Click, xR1C2Label.Click, xR1C3Label.Click, xR2C1Label.Click, xR2C2Label.Click, xR2C3Label.Click, xR3C1Label.Click, xR3C2Label.Click, xR3C3Label.Click Dim XorOLabel As Label XorOLabel = sender Static firstPlayer As Boolean firstPlayer = Not firstPlayer If XorOLabel.Text = "" Then If firstPlayer Then XorOLabel.Text = "X" Else XorOLabel.Text = "O" End If End If 'row 1 win for X If Me.xR1C1Label.Text = "X" And Me.xR1C2Label.Text = "X" And Me.xR1C3Label.Text = "X" Then MessageBox.Show("X Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'row 2 win for X If Me.xR2C1Label.Text = "X" And Me.xR2C2Label.Text = "X" And Me.xR2C3Label.Text = "X" Then MessageBox.Show("X Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'row 3 win for X If Me.xR3C1Label.Text = "X" And Me.xR3C2Label.Text = "X" And Me.xR3C3Label.Text = "X" Then MessageBox.Show("X Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'column 1 win for X If Me.xR1C1Label.Text = "X" And Me.xR2C1Label.Text = "X" And Me.xR3C1Label.Text = "X" Then MessageBox.Show("X Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'column 2 win for X If Me.xR1C2Label.Text = "X" And Me.xR2C2Label.Text = "X" And Me.xR3C2Label.Text = "X" Then MessageBox.Show("X Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'column 3 win for X If Me.xR1C3Label.Text = "X" And Me.xR2C3Label.Text = "X" And Me.xR3C3Label.Text = "X" Then MessageBox.Show("X Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'diagonal top left win for X If Me.xR1C1Label.Text = "X" And Me.xR2C2Label.Text = "X" And Me.xR3C3Label.Text = "X" Then MessageBox.Show("X Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'diagonal top right win for X If Me.xR1C3Label.Text = "X" And Me.xR2C2Label.Text = "X" And Me.xR3C1Label.Text = "X" Then MessageBox.Show("X Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'row 1 win for O If Me.xR1C1Label.Text = "O" And Me.xR1C2Label.Text = "O" And Me.xR1C3Label.Text = "O" Then MessageBox.Show("O Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'row 2 win for O If Me.xR2C1Label.Text = "O" And Me.xR2C2Label.Text = "O" And Me.xR2C3Label.Text = "O" Then MessageBox.Show("O Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'row 3 win for O If Me.xR3C1Label.Text = "O" And Me.xR3C2Label.Text = "O" And Me.xR3C3Label.Text = "O" Then MessageBox.Show("O Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'column 1 win for O If Me.xR1C1Label.Text = "O" And Me.xR2C1Label.Text = "O" And Me.xR3C1Label.Text = "O" Then MessageBox.Show("O Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'column 2 win for O If Me.xR1C2Label.Text = "O" And Me.xR2C2Label.Text = "O" And Me.xR3C2Label.Text = "O" Then MessageBox.Show("O Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'column 3 win for O If Me.xR1C3Label.Text = "O" And Me.xR2C3Label.Text = "O" And Me.xR3C3Label.Text = "O" Then MessageBox.Show("O Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'diagonal top left win for O If Me.xR1C1Label.Text = "O" And Me.xR2C2Label.Text = "O" And Me.xR3C3Label.Text = "O" Then MessageBox.Show("O Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If 'diagonal top right win for O If Me.xR1C3Label.Text = "O" And Me.xR2C2Label.Text = "O" And Me.xR3C1Label.Text = "O" Then MessageBox.Show("O Wins!", "We Have A Winner!", MessageBoxButtons.OK) End If End Sub End Class
VIEWS ON THIS POST

59

Posted on:

Friday 30th November 2012
View Replies!

dynamic parameter list in cr 8.5

, i m working on an application using vb6/ms-access/cr8.5 and i create a report on sales according to a customer as a parameter. when i run the report the previous customer list is shown not for new customer. plz help me in this regards. can i create a dynamic list of customers as parameter in cr8.5 waiting ur kind response. thnx Sheikh Aamir
VIEWS ON THIS POST

106

Posted on:

Monday 3rd December 2012
View Replies!

Validate string in text box

I have a form that a user inputs either A B C or D into a text box. I need to validate that one of those four letters has been entered in the text box. I am using a case statement but I think an array might work better but I can't figure out how to validate a string in an array. If someone has a sample or there is a tutorial on this please let me know. Or if there is a better way to use the case statement...Here is my code snippet This works, but it seems like it is the long way to do it. Also as soon as I click OK on the message box it immediatly goes and shows my next form. How do I get it validate, let the user redo, and then bring up the other form I got a feeling I am really lost and there are two many issues here to address, but any help would be appreciated! Private Sub btnScore_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnScore.Click Select Case txt1.Text Case Is = "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" MessageBox.Show("Please choose a letter A B C or D") End Select Dim Grades As New frmGrades() ' Declare an instance Grades.ShowDialog() ' Display the form End Sub
VIEWS ON THIS POST

70

Posted on:

Sunday 23rd December 2012
View Replies!