|
how can i draw multiple image into the same picturebox using BitBlt function?
|
|
|
|
|
You can't, you'd have to build a composite image of those bitmaps. The picture box is just for people who want to put up a single image, it's assumed if you want to do more, you will draw it yourself.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am just a bit too lazy to spend a few hours finding it,if someone knows the location of the key i mentioned ,plz tell where it is.
|
|
|
|
|
Vivek Narayanan wrote: ,plz tell where it is.
Nope. Why? This is why...
Vivek Narayanan wrote: I am just a bit too lazy to spend a few hours finding it
|
|
|
|
|
HEY!,Not Fair,anyone else?
|
|
|
|
|
Whats not fair is saying "I'm too lazy to do it myself", then expecting someone to do it for you. Do your own damn work!
|
|
|
|
|
Hi all,
I got syntax error when I update the database, and I don't know what I;m did wrong. Can some of you give me some hints
I have a database table, with the field "First Name","Last Name" ,
"Phone","Age" and "Status"
I don't know is the problem due to the tag "First Name" with the space character?
the following is my code for create OleDbDataAdapter:
<br />
Dim adapter As OleDbDataAdapter = New OleDbDataAdapter(selectCommand, connection)<br />
<br />
adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey<br />
<br />
adapter.InsertCommand = New OleDbCommand( _<br />
"INSERT INTO wpGuest (First Name, Last Name, Phone, Age, Status) " & _<br />
"VALUES (?, ?, ?, ?, ?)", connection)<br />
<br />
<br />
adapter.UpdateCommand = New OleDbCommand( _<br />
"UPDATE wpGuest SET First Name = ?, Last Name = ? , Phone = ? , Age = ? , Status = ? " & _<br />
"WHERE First Name = ?", connection)<br />
<br />
<br />
adapter.DeleteCommand = New OleDbCommand("DELETE FROM wpGuest WHERE First Name = ?", connection)<br />
<br />
<br />
' Create the parameters.<br />
adapter.InsertCommand.Parameters.Add( _<br />
"@First Name", OleDbType.Char, 50, "First Name")<br />
adapter.InsertCommand.Parameters.Add( _<br />
"@Last Name", OleDbType.Char, 50, "Last Name")<br />
adapter.InsertCommand.Parameters.Add( _<br />
"@Phone", OleDbType.Char, 50, "Phone")<br />
adapter.InsertCommand.Parameters.Add( _<br />
"@Age", OleDbType.Char, 50, "Age")<br />
adapter.InsertCommand.Parameters.Add( _<br />
"@Status", OleDbType.Char, 50, "Status")<br />
<br />
<br />
<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@First Name", OleDbType.Char, 50, "First Name").Value = "c"<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@Last Name", OleDbType.Char, 50, "Last Name").Value = "c"<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@Phone", OleDbType.Char, 50, "Phone").Value = "c"<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@Age", OleDbType.Char, 50, "Age").Value = "c"<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@Status", OleDbType.Char, 50, "Status").Value = "c"<br />
adapter.UpdateCommand.Parameters.Add( _<br />
"@First Name", OleDbType.Char, 50, "First Name").SourceVersion = _<br />
DataRowVersion.Original<br />
<br />
<br />
adapter.DeleteCommand.Parameters.Add( _<br />
"@First Name", OleDbType.Char, 50, "First Name").SourceVersion = _<br />
DataRowVersion.Original<br />
<br />
|
|
|
|
|
It's not a good idea to put spaces in field names. If you do, they MUST be delimited by square brackets, like this:
INSERT INTO wpGuest ([First Name], [Last Name], Phone, Age, Status) VALUES (?, ?, ?, ?, ?)
|
|
|
|
|
How to get the access permissions on a folder in VB.net?
I need to get which all users and groups have which type of permissions on a Folder .
In web development.
Please help
Rose
|
|
|
|
|
The Article by Softomatix in CP.
Hope this article will help you.
Regards,
Satips.
|
|
|
|
|
Can I do the coding for chechking the permission in my application.
Rather than using external components ?
Thanks in Advance
|
|
|
|
|
I have not yet coded for checking the permission in my application. But in Dot net
The .NET security system is a marvelously intricate invention. You can customize the permissions available to an individual assembly or a group of assemblies (such as all code from a particular publisher) on an amazingly granular level. But many developers are a bit hazy on how all of the pieces fit together to generate these permissions.
The Basic Concepts,To get started in .NET security, you need to understand three basic concepts:
(1) Permissions
(2) Permission Sets
(3) Code Groups
Regards,
Satips.
|
|
|
|
|
Hey guys, I need a little help and i am hoping you guys can do the trick. What i need to do is this. I need to create a delployment project that installs a service which I can do, but during the install of the service I need the user to be prompted to enter a server ID and then have that get changed in my source code, so the service knows which server to talk to after it is installed.
I am thinking it is pretty easy to do, but I am uncertain how to do it.
Please help!!
Thanks, Travis
|
|
|
|
|
You don't change the source code. Your service should be written to pick up it's configuration from a known place, like a config file or from some place in the registry. The "custom action" (Google this!) in your setup should write that server name to the place where your service expects it.
|
|
|
|
|
Hi again!
I've hit a snag developing my Speech Notepad program. I'm trying to get the Microsoft SDK 5.1 to read out the text that is on the line where the cursor is located on. Is there a way of getting and speaking the lines contents without selecting it?
Thanks!
josh0476
|
|
|
|
|
Your code has to supply the string to the SDK. You can figure this out by looking at the SelectionStart property. It will always be the position of the blinking insertion point.
|
|
|
|
|
Hi,
I have a 2 column array that is 32 by 2. Dim table(32,2) as sting
There is Load button to pull the data to the datagrid / datagridview
The data will be edited in the datagrid / datagridview
Then a save button to save the data back to the array.
Can anyone help?
|
|
|
|
|
Well, you can't bind a DataGridView to a multidimensional array, only a single.
A better solution would be to create a class that holds the information you need in member variables exposed by properties, then create an ArrayList, or some other IList or ICollection collection, to hold all of your objects. You can then bind the datagrid to that collection and edit the collection directly.
|
|
|
|
|
Thanks I will look at that.
|
|
|
|
|
Hey guys the problem that I am is this. I am writting a service that every five minutes goes out and requests a web page. And the problem that I am having is whenever I disconnect my computer for the internet, the service throws an error. I have tried implementing some error handling but I can't seem to figure it out. I would like to code somethingso that if in 30 seconds a response is not gathered then to abort the request and try again in five minutes. Here is the code that i currently have:
Imports System
Imports System.IO
Imports System.Net
Imports System.Threading
Public Class VirasecHB
'Declare the Thread
Private VirasecHB_Thread As New Thread( _
New System.Threading.ThreadStart(AddressOf waitProcedure))
'Declare Variables
Dim serverID As String = "1336"
Dim webURL As String = "http://www.virasec.com/intranet/tech/heart/heartdb.asp?hdur=300&hsid=" & serverID
Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set things
' in motion so your service can do its work.
WebRequestProcedure()
VirasecHB_Thread.Start()
End Sub
Protected Overrides Sub OnStop()
' Add code here to perform any tear-down necessary to stop your service.
VirasecHB_Thread.Abort()
End Sub
Private Sub WebRequestProcedure()
' Create a request for the URL.
Dim request As WebRequest = WebRequest.Create(webURL)
' If required by the server, set the credentials.
request.Credentials = CredentialCache.DefaultCredentials
'Sets web request timeout time
request.Timeout = 30000 ' 30000 = 30 Seconds
' Get the response.
Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
'Close the response request
response.Close()
End Sub
Private Sub waitProcedure()
Do
'Wait Five Mintues
System.Threading.Thread.Sleep(300000) '300000 = 5 Minutes
Try
WebRequestProcedure()
Catch ex As Exception
Dim errorLog As New EventLog
errorLog.WriteEntry("Virasec Heartbeat Service " & _
"has encountered an error while trying to " & _
"connect to the Virasec web server. " & _
"The service will attempt to " & _
"connect again in five minutes.", EventLogEntryType.Error)
End Try
Loop
End Sub
End Class
If there is anything you guys can do to help please let me know.
Thanks again,
Travis
|
|
|
|
|
tcombs07 wrote: the problem that I am having is whenever I disconnect my computer for the internet, the service throws an error.
This line might be the problem...No internet connection, no getting to www.virasec.com.......
tcombs07 wrote: Dim webURL As String = "http://www.virasec.com/intranet/tech/heart/heartdb.asp?hdur=300&hsid=" & serverID
|
|
|
|
|
You have to mention the Error you're getting to get more precise answers.
I can only make a wild guess with the information you've provided.
Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
In most probability, the CType you're doing is throwing an error as the Reponse object returned by the GetResponse() method will be null if it can't reach the Http server.
Enclose the above line in a Try..Catch block.
AND, next time, post the error message or what it says, as well.
SG
|
|
|
|
|
You'd have to completely redesign this. All of your code was written on the assuption that the request would work and only the occasional error would happen.
Turn it around and design the service so that it assumes that every request to the site will FAIL. For instance, this:
Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
'Close the response request
response.Close()
always assumes that the response returns an object that you can close. Don't call close on an object that you don't know exists. Test for an object first, THEN call close on it if it's legitimate:
Dim response As ...
If response Is Nothing Then
' The request obviously failed...
Else
response.Close()
End If
|
|
|
|
|
Hello all,
Here's my situation:
I have a form with a listbox and a textbox, both with the same collumn of a databasetable.
When i click an item in the listbox i want the textbox to show the item as well.
I tried the following code:
Me.BindingContext(dsGroepAgent, "groep").Position = lstgroepen.SelectedIndex
When i click an item in the listbox the following error occured:
An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll
Any idea
|
|
|
|
|
You better don your asbestos suit for posting this in the programming forums, where, if you bothered to read the Posting Guidlines, posts like this are expressly forbidden.
|
|
|
|
|