|
I have attached the database programmatically in 2003 by running the sp_attach_db function on sql.
But when i try to do tha same in 2005 then the problem is is says
"Cannot associate files with different databases."
this is when i try to add both MDF and LDF files.
Can any when tell me how can i attach database progmt in 2005
|
|
|
|
|
Hi Everyone,
How to uninstall specific program from the control panel/ Add remove programs using vb6. Can anyone help me in this regard.
Thanks in Advance,
Regards,
Manowj
|
|
|
|
|
I am making an eyedropper tool for my program and want to use GetPixel. The problem is everytime i call the getpixel function, it only seems to see the pixels of my form's backcolour and clicks right through my picture box.
Can anyone suggest a reason and/or solution for this problem, or even an alternative more effective method.
this is my code:
Dim EyeD as boolean = true
Private Function GetPixel(ByVal x As Integer, ByVal y As Integer) As Color
End Function
Private Sub ButtonEyeDropper_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EyeDropper.Click
EyeD = True
End Sub
rivate Sub PictureBoxDisplay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Display.Click
If Me.EyeD = True Then
PixelColour = GetPixel(Windows.Forms.Cursor.Position.X, Windows.Forms.Cursor.Position.Y)
Me.panColour.BackColor = PixelColour
Dim strImage As Bitmap = Display.Image
strImage.MakeTransparent(PixelColour)
Me.Display.Image = strImage
EyeD = False
Else
If Keys.RButton Then
Me.Display.SizeMode = PictureBoxSizeMode.Zoom
End If
End If
End Sub
Posted by The ANZAC
|
|
|
|
|
You managed to show all the code except the code where the problem is. What does your GetPixel function contain?
---
b { font-weight: normal; }
|
|
|
|
|
How about:
Dim c As Color
c = PictureBox1.Image.GetPixel(PictureBox1.PointToClient(Windows.Forms.Cursor.Position))
This should work, so long as the Image property of the PictureBox returns a Bitmap object.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
When i put this code in, i get a message that says "GetPixel is not a member of system.Drawing.Image"
where am i supposed to put this code anyhow, you were a bit vague on that matter.
Posted by The ANZAC
|
|
|
|
|
Whoops! My fault! Try this:
Dim b As Bitmap
b = PictureBox1.Image
c = b.GetPixel(blah, blah)
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dear Guy's
I'd like to asking your favor to give me some advise how to export or import data from Excel file to access data base through out Visual basic.net Command program.
thank's a lot for your great favor to me
Best regards
ICE
|
|
|
|
|
|
I have read several articles about deploying applications with vb and every article mentions going under "add new project" and selecting the setup and deployment projects to implement a file named setup wizard which will guide you through installing your program. The problem is I cant find this anywhere in the copy of visual basic that I am using (Visual basic 2005 express edition). I have considered that it may be due to the fact that I am using an express edition, but none of the articles that I have read mention anything of this nature. I have also looked around the downloads section on Microsoft and found no extra add-ins or anything that assist one in deployment.
What I am wanting to do is have a folder created a several files placed in this folder for reference when the user attempts to install the application. Seems easy enough but I have yet to figure out how to do this. Also is it possible to build in the .net framework as a reference so the user can still install the program if he or she does not have access to the internet.
Any help with these problems would be great. I have searched for hours and had no luck, but in no hurry would just like to solve these issues.
-Erik-
|
|
|
|
|
ok mr Erik
i did not use .net express edition but now am using professional Edition
but i will try to help you
ok after working on your project if you want to deploy it
1- don't close your project
2- write click on solution (project name ) in solution Explorer
3- Add new project
4- you will see three lists first one your default language, 2nd one other languages, third one other project type
5- choose 3rd one (other projects type) (expand it)
6- choose Setup and Deployment
then choose type of deployment which you prefer
ok mr Erik i wish if i have helped you
IsMAiL
|
|
|
|
|
After I perform Step 2 (right click on the solution in solution explorer) my options are
Build
Rebuild
Publish
Add-(under this button you can add a new form not a project)
Add Reference
Add Web Reference
Debug
Rename
Properties
so I do not have the option to add a new project. I have come to the conclusion that it must be due to the fact that I am using an express edition. If you know of any other way to create a folder when the app is installed I could possibly go that route.
Thanks alot for the help.
-Erik-
|
|
|
|
|
Try left-clicking on the name of your project in solution explorer, then going to the File menu, Add, New Project.
Add new project does not appear in the right-click context menu.
Hope this helps.
|
|
|
|
|
I performed these steps and when the add new project window opens i have six options
Windows application
my movie collection starter kit
class library
screen saver starter kit
console application
search online templates.....
Keith are you using vb 2005 express edition. Just curious because because I have a feeling that it is some feature that is not built into the express edition. Also is there any other way to force the program to create a folder and store some files in the folder upon installation.
thanks for the help guys.
-Erik-
|
|
|
|
|
I have never used the Express Edition, only VS 2005 Pro. I guess it is possible that deployment projects are not available in the Express editions, however I cannot confirm that.
|
|
|
|
|
Express is the free edition and as far as I know does not include that project type.
See Here[^]
Take a look at the extensibility line.
|
|
|
|
|
Hi, I have a datagrid and a web service, please can someone tell me how to populate the datagrid from the xml data in the web service.
|
|
|
|
|
Hi,
Are you developing both, Web service and its client ( in .Net ) ? If yes then you can directly change the return type of the WebMethod to DataSet and then call this function from the client. When you get the dataset just add it to data source property.
If the web service is already built ( by some one else ) then you have a lot of work !
First understand the format of the data returned. Then use the XmlNavigator to read each chunk of data and programatically build a DataTable. Now you can easily assign this to dataSource property !
Hope i am clear !
PS : Please specify the complete scenario so that a specific answer can be suggested
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
Hi Anant
Thanks for your response.
It is an existing web service and each response contains members. I can display the datagrid easily, by dragging the data source onto my form. It is an array containing the correct headings but with empty tables.
I can see the members in my code when it runs, so it has been received. I just don't know how to get it into my application.
Regards
stampcoverman
|
|
|
|
|
Hi, I've just worked it out thanks. Problem solved:-
Dim ds As New Data.DataSet
MarketItemsBindingSource1.DataSource = bfGetEventsResp.marketItems
regards stampcoverman
|
|
|
|
|
I am looking to accomplish the following task:
Every 24 hours I would like something to delete all files in a specified folder older than, for example, 7 days with no user interaction.
I was thinking of writing it as a script or a service or a small app...what would you recommend as a god solution for accomplishing this?
I am leaning towards service but not sure how to create one...hehe
Thanks,
Taen Karth
|
|
|
|
|
I would recommend a script or a small application, as you run it so seldom. There is no reason to clog the memory with a service that is used 0.01% of the time.
---
b { font-weight: normal; }
|
|
|
|
|
Should i use WSH, WMI, BAT?
Any recommendations there?
Thanks,
Taen Karth
|
|
|
|
|
Does anyone have a clue as to how you would programatically drag and drop a file to another application using vb.net?
Maybe using a windows message WM_DROPFILES ?
Any code samples would be greatly appreciated.
|
|
|
|
|
how can i store picture in database as binary
and select it as binary to imagebox
thanks for help
MD_NADA
MD_NADA
|
|
|
|